/**
- *Constructor of this class.
- *@param QWidget pointer to parent object. By default the value is NULL.
+ * Constructor of this class.
+ * @param QWidget pointer to parent object. By default the value is NULL.
*/
MeasureDialog::MeasureDialog(QWidget *parent) :
QDialog(parent),
}
/**
- *This slot function is called when timer gives timeout signal.
+ * This slot function is called when timer gives timeout signal. Checks current speed
+ * and stores times in measure class.
*/
void MeasureDialog::after_timeout()
{
speed = accelerometer->getCurrentSpeed();
//speed = speed +10;
- if(speed > 9.7 && speed < 10.3)
+ if (speed > 9.7 && speed < 10.3)
{
measures->setTime10kmh(time);
}
}
// If speed is over 100 km/h emits speedAchieved() signal and close this dialog.
- if (speed >= 100.0)
+ if (speed >= 40.0)
{
timer->stop();
accelerometer->stop();
}
/**
- *This slot function is called when Abort button is clicked.
+ * This slot function is called when Abort button is clicked.
*/
void MeasureDialog::on_pushButtonAbort_clicked()
{
this->close();
}
+/**
+ * Initializes measures class's member variables.
+ */
void MeasureDialog::initializeMeasures()
{
measures->setTime10kmh(0);