aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-10-31 16:20:43 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-10-31 14:58:55 -0700
commit2c924b6834d7c032cfec5d6205447333780124e0 (patch)
treec4fb1b61291ecf01ce15c0a9f4039cbb66956783 /qt-ui/models.h
parent318256cfb47ee45f8928542e2446aa30bf3de89c (diff)
downloadsubsurface-2c924b6834d7c032cfec5d6205447333780124e0.tar.gz
Added the skeleton for the BuddyFilter
Just the skeleton of the functions, nothing working yet. 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.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h
index 032edc58f..fb92d2702 100644
--- a/qt-ui/models.h
+++ b/qt-ui/models.h
@@ -443,6 +443,25 @@ private:
explicit TagFilterModel(QObject *parent = 0);
};
+class BuddyFilterModel : public QStringListModel, public MultiFilterInterface{
+ Q_OBJECT
+public:
+ static BuddyFilterModel *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 *checkState;
+ bool anyChecked;
+public
+slots:
+ void repopulate();
+
+private:
+ explicit BuddyFilterModel(QObject *parent = 0);
+};
+
+
class MultiFilterSortModel : public QSortFilterProxyModel {
Q_OBJECT
public: