diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-11 13:34:12 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-11 13:34:12 -0800 |
commit | 19ca90f1a0ab8bad7488bf03e6248c8a8c8ff7e0 (patch) | |
tree | 95a9bc80e3db55d011d13498c0afad6359506edf /qt-ui/models.h | |
parent | d5ffc16c362ce8f2f353f3c4880ecd689c9ea7ee (diff) | |
download | subsurface-19ca90f1a0ab8bad7488bf03e6248c8a8c8ff7e0.tar.gz |
Embed the information whether a dive is hidden by a filter in the dive
This way other parts of the code can act on the "hidden_by_filter" state.
This also cleans up the way we track if a dive is hidden - do it in the
multi filter instead of the individual filters.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r-- | qt-ui/models.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h index 470cf5fbc..8a2d3dcb9 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -442,6 +442,7 @@ 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; bool anyChecked; @@ -455,6 +456,7 @@ public: 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: @@ -472,6 +474,7 @@ public: 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: @@ -489,6 +492,7 @@ public: 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: |