summaryrefslogtreecommitdiff
path: root/src/model/Sport.h
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-08-16 07:06:05 +0200
committerOrangerot <purple@orangerot.dev>2024-08-16 07:06:05 +0200
commiteb61690873e234ea28a3f437fb7211c773a449fe (patch)
treed687ed8ec12de3cef8a24e0c54d30f70d2dc5e82 /src/model/Sport.h
parentc09350b7c9adf6327f0a0475c897a71dd23b6cae (diff)
feat(EventInfo): display EventInfo with List of Competitors
Diffstat (limited to 'src/model/Sport.h')
-rw-r--r--src/model/Sport.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/model/Sport.h b/src/model/Sport.h
index 0f183b7..be74a51 100644
--- a/src/model/Sport.h
+++ b/src/model/Sport.h
@@ -8,6 +8,7 @@
#include <QJsonObject>
#include <QJsonDocument>
#include <QString>
+#include "EventInfo.h"
using namespace std;
@@ -16,7 +17,8 @@ class SportModel : public QAbstractListModel {
public:
enum Role {
- SportName = Qt::UserRole + 1
+ EventName = Qt::UserRole + 1,
+ Competitors
};
explicit SportModel(QObject *parent = nullptr);
@@ -29,7 +31,7 @@ class SportModel : public QAbstractListModel {
void parseData();
private:
- QList<QString> m_sportList;
+ QList<EventInfo*> m_sportList;
QNetworkAccessManager m_networkManager;
QNetworkReply *m_reply = nullptr;
};
@@ -111,4 +113,4 @@ private:
};
-#endif //ITAT_CHALLANGE_OLYMPICS_SPORT_H
+#endif