Merge branch 'bugfix/categorylist'
[speedfreak] / Client / resultdialog.cpp
index 68eb7cf..e53db80 100644 (file)
@@ -2,6 +2,7 @@
  * 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
  */
@@ -76,6 +77,9 @@ ResultDialog::ResultDialog(QWidget *parent) :
     {
         ui->pushButtonSend->setEnabled(false);
     }
+
+    //Clear info label
+    ui->labelInfoToUser->setText("");
 }
 
 /**
@@ -315,12 +319,19 @@ void ResultDialog::on_pushButtonNew_clicked()
 /**
   * 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()]);
 }
 
+double ResultDialog::getResult()
+{
+    return timeArray[this->getTargetChoice()];
+}
+
 /**
   * This public function sets diagram's stem gap
   * @param pValue is the speed value which determines diagram gap's value
@@ -742,3 +753,8 @@ int ResultDialog::getTargetChoice()
     }
     return targetChoice;
 }
+
+void ResultDialog::setLabelInfoToUser(QString infoText)
+{
+    this->ui->labelInfoToUser->setText(infoText);
+}