]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - src/taskfiltermodel.h
New upstream version 2.9.22
[sven/vym.git] / src / taskfiltermodel.h
diff --git a/src/taskfiltermodel.h b/src/taskfiltermodel.h
new file mode 100644 (file)
index 0000000..f16eaec
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef TASKFILTERMODEL_H
+#define TASKFILTERMODEL_H
+
+#include <QSortFilterProxyModel>
+
+class Task;
+
+class TaskFilterModel : public QSortFilterProxyModel {
+  public:
+    void setFilter(bool b);
+    void setFilterNew(bool b);
+    void setFilterBlocker(bool b);
+    void setMapFilter(const QString &s);
+    void setFilterFlags1(bool b);
+    void setFilterFlags2(bool b);
+    void setFilterFlags3(bool b);
+    bool taskVisible(Task*) const;
+
+  protected:
+    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+
+  private:
+    bool useFilter;
+    QString mapFilter;
+    bool filterNew;
+    bool filterBlocker;
+    bool filterFlags1;
+    bool filterFlags2;
+    bool filterFlags3;
+};
+
+#endif