summaryrefslogtreecommitdiff
path: root/src/model/EventInfo.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-16 22:19:42 +0200
committerSteru <jerrydream111@gmail.com>2024-08-16 22:19:42 +0200
commit100e73ec28dbc1f307c540cbd4b5a04dfe5922f8 (patch)
tree20ec2b68ae44f7e0e0cec62b605696301898072e /src/model/EventInfo.h
parentb0063e96410ff0c407e2daead4cf53252568b542 (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