From 88b1b119dfa35f36b64d81dbe6c84f46d86455c5 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/MedalWinner.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/model/MedalWinner.h (limited to 'src/model/MedalWinner.h') 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 -#include - -#include - -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; - -}; -- cgit v1.2.3