diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2021-09-05 21:16:46 +0200 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2021-09-16 20:33:33 +0200 |
| commit | 8d44150598a4e04a751b7df0d8c91ea29099e10e (patch) | |
| tree | 7ff80ba2ea06bd8fa7b1bd0b61298cf86c0f3b85 /event_list.h | |
| parent | cb76fedcbc8e419e2b945baa56ac3f986a9e79a3 (diff) | |
Implement filter
Add a proxy model class with filter logic, and use it as the model for
events ListView.
Diffstat (limited to 'event_list.h')
| -rw-r--r-- | event_list.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<Event> events; int find(long long time) const; |
