* 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
*/
timeArray[i] = 0;
}
+ //Clear info label
+ ui->labelInfoToUser->setText("");
+
if (loginSaved())
{
ui->pushButtonSend->setEnabled(true);
else
{
ui->pushButtonSend->setEnabled(false);
+ ui->labelInfoToUser->setText("You're not logged! Please register or log in and accelerate again.");
}
}
}
resultString = "";
this->close();
+ emit rejected();
}
/**
* 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()]);
+ ui->pushButtonSend->setEnabled(false);
+ emit sendresult(timeArray[this->getTargetChoice()]);
}
double ResultDialog::getResult()
}
return targetChoice;
}
+
+void ResultDialog::setLabelInfoToUser(QString infoText)
+{
+ this->ui->labelInfoToUser->setText(infoText);
+}
+
+/**
+ * This function enable send server button.
+ */
+void ResultDialog::setSendServerButtonEnabled()
+{
+ ui->pushButtonSend->setEnabled(true);
+}