projects
/
speedfreak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Custom button class added.
[speedfreak]
/
Client
/
resultdialog.cpp
diff --git
a/Client/resultdialog.cpp
b/Client/resultdialog.cpp
index
659f037
..
37cf348
100644
(file)
--- a/
Client/resultdialog.cpp
+++ b/
Client/resultdialog.cpp
@@
-2,6
+2,7
@@
* CarMainWindow main class
*
* @author Janne Änäkkälä <janne.anakkala@fudeco.com>
* 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
*/
* @copyright (c) 2010 Speed Freak team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
@@
-68,6
+69,9
@@
ResultDialog::ResultDialog(QWidget *parent) :
timeArray[i] = 0;
}
timeArray[i] = 0;
}
+ //Clear info label
+ ui->labelInfoToUser->setText("");
+
if (loginSaved())
{
ui->pushButtonSend->setEnabled(true);
if (loginSaved())
{
ui->pushButtonSend->setEnabled(true);
@@
-75,6
+79,7
@@
ResultDialog::ResultDialog(QWidget *parent) :
else
{
ui->pushButtonSend->setEnabled(false);
else
{
ui->pushButtonSend->setEnabled(false);
+ ui->labelInfoToUser->setText("You're not logged! Please register or log in and accelerate again.");
}
}
}
}
@@
-310,16
+315,18
@@
void ResultDialog::on_pushButtonNew_clicked()
}
resultString = "";
this->close();
}
resultString = "";
this->close();
+ emit rejected();
}
/**
* This slot function emits sendresult signal for sending results to server when
* send results -button has been 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()
{
*/
void ResultDialog::on_pushButtonSend_clicked()
{
- emit sendresult();
- //emit sendresult(timeArray[this->getTargetChoice()]);
+ ui->pushButtonSend->setEnabled(false);
+ emit sendresult(timeArray[this->getTargetChoice()]);
}
double ResultDialog::getResult()
}
double ResultDialog::getResult()
@@
-753,3
+760,11
@@
void ResultDialog::setLabelInfoToUser(QString infoText)
{
this->ui->labelInfoToUser->setText(infoText);
}
{
this->ui->labelInfoToUser->setText(infoText);
}
+
+/**
+ * This function enable send server button.
+ */
+void ResultDialog::setSendServerButtonEnabled()
+{
+ ui->pushButtonSend->setEnabled(true);
+}