diff options
author | Orangerot <purple@orangerot.dev> | 2024-08-16 07:06:05 +0200 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2024-08-16 07:06:05 +0200 |
commit | eb61690873e234ea28a3f437fb7211c773a449fe (patch) | |
tree | d687ed8ec12de3cef8a24e0c54d30f70d2dc5e82 /src/model/EventInfo.h | |
parent | c09350b7c9adf6327f0a0475c897a71dd23b6cae (diff) |
feat(EventInfo): display EventInfo with List of Competitors
Diffstat (limited to 'src/model/EventInfo.h')
-rw-r--r-- | src/model/EventInfo.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/model/EventInfo.h b/src/model/EventInfo.h new file mode 100644 index 0000000..7f937b2 --- /dev/null +++ b/src/model/EventInfo.h @@ -0,0 +1,28 @@ +#ifndef ITAT_CHALLANGE_OLYMPICS_EVENT_H +#define ITAT_CHALLANGE_OLYMPICS_EVENT_H + +#include <QObject> +#include <qqml.h> + +class EventInfo : QObject { + Q_OBJECT + // QML_ELEMENT + + Q_PROPERTY(QString eventName READ eventName WRITE setEventName); + Q_PROPERTY(QList<QString> competitors READ competitors WRITE setCompetitors); + + public: + explicit EventInfo(QObject *parent = nullptr); + + QString eventName() const; + void setEventName(const QString &newEventName); + + QList<QString> competitors() const; + void setCompetitors(const QList<QString> &newCompetitors); + + private: + QString m_eventName; + QList<QString> m_competitors; +}; + +#endif |