Mercurial > retraceit
diff src/filterwidget.h @ 88:3916cb3c9105
Add new FilterSort model that allows to include empty values
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 19 Jun 2015 14:26:16 +0200 |
parents | 098a10fc2e83 |
children |
line wrap: on
line diff
--- a/src/filterwidget.h Thu Jun 18 19:35:22 2015 +0200 +++ b/src/filterwidget.h Fri Jun 19 14:26:16 2015 +0200 @@ -12,6 +12,7 @@ class QSortFilterProxyModel; class QComboBox; +class QCheckBox; class QLineEdit; /** * @class FilterWidget @@ -22,26 +23,35 @@ Q_OBJECT public: - /**@brief construct a filterwidget for the model model.*/ - FilterWidget (QSortFilterProxyModel *model, + /**@brief construct a filterwidget for the model model. + * + * @param model The model to filter + * @param addWithEmptyChk wether or not to add the include empty checkbox. + * */ + FilterWidget (QSortFilterProxyModel *model, bool addWithEmptyChk, QWidget * parent = 0, Qt::WindowFlags f = 0); Q_SIGNALS: void filterHasChanged(); + void includeEmptyChanged(int state); + protected: void setupGUI(); -protected slots: +public slots: void headersChanged(); +protected slots: void filterChanged(); private: QSortFilterProxyModel *mModel; QComboBox *mCombo; + QCheckBox *mEmptyChk; QLineEdit *mEditLine; /* Maps the combo index to the model col index */ QMap<int, int> mColFilterMap; + bool mWithEmptyChk; }; #endif // FILTERWIDGET_H