added lap timer in traing- and racemode
This commit is contained in:
@@ -181,6 +181,10 @@ void WindowRace::ReturnPress() {
|
||||
}
|
||||
|
||||
void WindowRace::prepareNextRace() {
|
||||
|
||||
this->ui->lDeaLaps->setText("0");
|
||||
this->ui->lShellLaps->setText("0");
|
||||
|
||||
this->firstTimeShell = true;
|
||||
this->firstTimeDea = true;
|
||||
|
||||
@@ -475,11 +479,16 @@ void WindowRace::shellSlot(int time, int sector) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// count valid laps
|
||||
int validLaps = 0;
|
||||
for (auto vec : VecShell) {
|
||||
if (vec.size() == 3) {
|
||||
validLaps += 1;
|
||||
}
|
||||
}
|
||||
this->ui->lShellLaps->setText(QString::number(validLaps));
|
||||
break;
|
||||
}
|
||||
if (sector == 3) {
|
||||
}
|
||||
|
||||
ui->lWShellTime->scrollToBottom();
|
||||
}
|
||||
@@ -582,6 +591,14 @@ void WindowRace::deaSlot(int time, int sector) {
|
||||
this->db->setData(statement.toStdString());
|
||||
ui->lWDeaTime->scrollToBottom();
|
||||
}
|
||||
// count valid laps
|
||||
int validLaps = 0;
|
||||
for (auto vec : VecDea) {
|
||||
if (vec.size() == 3) {
|
||||
validLaps += 1;
|
||||
}
|
||||
}
|
||||
this->ui->lDeaLaps->setText(QString::number(validLaps));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user