Merge branch 'development/GPS'
authorToni Jussila <toni.jussila@fudeco.com>
Mon, 22 Mar 2010 12:28:52 +0000 (14:28 +0200)
committerToni Jussila <toni.jussila@fudeco.com>
Mon, 22 Mar 2010 12:28:52 +0000 (14:28 +0200)
1  2 
Client/carmainwindow.cpp
Client/carmainwindow.h

@@@ -705,33 -779,17 +706,46 @@@ void CarMainWindow::gpsStatus(
              ui->labelRouteTabGPSStatus->setText("Waiting for GPS");
          }
      }
+     ui->labelRouteTabSpeed->setText(QString::number(location->getSpeed()));
+ }
+ void CarMainWindow::on_startRecPushButton_clicked()
+ {
+     ui->labelRouteTabRecStatus->setText("Recording started");
+     gpsData->startRouteRecording(ui->labelRouteTabGPSTime->text());
+ }
+ void CarMainWindow::on_stopRecPushButton_clicked()
+ {
+     ui->labelRouteTabRecStatus->setText("Recording stopped");
+     gpsData->stopRouteRecording(ui->labelRouteTabGPSTime->text());
  }
 +
 +/**
 +  *Sets time axis right way in result dialog and shows target speed result.
 +  *@param double pTime is the target speed result time which is shown to the user.
 +  */
 +void CarMainWindow::setTimeAxisGapAndShowResult(double pTime)
 +{
 +    ui->pushButtonShowResultDialog->setEnabled(true);
 +    ui->pushButtonSendResult->setEnabled(true);
 +    QString timeInteger;
 +    timeInteger.setNum(pTime);
 +    ui->labelMeasureTabResult->show();
 +    ui->labelMeasureTabResult->setText(timeInteger);
 +
 +    if (floor(pTime) <= 5)
 +    {
 +        result->setDiagramGapHorizontal(80);
 +    }
 +
 +    else if (floor(pTime) <= 10)
 +    {
 +        result->setDiagramGapHorizontal(40);
 +    }
 +
 +    else
 +    {
 +        result->setDiagramGapHorizontal(20);
 +    }
 +}
Simple merge