summaryrefslogtreecommitdiff
path: root/src/model/CompetitorWithResults.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-15 20:41:08 +0200
committerSteru <jerrydream111@gmail.com>2024-08-16 15:54:39 +0200
commitc527aec94dafdf8c05cc9c0e822681a748790518 (patch)
treea3acd9fb9bb2a63b660134250c8058ecdf71e57b /src/model/CompetitorWithResults.h
parent5f4431e19c0b6c50c7f24ce040bcbcdd40b7a13c (diff)
Reworked Sport class to work with QObjects instead of JSON objects.
Diffstat (limited to 'src/model/CompetitorWithResults.h')
-rw-r--r--src/model/CompetitorWithResults.h4
1 files changed, 4 insertions, 0 deletions
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;
};