AbstractFilterView

class AbstractFilterView : public QWidget

Base class for filter widgets providing a debounced search interface and item count display.

Subclassed by ComboQuickFilterView, QuickFilterView

Public Functions

explicit AbstractFilterView(QWidget *parent = nullptr)
virtual void setItemCount(int count)
virtual void showItemCount(bool show)
void showFilter()
void clearFilter() const
virtual void closeFilter()
void attachTo(QAbstractItemView *list, QWidget *scope = nullptr)

Sets up Find and Esc for this filter bar.

Find opens the bar, Esc clears it, then closes it. If there’s nothing to clear, Esc is left alone so dialogs can still close.

Parameters:
  • list – The view the bar filters; gets focus back when the bar closes.

  • scope – Where the keys work, besides the bar. Defaults to list.

inline virtual bool isClosable() const

Whether Esc (or a different shortcut) on an empty bar hides it.

virtual ItemCountLineEdit *lineEdit() const = 0

Signals

void filterTextChanged(const QString &text)
void filterClosed()