From 3003c6e1eed330978193d6859eca2f79ee68aa54 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 17 Nov 2019 19:53:18 +0100 Subject: 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 --- qt-models/filtermodels.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'qt-models/filtermodels.h') 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 #include -#include - -#include -#include 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 -- cgit v1.2.3-70-g09d2