summaryrefslogtreecommitdiff
path: root/event_filter.h
blob: aca6ed945ff7761d608513d071d9ce0c7b37b031 (plain)
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
#ifndef EVENT_FILTER_H
#define EVENT_FILTER_H

#include <QList>
#include <QPair>
#include <QSortFilterProxyModel>
#include <QString>
#include <qqml.h>

class EventFilter : public QSortFilterProxyModel
{
	Q_OBJECT
	QML_ELEMENT
public slots:
	void setFilter(const QString& filter = "");
	bool remove(int row);

protected:
	bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;

private:
	QList<QPair<QString, QString>> filters;
};

#endif