summaryrefslogtreecommitdiff
path: root/src/model/MedalWinner.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-16 22:19:42 +0200
committerOrangerot <purple@orangerot.dev>2024-08-26 11:19:38 +0200
commitb672b4698c721fa6dfd5dff965e08059d51bddda (patch)
treed81b53ec11376d14847e129335e89901995b3d13 /src/model/MedalWinner.h
parentcd69d722717c5ae40360f7cec22e191aa735b675 (diff)
Compacted competitors into one object, deleted API class (now in sportmodel).
Diffstat (limited to 'src/model/MedalWinner.h')
-rw-r--r--src/model/MedalWinner.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/model/MedalWinner.h b/src/model/MedalWinner.h
deleted file mode 100644
index 10d08bd..0000000
--- a/src/model/MedalWinner.h
+++ /dev/null
@@ -1,39 +0,0 @@
-
-#pragma once
-
-#include "Competitor.h"
-#include <QMap>
-#include <QJsonObject>
-
-#include <QAbstractListModel>
-
-class MedalWinner : public Competitor {
-
- Q_OBJECT
-
- Q_PROPERTY(int gold READ m_gold NOTIFY nGold)
- Q_PROPERTY(int silver READ m_silver NOTIFY nSilver)
- Q_PROPERTY(int bronze READ m_bronze NOTIFY nBronze)
-
-public:
- explicit MedalWinner(Competitor *parent) : Competitor(parent) {}
-
- bool setMedalWinner(const QJsonObject &competitor);
- void setMedalWinner(const MedalWinner &competitor);
-
- bool setMedals(const QJsonObject &medals);
-
- void setGold(int gold) { this->m_gold = gold; }
- void setSilver(int silver) { this->m_silver = silver; }
- void setBronze(int bronze) { this->m_bronze = bronze; }
-
- int getGold() { return m_gold; }
- int getSilver() { return m_silver; }
- int getBronze() { return m_bronze; }
-
- static bool compare(MedalWinner lComp, MedalWinner rComp);
-
-private:
- int m_gold, m_silver, m_bronze;
-
-};