X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=src%2Fmysortfilterproxymodel.h;fp=src%2Fmysortfilterproxymodel.h;h=546bce8889b3cabcdc7aede0910e71876cfad7a8;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=0000000000000000000000000000000000000000;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/src/mysortfilterproxymodel.h b/src/mysortfilterproxymodel.h new file mode 100644 index 0000000..546bce8 --- /dev/null +++ b/src/mysortfilterproxymodel.h @@ -0,0 +1,34 @@ +#ifndef MYSORTFILTERPROXYMODEL_H +#define MYSORTFILTERPROXYMODEL_H + +//#include +#include + +//! [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