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.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'event_list.cpp') diff --git a/event_list.cpp b/event_list.cpp index 2654bef..a1e88a5 100644 --- a/event_list.cpp +++ b/event_list.cpp @@ -58,11 +58,11 @@ bool EventList::setData(const QModelIndex& index, const QVariant& value, int rol return true; } -int EventList::insert(const int time) +int EventList::insert(const QString& tag, const int time) { int row = time == -1 ? rowCount() : find(time); beginInsertRows(QModelIndex{}, row, row); - events.insert(row, {time}); + events.insert(row, {time, tag}); endInsertRows(); return row; } -- cgit v1.3