From b672b4698c721fa6dfd5dff965e08059d51bddda Mon Sep 17 00:00:00 2001 From: Steru Date: Fri, 16 Aug 2024 22:19:42 +0200 Subject: Compacted competitors into one object, deleted API class (now in sportmodel). --- src/model/EventInfo.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/model/EventInfo.h') 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 +#include #include -class EventInfo : QObject { +class EventInfo : public QObject { Q_OBJECT // QML_ELEMENT - Q_PROPERTY(QString eventName READ eventName WRITE setEventName); - Q_PROPERTY(QList competitors READ competitors WRITE setCompetitors); + Q_PROPERTY(QString eventName READ eventName CONSTANT) + Q_PROPERTY(QList competitors READ competitors CONSTANT) - public: +public: explicit EventInfo(QObject *parent = nullptr); QString eventName() const; void setEventName(const QString &newEventName); - QList competitors() const; - void setCompetitors(const QList &newCompetitors); + QList competitors() const; + void setCompetitors(const QList &newCompetitors); - private: +private: QString m_eventName; - QList m_competitors; + QList m_competitors; }; - -#endif -- cgit v1.2.3