added ui tweaks + fix for accepting wrong laptimes

This commit is contained in:
2017-12-26 20:26:30 +01:00
parent 8fea1a1108
commit 2a1a082a30
13 changed files with 443 additions and 149 deletions

View File

@@ -129,18 +129,9 @@ void Training::shellSlot(int time, int sector) {
timeModelShell = new TimeModel(VecShell, minSecTime, this);
this->ui->lWShellTime->setModel(timeModelShell);
this->ui->lbridgeShellTop->setText(QString::number(
this->ui->lBridgeShellTop->setText(QString::number(
(double)QVectorHelper::getMinSec1(VecShell) / 1000));
theoreticalMinShell = 9999;
theoreticalMinShell = QVectorHelper::getMinSec1(VecShell) +
QVectorHelper::getMinSec2(VecShell) +
QVectorHelper::getMinSec3(VecShell);
deltaShell =
QVectorHelper::getMin(VecShell) - theoreticalMinShell;
this->ui->lDeltaTopTimeShell->setText(
QString::number((double)deltaShell / 1000));
break;
case 2:
if (VecShell.size() > 0) {
@@ -154,7 +145,7 @@ void Training::shellSlot(int time, int sector) {
}
}
this->ui->lbridgeShellTop->setText(QString::number(
this->ui->lStraightShellTop->setText(QString::number(
(double)QVectorHelper::getMinSec2(VecShell) / 1000));
break;
case 3:
@@ -185,9 +176,16 @@ void Training::shellSlot(int time, int sector) {
1000));
}
this->ui->lbridgeShellTop->setText(QString::number(
this->ui->lCurvesShellTop->setText(QString::number(
(double)QVectorHelper::getMinSec3(VecShell) / 1000));
theoreticalMinShell = 9999;
theoreticalMinShell = QVectorHelper::getMinSec1(VecShell) +
QVectorHelper::getMinSec2(VecShell) +
QVectorHelper::getMinSec3(VecShell);
deltaShell =
QVectorHelper::getMin(VecShell) - theoreticalMinShell;
this->ui->lDeltaTopTimeShell->setText(
QString::number((double)deltaShell / 1000));
break;
}
ui->lWShellTime->scrollToBottom();
@@ -220,7 +218,8 @@ void Training::deaSlot(int time, int sector) {
// cout << "Dea Sektor 1" << endl;
timeModelDea = new TimeModel(VecDea, minSecTime, this);
this->ui->lWDeaTime->setModel(timeModelDea);
this->ui->lBridgeDeaTop->setText(QString::number(
(double)QVectorHelper::getMinSec1(VecDea) / 1000));
break;
case 2:
if (VecDea.size() > 0) {
@@ -234,6 +233,8 @@ void Training::deaSlot(int time, int sector) {
else {
// VecDea[VecDea.size()-1].append(9999);
}
this->ui->lStraightDeaTop->setText(QString::number(
(double)QVectorHelper::getMinSec2(VecDea) / 1000));
}
break;
case 3:
@@ -265,6 +266,17 @@ void Training::deaSlot(int time, int sector) {
ui->lCurRoundDea->setText(QString::number(
(double)QVectorHelper::getCurTime(VecDea.last()) /
1000));
this->ui->lCurvesDeaTop->setText(QString::number(
(double)QVectorHelper::getMinSec3(VecDea) / 1000));
theoreticalMinDea = 9999;
theoreticalMinDea = QVectorHelper::getMinSec1(VecDea) +
QVectorHelper::getMinSec2(VecDea) +
QVectorHelper::getMinSec3(VecDea);
deltaDea =
QVectorHelper::getMin(VecDea) - theoreticalMinDea;
this->ui->lDeltaTopTimeDea->setText(
QString::number((double)deltaDea / 1000));
}
break;
}