added search to project toolbar

This commit is contained in:
itsmattkc
2019-02-01 10:05:22 +11:00
parent db92e5231f
commit 0399c36dfd
4 changed files with 62 additions and 6 deletions
+19 -1
View File
@@ -7,13 +7,31 @@ class ProjectFilter : public QSortFilterProxyModel {
Q_OBJECT
public:
ProjectFilter(QObject *parent = nullptr);
// are sequences visible
bool get_show_sequences();
public slots:
// set whether sequences are visible
void set_show_sequences(bool b);
// update search filter
void update_search_filter(const QString& s);
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
// function that filters whether rows are displayed or not
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
private:
// internal variable for whether to show sequences
bool show_sequences;
// search filter variable
QString search_filter;
};
#endif // PROJECTFILTER_H