X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=src%2Fharbour-pedalo.cpp;h=f19a8fcc0dd56df91b931f93cf487a1af889fa72;hp=abbe2bef00d177350dac6ad105a1f149c7e62217;hb=54ab3ebfadf8cb258561a4641249da8c6469dc0f;hpb=76b5f460f9a5052571d730918b2ee778753f4c59 diff --git a/src/harbour-pedalo.cpp b/src/harbour-pedalo.cpp index abbe2be..f19a8fc 100644 --- a/src/harbour-pedalo.cpp +++ b/src/harbour-pedalo.cpp @@ -12,6 +12,10 @@ #include "settings.h" #include "imageprovider.h" #include "graph.h" +#include "statsweekdayave.h" +#include "statshourjourneys.h" +#include "statsweekdaycongestion.h" +#include "statshourcongestion.h" #include "harbour-pedalo.h" @@ -45,19 +49,18 @@ int main(int argc, char *argv[]) Settings::getInstance().loadSettings(); StatsModel statsmodel; - Stats stats; - QList data{0.1, 0.1, 0.2}; - QStringList labels{"A", "B", "C"}; - stats.setValues(data); - stats.setLabels(labels); - statsmodel.addStats(stats); - - data = QList{0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.5}; - labels = QStringList{"M", "T", "W", "Th", "F", "S", "Su"}; - stats.setValues(data); - stats.setLabels(labels); - statsmodel.addStats(stats); + StatsWeekdayAve statsweekdayave(&journeys); + statsmodel.addStats(statsweekdayave); + + StatsHourJourneys statshourjourneys(&journeys); + statsmodel.addStats(statshourjourneys); + + StatsWeekdayCongestion statsweekdaycongestion(&journeys); + statsmodel.addStats(statsweekdaycongestion); + + StatsHourCongestion statshourcongestion(&journeys); + statsmodel.addStats(statshourcongestion); QFile file; file.setFileName(Settings::getConfigDir() + "/journeys.csv");