diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-09-17 15:45:18 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-09-17 15:28:04 -0700 |
commit | a6e9a1eab561af3255d99d31011c57135a90ca3f (patch) | |
tree | 424a8843682411c072a2fddac6e89924994388d0 /qt-ui/models.h | |
parent | 7a90b9d7647537057f574916314a9f488e900e8a (diff) | |
download | subsurface-a6e9a1eab561af3255d99d31011c57135a90ca3f.tar.gz |
Implement the TagFilter model.
This model accepts check / unchedk. Now, I need to also
plug the result of the check / uncheck to the list model.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r-- | qt-ui/models.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h index c4a3a077d..c54a765ab 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -417,4 +417,18 @@ private: QStringList languages; }; + +class TagFilterModel : public QStringListModel { + Q_OBJECT +public: + static TagFilterModel *instance(); + virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); + virtual Qt::ItemFlags flags(const QModelIndex &index) const; +public slots: + void repopulate(); +private: + explicit TagFilterModel(QObject *parent = 0); + bool *checkState; +}; #endif // MODELS_H |