summaryrefslogtreecommitdiff
path: root/src/discipline/Sport.h
diff options
context:
space:
mode:
authorSteru <jerrydream111@gmail.com>2024-08-05 14:47:45 +0200
committerSteru <jerrydream111@gmail.com>2024-08-05 14:47:45 +0200
commitc539242efa11538e5e3f91bf3ff2f0de1c526bed (patch)
treece9bbb284d2d58aef32bb916e6232d547a6f6a6f /src/discipline/Sport.h
parent2476684e3c0798fbc9979d436c4288216400d87c (diff)
Added method to reverse order and statistic method.
Diffstat (limited to 'src/discipline/Sport.h')
-rw-r--r--src/discipline/Sport.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/discipline/Sport.h b/src/discipline/Sport.h
index 9175ad0..147f6e8 100644
--- a/src/discipline/Sport.h
+++ b/src/discipline/Sport.h
@@ -33,6 +33,10 @@ public:
void sortByName(QJsonArray &competitors);
void sortByCountry(QJsonArray &competitors);
void sortByResult(QJsonArray &competitors);
+ void reverseOrder(QJsonArray &competitors);
+
+ // statistic function(s)
+ void addRelativeToFirst(QJsonArray &competitors);
void setDiscipline(QJsonObject discipline) {
this->discipline = QJsonObject(discipline);
@@ -80,6 +84,8 @@ private:
bool validateDiscipline();
QJsonObject createCompetitorWithMedals(QJsonObject medalComp);
+ float calcRelativeStat(QString ref, QString val);
+
};