summaryrefslogtreecommitdiffstats
path: root/qt-ui/filtermodels.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-11-13 17:07:05 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-13 12:04:44 -0800
commit88d19bca6cebfab88736e892b20c2da0fc67abcf (patch)
tree6f7a8c72fe645523365c19fa13d447ae46069cd9 /qt-ui/filtermodels.h
parent16e44b31d3403588041bc1498371cb5db629b0bc (diff)
downloadsubsurface-88d19bca6cebfab88736e892b20c2da0fc67abcf.tar.gz
Added skeleton of the Suits Filter.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/filtermodels.h')
-rw-r--r--qt-ui/filtermodels.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/qt-ui/filtermodels.h b/qt-ui/filtermodels.h
index 353e9d0a9..3d64356ed 100644
--- a/qt-ui/filtermodels.h
+++ b/qt-ui/filtermodels.h
@@ -68,6 +68,24 @@ private:
explicit LocationFilterModel(QObject *parent = 0);
};
+class SuitsFilterModel : public QStringListModel, public MultiFilterInterface{
+ Q_OBJECT
+public:
+ static SuitsFilterModel *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;
+ virtual bool filterRow(int source_row, const QModelIndex &source_parent, QAbstractItemModel *sourceModel) const;
+ bool doFilter(struct dive *d, QModelIndex &index0, QAbstractItemModel *sourceModel) const;
+ void clearFilter();
+public
+slots:
+ void repopulate();
+
+private:
+ explicit SuitsFilterModel(QObject *parent = 0);
+};
+
class MultiFilterSortModel : public QSortFilterProxyModel {
Q_OBJECT
public: