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>
This commit is contained in:
Tomaz Canabrava 2014-09-17 15:45:18 -03:00 committed by Dirk Hohndel
parent 7a90b9d764
commit a6e9a1eab5
4 changed files with 71 additions and 0 deletions

View file

@ -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