diff options
Diffstat (limited to 'src/model/SportModel.h')
-rw-r--r-- | src/model/SportModel.h | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/model/SportModel.h b/src/model/SportModel.h index 5c3bad1..808a1cc 100644 --- a/src/model/SportModel.h +++ b/src/model/SportModel.h @@ -1,7 +1,5 @@ #pragma once -#include "MedalWinner.h" -#include "CompetitorWithResults.h" #include <QAbstractListModel> #include <QNetworkAccessManager> #include <qcontainerfwd.h> @@ -40,23 +38,22 @@ public: virtual QHash<int, QByteArray> roleNames() const override; set<QString> getCategories(); - QList<CompetitorWithResults*> getCompetitorsByCategory(QString category); // TODO ref instead of obj - QList<MedalWinner*> getCompetitorsWithMedal(); // TODO ref instead of obj + map<QString, map<QString, int>> getMedalsOfCompetitors(); // filter to change the current competitor list - void lastName(QList<Competitor*> &competitors); // TODO ref instead of obj - void filterByName(QList<Competitor*> &competitors, QString name); // TODO ref instead of obj - void filterByCountry(QList<Competitor*> &competitors, QString nocShort); // TODO ref instead of obj + void lastName(QList<Competitor*> &competitors); + void filterByName(QList<Competitor*> &competitors, QString name); + void filterByCountry(QList<Competitor*> &competitors, QString nocShort); // sort functions to change the order of the current competitor list - void sortByName(QList<Competitor*> &competitors); // TODO ref instead of obj - void sortByCountry(QList<Competitor*> &competitors); // TODO ref instead of obj - void sortByResult(QList<CompetitorWithResults*> &competitors); // TODO ref instead of obj - void sortByMedals(QList<MedalWinner*> &competitors); // TODO ref instead of obj - void reverseOrder(QList<Competitor*> &competitors); // TODO ref instead of obj +// void sortByName(QList<Competitor*> &competitors); +// void sortByCountry(QList<Competitor*> &competitors); +// void sortByResult(QList<Competitor*> &competitors); +// void sortByMedals(QList<Competitor*> &competitors); + void reverseOrder(QList<Competitor*> &competitors); // statistic function - void addRelativeToFirst(QList<CompetitorWithResults*> &competitors); // TODO ref instead of obj + void addRelativeToFirst(QList<Competitor*> &competitors); QString discipline() const; void setDiscipline(const QString &discipline); @@ -77,8 +74,6 @@ private: void filterCompetitors(QList<Competitor*> &competitors, QString filter); // TODO ref instead of obj - QJsonObject createCompetitorWithMedals(QJsonObject medalComp); - // function for statistic calculation float calcRelativeStat(QString ref, QString val); |