12 #ifndef __FILTERABLETREEVIEW_H__ 13 #define __FILTERABLETREEVIEW_H__ 34 template <
typename F>
inline QModelIndex
recurse(
const F& func,
const bool backwards =
false) {
37 template <
typename F>
inline QModelIndex
recurse(
const F& func,
const QModelIndex& node,
const bool backwards =
false) {
38 if (node.isValid() && func(node))
42 template <
typename F> QModelIndex
recurseUnder(
const F& func,
const QModelIndex& node,
const bool backwards =
false);
56 inline virtual bool filter(
const QString& searchString)
override {
59 virtual bool filter(
const QString& searchString,
const QModelIndex& node);
70 #endif // __FILTERABLETREEVIEW_H__
virtual void selectPrevious() override
Definition: filterabletreeview.cpp:137
void toggleExpandedForUnselectable(const QModelIndex &node)
Definition: filterabletreeview.cpp:68
FilterableTreeViewTemplate(QWidget *parent=nullptr)
Definition: filterabletreeview.cpp:21
virtual void selectFirst() override
Definition: filterabletreeview.cpp:82
QModelIndex recurseUnder(const F &func, const QModelIndex &node, const bool backwards=false)
Definition: filterabletreeview.cpp:233
Definition: filterabletreeview.h:28
virtual void selectNext() override
Definition: filterabletreeview.cpp:97
void toggleExpanded(const QModelIndex &node)
Definition: filterabletreeview.cpp:57
Definition: aeolus.cpp:26
virtual void toInitialState() override
Definition: filterabletreeview.h:52
QModelIndex recurse(const F &func, const bool backwards=false)
Definition: filterabletreeview.h:34
virtual bool filter(const QString &searchString) override
Definition: filterabletreeview.h:56
virtual void keyPressEvent(QKeyEvent *event) override
Definition: filterabletreeview.cpp:39
QModelIndex recurse(const F &func, const QModelIndex &node, const bool backwards=false)
Definition: filterabletreeview.h:37
Definition: filterableview.h:24