aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/filtermodels.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-17 19:53:18 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-19 21:13:40 -0800
commit3003c6e1eed330978193d6859eca2f79ee68aa54 (patch)
tree1baeb54aeca0eda10d273779cf3704095a170d2e /qt-models/filtermodels.h
parent9ffafbc326b38bd2d0bb870fa4721b6c94280c28 (diff)
downloadsubsurface-3003c6e1eed330978193d6859eca2f79ee68aa54.tar.gz
Filter: move recalculation of filter from FilterModel to TripModel
The way this was accessed via Qt's model semantics was horrible. This gives arguably more readable code, since we don't have to shoehorn things through QVariants. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/filtermodels.h')
-rw-r--r--qt-models/filtermodels.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/qt-models/filtermodels.h b/qt-models/filtermodels.h
index d279470b1..2dcce0fc0 100644
--- a/qt-models/filtermodels.h
+++ b/qt-models/filtermodels.h
@@ -4,31 +4,18 @@
#include "divetripmodel.h"
-#include <QStringListModel>
#include <QSortFilterProxyModel>
-#include <QDateTime>
-
-#include <stdint.h>
-#include <vector>
class MultiFilterSortModel : public QSortFilterProxyModel {
Q_OBJECT
public:
static MultiFilterSortModel *instance();
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
- bool updateDive(struct dive *d); // returns true if visibility status changed
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
void resetModel(DiveTripModelBase::Layout layout);
- void myInvalidate();
-
-signals:
- void filterFinished();
-
private:
MultiFilterSortModel(QObject *parent = 0);
- // Dive site filtering has priority over other filters
- void countsChanged();
};
#endif