summaryrefslogtreecommitdiff
path: root/src/model/EventInfo.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-16 22:19:42 +0200
committerOrangerot <purple@orangerot.dev>2024-08-26 11:19:38 +0200
commitb672b4698c721fa6dfd5dff965e08059d51bddda (patch)
treed81b53ec11376d14847e129335e89901995b3d13 /src/model/EventInfo.h
parentcd69d722717c5ae40360f7cec22e191aa735b675 (diff)
Compacted competitors into one object, deleted API class (now in sportmodel).
Diffstat (limited to 'src/model/EventInfo.h')
-rw-r--r--src/model/EventInfo.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/model/EventInfo.h b/src/model/EventInfo.h
index 7f937b2..def3885 100644
--- a/src/model/EventInfo.h
+++ b/src/model/EventInfo.h
@@ -1,28 +1,27 @@
-#ifndef ITAT_CHALLANGE_OLYMPICS_EVENT_H
-#define ITAT_CHALLANGE_OLYMPICS_EVENT_H
+#pragma once
+#include "Competitor.h"
#include <QObject>
+#include <QAbstractListModel>
#include <qqml.h>
-class EventInfo : QObject {
+class EventInfo : public QObject {
Q_OBJECT
// QML_ELEMENT
- Q_PROPERTY(QString eventName READ eventName WRITE setEventName);
- Q_PROPERTY(QList<QString> competitors READ competitors WRITE setCompetitors);
+ Q_PROPERTY(QString eventName READ eventName CONSTANT)
+ Q_PROPERTY(QList<Competitor*> competitors READ competitors CONSTANT)
- public:
+public:
explicit EventInfo(QObject *parent = nullptr);
QString eventName() const;
void setEventName(const QString &newEventName);
- QList<QString> competitors() const;
- void setCompetitors(const QList<QString> &newCompetitors);
+ QList<Competitor*> competitors() const;
+ void setCompetitors(const QList<Competitor*> &newCompetitors);
- private:
+private:
QString m_eventName;
- QList<QString> m_competitors;
+ QList<Competitor*> m_competitors;
};
-
-#endif