diff options
Diffstat (limited to 'event_filter.h')
| -rw-r--r-- | event_filter.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/event_filter.h b/event_filter.h new file mode 100644 index 0000000..aca6ed9 --- /dev/null +++ b/event_filter.h @@ -0,0 +1,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 |
