From 8d44150598a4e04a751b7df0d8c91ea29099e10e Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 5 Sep 2021 21:16:46 +0200 Subject: Implement filter Add a proxy model class with filter logic, and use it as the model for events ListView. --- event_list.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'event_list.h') diff --git a/event_list.h b/event_list.h index 1c50c59..21932ad 100644 --- a/event_list.h +++ b/event_list.h @@ -20,8 +20,8 @@ public: bool setData(const QModelIndex& index, const QVariant& value, int role); public slots: - int insert(const int time = -1); - bool removeRows(int row, int count = 1, const QModelIndex &parent = {}); + int insert(const QString& tag = {}, const int time = -1); + bool removeRows(int row, int count = 1, const QModelIndex& parent = {}); void load(const QJsonObject& json); QJsonObject save() const; @@ -36,8 +36,8 @@ private: }; enum Role { Time = Qt::UserRole + 1, Tag, Values }; - QStringList tagsOrder; QJsonObject tags; + QStringList tagsOrder; QList events; int find(long long time) const; -- cgit v1.3