aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/filtermodels.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-16 18:22:35 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-11-16 18:36:42 +0000
commit05e02b939a70bac0078211a5c1a94e698b3b5c2b (patch)
tree8641aba88604470d6023e51dab49dbe85e7c4b89 /qt-ui/filtermodels.h
parentad603b6e9f0b03032ba0f04c6cec0a5e9b10514b (diff)
downloadsubsurface-05e02b939a70bac0078211a5c1a94e698b3b5c2b.tar.gz
Improve the filter logic
The MultiFilter itself should walk the dives in a trip. This way the logic (OR within a category, but AND between categories) is correctly applied and the flags in the dives are set correctly (which makes the overall counts for dives filtered work correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/filtermodels.h')
-rw-r--r--qt-ui/filtermodels.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/qt-ui/filtermodels.h b/qt-ui/filtermodels.h
index c70264b3d..0fa83da23 100644
--- a/qt-ui/filtermodels.h
+++ b/qt-ui/filtermodels.h
@@ -7,7 +7,6 @@
class MultiFilterInterface {
public:
MultiFilterInterface() : checkState(NULL){};
- virtual bool filterRow(int source_row, const QModelIndex &source_parent, QAbstractItemModel *sourceModel) const = 0;
virtual bool doFilter(struct dive *d, QModelIndex &index0, QAbstractItemModel *sourceModel) const = 0;
virtual void clearFilter() = 0;
bool *checkState;
@@ -21,7 +20,6 @@ public:
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
@@ -39,7 +37,6 @@ public:
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
@@ -57,7 +54,6 @@ public:
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
@@ -75,7 +71,6 @@ public:
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