* CarMainWindow main class
*
* @author Janne Änäkkälä <janne.anakkala@fudeco.com>
+ * @author Toni Jussila <toni.jussila@fudeco.com>
* @copyright (c) 2010 Speed Freak team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
{
ui->pushButtonSend->setEnabled(false);
}
+
+ //Clear info label
+ ui->labelInfoToUser->setText("");
}
/**
*/
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
/**
* This slot function emits sendresult signal for sending results to server when
* send results -button has been clicked.
+ * Emit accrealtimedialog sendresult.
*/
void ResultDialog::on_pushButtonSend_clicked()
{
- emit sendresult();
- //emit sendresult(timeArray[this->getTargetChoice()]);
+ //emit sendresult();
+ emit sendresult(timeArray[this->getTargetChoice()]);
}
double ResultDialog::getResult()
this->diagramGapHorizontal = DIAGRAMGAP5S;
}
- else if (pTime <= 10.0)
+ else if (pTime <= 10.0 && pTime > 5.0)
{
this->diagramGapHorizontal = DIAGRAMGAP10S;
}
- else if (pTime <= 16.0)
+ else if (pTime <= 16.0 && pTime > 10.0)
{
this->diagramGapHorizontal = DIAGRAMGAP16S;
}
{
this->ui->labelInfoToUser->setText(infoText);
}
-