projects
/
speedfreak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bugfix/categorylist'
[speedfreak]
/
Client
/
resultdialog.cpp
diff --git
a/Client/resultdialog.cpp
b/Client/resultdialog.cpp
index
5f2ab11
..
e53db80
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
*/
@@
-29,6
+30,7
@@
const int DIAGRAMGAP100KMH = 30;
const int DIAGRAMGAP5S = 80;
const int DIAGRAMGAP10S = 40;
const int DIAGRAMGAP5S = 80;
const int DIAGRAMGAP10S = 40;
+const int DIAGRAMGAP16S = 25;
const int DIAGRAMGAP20S = 20;
const QPoint diagramStemStart(70, 330);
const int DIAGRAMGAP20S = 20;
const QPoint diagramStemStart(70, 330);
@@
-75,6
+77,9
@@
ResultDialog::ResultDialog(QWidget *parent) :
{
ui->pushButtonSend->setEnabled(false);
}
{
ui->pushButtonSend->setEnabled(false);
}
+
+ //Clear info label
+ ui->labelInfoToUser->setText("");
}
/**
}
/**
@@
-277,19
+282,19
@@
void ResultDialog::setTimesIntoLabels()
*/
void ResultDialog::setTimeAxelLength(int pChoice)
{
*/
void ResultDialog::setTimeAxelLength(int pChoice)
{
- if (timeArray[pChoice] <= 5)
+ if (timeArray[pChoice] <= 5.0)
{
timeAxelLength = 5;
}
{
timeAxelLength = 5;
}
- else if (timeArray[pChoice] <= 10)
+ else if (timeArray[pChoice] <= 10.0 && timeArray[pChoice] > 5.0)
{
timeAxelLength = 10;
}
{
timeAxelLength = 10;
}
- else if (timeArray[pChoice] <= 15)
+ else if (timeArray[pChoice] <= 16.0 && timeArray[pChoice] > 10.0)
{
{
- timeAxelLength = 15;
+ timeAxelLength = 16;
}
else
}
else
@@
-314,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.
/**
* 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()]);
}
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
/**
* This public function sets diagram's stem gap
* @param pValue is the speed value which determines diagram gap's value
@@
-388,16
+400,21
@@
void ResultDialog::setEnd(int pValue)
void ResultDialog::setValue(int pSpeed, double pTime)
{
//timeArray[0] = 0;
void ResultDialog::setValue(int pSpeed, double pTime)
{
//timeArray[0] = 0;
- if (floor(pTime) <= 5)
+ if (pTime <= 5.0)
{
this->diagramGapHorizontal = DIAGRAMGAP5S;
}
{
this->diagramGapHorizontal = DIAGRAMGAP5S;
}
- else if (floor(pTime) <= 10)
+ else if (pTime <= 10.0 && pTime > 5.0)
{
this->diagramGapHorizontal = DIAGRAMGAP10S;
}
{
this->diagramGapHorizontal = DIAGRAMGAP10S;
}
+ else if (pTime <= 16.0 && pTime > 10.0)
+ {
+ this->diagramGapHorizontal = DIAGRAMGAP16S;
+ }
+
else
{
this->diagramGapHorizontal = DIAGRAMGAP20S;
else
{
this->diagramGapHorizontal = DIAGRAMGAP20S;
@@
-741,4
+758,3
@@
void ResultDialog::setLabelInfoToUser(QString infoText)
{
this->ui->labelInfoToUser->setText(infoText);
}
{
this->ui->labelInfoToUser->setText(infoText);
}
-