From a59cf5da56374b33e497a9f23a8985d74eb73212 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janne=20=C3=84n=C3=A4kk=C3=A4l=C3=A4?= Date: Wed, 31 Mar 2010 13:05:05 +0300 Subject: [PATCH] Bug fixing and added new scale for time axis. --- Client/resultdialog.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Client/resultdialog.cpp b/Client/resultdialog.cpp index a9c440c..7327b4c 100644 --- a/Client/resultdialog.cpp +++ b/Client/resultdialog.cpp @@ -29,6 +29,7 @@ const int DIAGRAMGAP100KMH = 30; const int DIAGRAMGAP5S = 80; const int DIAGRAMGAP10S = 40; +const int DIAGRAMGAP16S = 25; const int DIAGRAMGAP20S = 20; const QPoint diagramStemStart(70, 330); @@ -388,16 +389,21 @@ void ResultDialog::setEnd(int pValue) void ResultDialog::setValue(int pSpeed, double pTime) { //timeArray[0] = 0; - if (floor(pTime) <= 5) + if (pTime <= 5.0) { this->diagramGapHorizontal = DIAGRAMGAP5S; } - else if (floor(pTime) <= 10) + else if (pTime <= 10.0) { this->diagramGapHorizontal = DIAGRAMGAP10S; } + else if (pTime <= 16.0) + { + this->diagramGapHorizontal = DIAGRAMGAP16S; + } + else { this->diagramGapHorizontal = DIAGRAMGAP20S; -- 1.7.9.5