summaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2018-12-06 20:07:47 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-14 01:05:18 +0800
commit81bb6086c0e7f7ba6d4100a49cc9cf32556caaaf (patch)
tree478e59d052d3fddd564c7bbabbd44d8544b276ca /qt-models/filtermodels.cpp
parent89413c5f0779813dab1b63e24aa4b34aebc1e28c (diff)
downloadsubsurface-81bb6086c0e7f7ba6d4100a49cc9cf32556caaaf.tar.gz
Struct FilterData
The idea is that this struct will have all the needed data that will be passed to the filter model. Everything that happens on the filterwidget will fill out this struct, then forward it to the model, that in turn will activate the filter hiding some of the dives that matches on your divelist. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-models/filtermodels.cpp')
-rw-r--r--qt-models/filtermodels.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/filtermodels.cpp b/qt-models/filtermodels.cpp
index 4063ba149..a6e80aa8f 100644
--- a/qt-models/filtermodels.cpp
+++ b/qt-models/filtermodels.cpp
@@ -711,3 +711,9 @@ bool MultiFilterSortModel::lessThan(const QModelIndex &i1, const QModelIndex &i2
// Hand sorting down to the source model.
return model->lessThan(i1, i2);
}
+
+void MultiFilterSortModel::filterDataChanged(const FilterData& data)
+{
+ filterData = data;
+ myInvalidate();
+}