cleanup
This commit is contained in:
@@ -466,7 +466,6 @@ int Result::getMinimum(int fahrerId, int bahnId, int rennId, int autoid,
|
||||
<< boost::lexical_cast<string>(bahnId);
|
||||
|
||||
try {
|
||||
cout << statement.str() << endl;
|
||||
vector<vector<QString>> res = this->db->getData2(statement.str(), 1);
|
||||
// filter impossible values
|
||||
vector<int> validTimes;
|
||||
|
||||
@@ -345,7 +345,8 @@ void WindowRace::countdownUpdate() {
|
||||
}
|
||||
else {
|
||||
ui->lCountdown->setText(timeWrapper(countdownValue));
|
||||
this->ui->pbTime->setValue(this->fahrzeit - countdownValue);
|
||||
this->ui->pbTime->setValue(this->fahrzeit -
|
||||
static_cast<int>(countdownValue));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -389,7 +390,8 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
ui->lWShellTime->setModel(this->timeModelShell);
|
||||
|
||||
this->ui->lBridgeShell->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec1(VecShell) / 1000));
|
||||
static_cast<double>(QVectorHelper::getMinSec1(VecShell)) /
|
||||
1000));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
@@ -408,7 +410,9 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
// TimeModel(VecShell, this);
|
||||
this->ui->lWShellTime->setModel(timeModelShell);
|
||||
this->ui->lStraightShell->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec2(VecShell) / 1000));
|
||||
static_cast<double>(
|
||||
QVectorHelper::getMinSec2(VecShell)) /
|
||||
1000));
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@@ -421,11 +425,13 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
if (QVectorHelper::getCurTime(VecShell.last()) <=
|
||||
QVectorHelper::getMin(VecShell)) {
|
||||
ui->lBestZeitShell->setText(QString::number(
|
||||
(double)QVectorHelper::getMin(VecShell) /
|
||||
static_cast<double>(
|
||||
QVectorHelper::getMin(VecShell)) /
|
||||
1000));
|
||||
}
|
||||
ui->lCurRoundTimeShell->setText(QString::number(
|
||||
(double)QVectorHelper::getCurTime(VecShell.last()) /
|
||||
static_cast<double>(
|
||||
QVectorHelper::getCurTime(VecShell.last())) /
|
||||
1000));
|
||||
|
||||
// update tableview
|
||||
@@ -440,7 +446,8 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
this->ui->lWShellTime->setModel(timeModelShell);
|
||||
|
||||
this->ui->lCurvesShell->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec3(VecShell) /
|
||||
static_cast<double>(
|
||||
QVectorHelper::getMinSec3(VecShell)) /
|
||||
1000));
|
||||
theoreticalMinShell = 9999;
|
||||
theoreticalMinShell =
|
||||
@@ -449,8 +456,8 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
QVectorHelper::getMinSec3(VecShell);
|
||||
deltaShell = QVectorHelper::getMin(VecShell) -
|
||||
theoreticalMinShell;
|
||||
this->ui->lDeltaShellTop->setText(
|
||||
QString::number((double)deltaShell / 1000));
|
||||
this->ui->lDeltaShellTop->setText(QString::number(
|
||||
static_cast<double>(deltaShell) / 1000));
|
||||
|
||||
if (VecShell.size() > 0) {
|
||||
int zeit =
|
||||
@@ -498,7 +505,8 @@ void WindowRace::deaSlot(int time, int sector) {
|
||||
this->ui->lWDeaTime->setModel(timeModelDea);
|
||||
|
||||
this->ui->lBridgeDea->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec1(VecDea) / 1000));
|
||||
static_cast<double>(QVectorHelper::getMinSec1(VecDea)) /
|
||||
1000));
|
||||
|
||||
break;
|
||||
case 2:
|
||||
@@ -509,7 +517,9 @@ void WindowRace::deaSlot(int time, int sector) {
|
||||
timeModelDea = new TimeModel(VecDea, minSecTime, this);
|
||||
this->ui->lWDeaTime->setModel(timeModelDea);
|
||||
this->ui->lStraightDea->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec2(VecDea) / 1000));
|
||||
static_cast<double>(
|
||||
QVectorHelper::getMinSec2(VecDea)) /
|
||||
1000));
|
||||
}
|
||||
else {
|
||||
// VecDea[VecDea.size()-1].append(9999);
|
||||
@@ -540,22 +550,25 @@ void WindowRace::deaSlot(int time, int sector) {
|
||||
if (QVectorHelper::getCurTime(VecDea.last()) <=
|
||||
QVectorHelper::getMin(VecDea)) {
|
||||
ui->lBestZeitDea->setText(QString::number(
|
||||
(double)QVectorHelper::getMin(VecDea) / 1000));
|
||||
static_cast<double>(QVectorHelper::getMin(VecDea)) /
|
||||
1000));
|
||||
}
|
||||
ui->lCurRoundDea->setText(QString::number(
|
||||
(double)QVectorHelper::getCurTime(VecDea.last()) /
|
||||
static_cast<double>(
|
||||
QVectorHelper::getCurTime(VecDea.last())) /
|
||||
1000));
|
||||
}
|
||||
|
||||
this->ui->lCurvesDea->setText(QString::number(
|
||||
(double)QVectorHelper::getMinSec3(VecDea) / 1000));
|
||||
static_cast<double>(QVectorHelper::getMinSec3(VecDea)) /
|
||||
1000));
|
||||
theoreticalMinDea = 9999;
|
||||
theoreticalMinDea = QVectorHelper::getMinSec1(VecDea) +
|
||||
QVectorHelper::getMinSec2(VecDea) +
|
||||
QVectorHelper::getMinSec3(VecDea);
|
||||
deltaDea = QVectorHelper::getMin(VecDea) - theoreticalMinDea;
|
||||
this->ui->lDeltaDeaTop->setText(
|
||||
QString::number((double)deltaDea / 1000));
|
||||
QString::number(static_cast<double>(deltaDea) / 1000));
|
||||
if (VecDea.size() > 0) {
|
||||
int zeit = QVectorHelper::getCurTime(VecDea.last());
|
||||
QString statement =
|
||||
|
||||
Reference in New Issue
Block a user