]> git.sven.stormbind.net Git - sven/vym.git/blobdiff - src/mysortfilterproxymodel.h
New upstream version 2.9.22
[sven/vym.git] / src / mysortfilterproxymodel.h
diff --git a/src/mysortfilterproxymodel.h b/src/mysortfilterproxymodel.h
new file mode 100644 (file)
index 0000000..546bce8
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef MYSORTFILTERPROXYMODEL_H
+#define MYSORTFILTERPROXYMODEL_H
+
+//#include <QDate>
+#include <QSortFilterProxyModel>
+
+//! [0]
+class MySortFilterProxyModel : public QSortFilterProxyModel {
+    Q_OBJECT
+
+  public:
+    MySortFilterProxyModel(QObject *parent = 0);
+    /*
+
+        QDate filterMinimumDate() const { return minDate; }
+        void setFilterMinimumDate(const QDate &date);
+
+        QDate filterMaximumDate() const { return maxDate; }
+        void setFilterMaximumDate(const QDate &date);
+    protected:
+    */
+    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+    /*
+    bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
+
+private:
+    bool dateInRange(const QDate &date) const;
+
+    QDate minDate;
+    QDate maxDate;
+*/
+};
+
+#endif