Added license information to all source codes.
[speedfreak] / Client / measuredialog.cpp
index efec02b..cba4877 100644 (file)
@@ -1,10 +1,17 @@
+/*
+ * CarMainWindow main class
+ *
+ * @author     Janne Änäkkälä <janne.anakkala@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
 #include "measuredialog.h"
 #include "ui_measuredialog.h"
 
-
 /**
-  *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),
@@ -49,7 +56,8 @@ void MeasureDialog::changeEvent(QEvent *e)
 }
 
 /**
-  *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()
 {
@@ -59,7 +67,7 @@ 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);
     }
@@ -115,7 +123,7 @@ void MeasureDialog::after_timeout()
     }
 
     // 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();
@@ -139,7 +147,7 @@ void MeasureDialog::after_timeout()
 }
 
 /**
-  *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()
 {
@@ -160,6 +168,9 @@ void MeasureDialog::on_pushButtonAbort_clicked()
     this->close();
 }
 
+/**
+  * Initializes measures class's member variables.
+  */
 void MeasureDialog::initializeMeasures()
 {
     measures->setTime10kmh(0);