const int DIAGRAMGAP5S = 80;
const int DIAGRAMGAP10S = 40;
+const int DIAGRAMGAP16S = 25;
const int DIAGRAMGAP20S = 20;
const QPoint diagramStemStart(70, 330);
*/
void ResultDialog::setTimeAxelLength(int pChoice)
{
- if (timeArray[pChoice] <= 5)
+ if (timeArray[pChoice] <= 5.0)
{
timeAxelLength = 5;
}
- else if (timeArray[pChoice] <= 10)
+ else if (timeArray[pChoice] <= 10.0 && timeArray[pChoice] > 5.0)
{
timeAxelLength = 10;
}
- else if (timeArray[pChoice] <= 15)
+ else if (timeArray[pChoice] <= 16.0 && timeArray[pChoice] > 10.0)
{
- timeAxelLength = 15;
+ timeAxelLength = 16;
}
else
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 && pTime > 5.0)
{
this->diagramGapHorizontal = DIAGRAMGAP10S;
}
+ else if (pTime <= 16.0 && pTime > 10.0)
+ {
+ this->diagramGapHorizontal = DIAGRAMGAP16S;
+ }
+
else
{
this->diagramGapHorizontal = DIAGRAMGAP20S;
}
return targetChoice;
}
-
-void ResultDialog::setLabelInfoToUser(QString infoText)
-{
- this->ui->labelInfoToUser->setText(infoText);
-}
-