From df2cd325395886868e64c4d96ba7a959ef7d204e Mon Sep 17 00:00:00 2001 From: Steru Date: Thu, 15 Aug 2024 20:41:08 +0200 Subject: Reworked Sport class to work with QObjects instead of JSON objects. --- src/model/CompetitorWithResults.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/model/CompetitorWithResults.h') diff --git a/src/model/CompetitorWithResults.h b/src/model/CompetitorWithResults.h index a313db2..f57b773 100644 --- a/src/model/CompetitorWithResults.h +++ b/src/model/CompetitorWithResults.h @@ -15,6 +15,7 @@ class CompetitorWithResults : public Competitor { Q_PROPERTY(QString mark READ mark) Q_PROPERTY(QString medalType READ medalType) + Q_PROPERTY(QString statistic READ statistic WRITE setStatistic) public: CompetitorWithResults() : Competitor() { @@ -34,15 +35,18 @@ public: } bool setResults(const QJsonObject &results); + void setStatistic(QString stat) { this->statistic = stat; } QString getMark() { return this->mark; } QString getMedalType() { return this->medalType; } + QString getStatistic() { return this->statistic; } static bool compare(CompetitorWithResults lComp, CompetitorWithResults rComp); private: QString mark; QString medalType; + QString statistic; }; -- cgit v1.2.3