summaryrefslogtreecommitdiffstats
path: root/qt-models/filterpresetmodel.h
blob: 26543666ac74e2279221df702aa7a100e57b9d65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: GPL-2.0
#ifndef FILTERPRESETMODEL_H
#define FILTERPRESETMODEL_H

#include "cleanertablemodel.h"
#include "core/filterpreset.h"

class FilterPresetModel : public CleanerTableModel {
	Q_OBJECT
public:
	// For QML we will have to define roles
	enum Column {
		REMOVE,
		NAME
	};
private
slots:
	void reset();
public:
	// there is one global filter preset list, therefore this model is a singleton
	static FilterPresetModel *instance();
private:
	FilterPresetModel();
	~FilterPresetModel();
	QVariant data(const QModelIndex &index, int role) const override;
	int rowCount(const QModelIndex &parent) const override;
	std::vector<filter_constraint> constraints;
};

#endif