2017-04-27 20:25:32 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-11-13 16:31:03 -02:00
|
|
|
#ifndef FILTERMODELS_H
|
|
|
|
#define FILTERMODELS_H
|
|
|
|
|
2018-12-27 10:06:11 +01:00
|
|
|
#include "divetripmodel.h"
|
2018-10-29 14:56:48 +01:00
|
|
|
|
2014-11-13 16:31:03 -02:00
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
|
|
|
|
class MultiFilterSortModel : public QSortFilterProxyModel {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static MultiFilterSortModel *instance();
|
2018-09-29 22:13:44 +02:00
|
|
|
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
2018-10-29 20:17:53 +01:00
|
|
|
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
|
2019-11-17 18:13:55 +01:00
|
|
|
|
2018-12-27 10:06:11 +01:00
|
|
|
void resetModel(DiveTripModelBase::Layout layout);
|
2014-11-13 16:31:03 -02:00
|
|
|
private:
|
|
|
|
MultiFilterSortModel(QObject *parent = 0);
|
|
|
|
};
|
|
|
|
|
2014-11-13 13:45:32 -08:00
|
|
|
#endif
|