summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-08-16 18:03:26 +0200
committerOrangerot <purple@orangerot.dev>2024-08-16 18:03:26 +0200
commit4c5cd95b85c42b669691dd12d635a72ad6f99645 (patch)
treeb58468f4fea2932f34a74fe34162a682834e7ee8 /src/model
parentf87bc73c3f7ff003444ce2b0fef2229f501bd1d4 (diff)
feat(SportFilter): search/filter events from TextField
Diffstat (limited to 'src/model')
-rw-r--r--src/model/FilterModel.cpp8
-rw-r--r--src/model/FilterModel.h14
2 files changed, 22 insertions, 0 deletions
diff --git a/src/model/FilterModel.cpp b/src/model/FilterModel.cpp
new file mode 100644
index 0000000..7fe07d6
--- /dev/null
+++ b/src/model/FilterModel.cpp
@@ -0,0 +1,8 @@
+#include "FilterModel.h"
+#include "Sport.h"
+
+FilterModel::FilterModel(QObject *parent)
+ : QSortFilterProxyModel(parent) {
+ setFilterRole(SportModel::Role::EventName);
+ }
+
diff --git a/src/model/FilterModel.h b/src/model/FilterModel.h
new file mode 100644
index 0000000..0bd1fbb
--- /dev/null
+++ b/src/model/FilterModel.h
@@ -0,0 +1,14 @@
+#include <QSortFilterProxyModel>
+
+#pragma once
+
+class FilterModel : public QSortFilterProxyModel
+{
+ Q_OBJECT
+
+public:
+ FilterModel(QObject *parent = nullptr);
+
+private:
+};
+