X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=src%2Fstatsweekdayave.cpp;h=7d4987c7455bdd3d5b8c23a8ebcde2dd52a33e3d;hp=63e595e185da02327943a2dbf45b3ba8589801e6;hb=HEAD;hpb=dc14479d561196e19417c4ecf78e847ec4b43b7c diff --git a/src/statsweekdayave.cpp b/src/statsweekdayave.cpp index 63e595e..7d4987c 100644 --- a/src/statsweekdayave.cpp +++ b/src/statsweekdayave.cpp @@ -1,5 +1,3 @@ -#include - #include "statsweekdayave.h" StatsWeekdayAve::StatsWeekdayAve(JourneyModel * journeys) : @@ -15,8 +13,7 @@ void StatsWeekdayAve::update() { unsigned int count[7]; int pos; - qDebug() << "Calculating values"; - values.clear(); + barvalues.clear(); for (pos = 0; pos < 7; pos++) { duration[pos] = 0.0; @@ -41,12 +38,8 @@ void StatsWeekdayAve::update() { if (result > maxval) { maxval = result; } - values << result; + barvalues << result; } - step = qRound(maxval / 5.0); - - qDebug() << "Calculated values"; + step = maxval > 5.0 ? qRound(maxval / 5.0) : (maxval / 5.0); } - -