summaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/filtermodels.h')
-rw-r--r--qt-models/filtermodels.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h
index cda6e2369..3060f7cf3 100644
--- a/qt-models/filtermodels.h
+++ b/qt-models/filtermodels.h
@@ -16,7 +16,13 @@ public:
bool anyChecked;
};
-class TagFilterModel : public QStringListModel, public MultiFilterInterface {
+class FilterModelBase : public QStringListModel, public MultiFilterInterface {
+protected:
+ explicit FilterModelBase(QObject *parent = 0);
+ void updateList(const QStringList &new_list);
+};
+
+class TagFilterModel : public FilterModelBase {
Q_OBJECT
public:
static TagFilterModel *instance();
@@ -33,7 +39,7 @@ private:
explicit TagFilterModel(QObject *parent = 0);
};
-class BuddyFilterModel : public QStringListModel, public MultiFilterInterface {
+class BuddyFilterModel : public FilterModelBase {
Q_OBJECT
public:
static BuddyFilterModel *instance();
@@ -50,7 +56,7 @@ private:
explicit BuddyFilterModel(QObject *parent = 0);
};
-class LocationFilterModel : public QStringListModel, public MultiFilterInterface {
+class LocationFilterModel : public FilterModelBase {
Q_OBJECT
public:
static LocationFilterModel *instance();
@@ -67,7 +73,7 @@ private:
explicit LocationFilterModel(QObject *parent = 0);
};
-class SuitsFilterModel : public QStringListModel, public MultiFilterInterface {
+class SuitsFilterModel : public FilterModelBase {
Q_OBJECT
public:
static SuitsFilterModel *instance();