mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
3003c6e1ee
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>
21 lines
544 B
C++
21 lines
544 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef FILTERMODELS_H
|
|
#define FILTERMODELS_H
|
|
|
|
#include "divetripmodel.h"
|
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
class MultiFilterSortModel : public QSortFilterProxyModel {
|
|
Q_OBJECT
|
|
public:
|
|
static MultiFilterSortModel *instance();
|
|
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
|
|
bool lessThan(const QModelIndex &, const QModelIndex &) const override;
|
|
|
|
void resetModel(DiveTripModelBase::Layout layout);
|
|
private:
|
|
MultiFilterSortModel(QObject *parent = 0);
|
|
};
|
|
|
|
#endif
|