#ifndef ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H #define ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H #include #include #include #include #include using namespace std; class Competitor { Q_OBJECT Q_PROPERTY(int code READ code) Q_PROPERTY(QString name READ name) Q_PROPERTY(QString noc READ noc) public: Competitor() { this->code = 0; this->name = "na"; this->noc = "---"; } Competitor(const Competitor &competitor) { this->code = competitor.code; this->name = competitor.name; this->noc = competitor.noc; } Competitor(const QJsonObject &competitor) { setCompetitor(competitor); } int getCode() { return this->code; } QString getName() { return this->name; } QString getNOC() { return this->noc; } bool setCompetitor(const QJsonObject &competitor); private: int code; QString name; QString noc; }; #endif //ITAT_CHALLANGE_OLYMPICS_COMPETITOR_H