diff options
Diffstat (limited to 'src/model/EventInfo.h')
-rw-r--r-- | src/model/EventInfo.h | 23 |
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 |