From 87608bfec88539508d6ca6ade55ddfe2a6598829 Mon Sep 17 00:00:00 2001 From: Johannes Paehr Date: Wed, 27 Dec 2017 20:42:58 +0100 Subject: [PATCH] fix: clear fields added with last commits; fix: changed wrong time reference for top lap --- training.cpp | 10 ++++++++++ windowrace.cpp | 10 ++++++++++ windowssettings.cpp | 9 +++++++++ windowssettings.h | 19 +++++++++---------- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/training.cpp b/training.cpp index 4fcf5de..a8722e9 100644 --- a/training.cpp +++ b/training.cpp @@ -75,6 +75,11 @@ void Training::ResetShell() { this->ui->lBestZeitShell->setText("∞"); this->ui->lCurRoundTimeShell->setText("∞"); this->firstTimeShell = true; + + this->ui->lBridgeShellTop->setText("∞"); + this->ui->lStraightShellTop->setText("∞"); + this->ui->lCurvesShellTop->setText("∞"); + this->ui->lDeltaTopTimeShell->setText("∞"); } void Training::ResetDea() { this->VecDea.clear(); @@ -87,6 +92,11 @@ void Training::ResetDea() { this->ui->lCurRoundDea->setText("∞"); this->firstTimeDea = true; + + this->ui->lBridgeDeaTop->setText("∞"); + this->ui->lStraightDeaTop->setText("∞"); + this->ui->lCurvesDeaTop->setText("∞"); + this->ui->lDeltaTopTimeDea->setText("∞"); } void Training::Reset() { this->ResetDea(); diff --git a/windowrace.cpp b/windowrace.cpp index ea833db..5043501 100644 --- a/windowrace.cpp +++ b/windowrace.cpp @@ -192,6 +192,16 @@ void WindowRace::prepareNextRace() { this->ui->lCurRoundTimeShell->setText("∞"); this->ui->lCurRoundDea->setText("∞"); + this->ui->lBridgeShell->setText("∞"); + this->ui->lStraightShell->setText("∞"); + this->ui->lCurvesShell->setText("∞"); + this->ui->lDeltaShellTop->setText("∞"); + + this->ui->lBridgeDea->setText("∞"); + this->ui->lStraightDea->setText("∞"); + this->ui->lCurvesDea->setText("∞"); + this->ui->lDeltaDeaTop->setText("∞"); + this->VecShell.clear(); this->VecDea.clear(); diff --git a/windowssettings.cpp b/windowssettings.cpp index d1a3f6f..14f4d01 100644 --- a/windowssettings.cpp +++ b/windowssettings.cpp @@ -26,6 +26,9 @@ WindowsSettings::WindowsSettings(DataBase * db, QWidget * parent) QObject::connect(this->ui->pbSaveAndExitDauer, SIGNAL(clicked()), this, SLOT(SaveDauerAndExitSlot())); + QObject::connect(this->ui->lEMinRundenzeit, SIGNAL(textChanged(QString)), + this, SLOT(repaintMinCurLapTime())); + // update minimal lap time on changeing minimal sector time // QObject::connect(this->ui->lEMinTimeSec1, // SIGNAL(textChanged(QString)), @@ -93,6 +96,12 @@ void WindowsSettings::repaintMinLapTime() { this->ui->lEMinRundenzeit->setText(QString::number(minlapTime)); this->ui->lEMinRundenzeitAktRennen->setText(QString::number(minlapTime)); } + +void WindowsSettings::repaintMinCurLapTime() { + + this->ui->lEMinRundenzeitAktRennen->setText( + this->ui->lEMinRundenzeit->text()); +} void WindowsSettings::AbbrechenSlot() { this->close(); delete this; diff --git a/windowssettings.h b/windowssettings.h index 8044a7f..c4104b0 100644 --- a/windowssettings.h +++ b/windowssettings.h @@ -1,35 +1,34 @@ #ifndef WINDOWSSETTINGS_H #define WINDOWSSETTINGS_H +#include "database.h" #include #include -#include "database.h" using std::string; namespace Ui { class WindowsSettings; } -class WindowsSettings : public QMainWindow -{ +class WindowsSettings : public QMainWindow { Q_OBJECT -public: - explicit WindowsSettings(DataBase *db, QWidget *parent = 0); + public: + explicit WindowsSettings(DataBase * db, QWidget * parent = 0); ~WindowsSettings(); -private: - Ui::WindowsSettings *ui; + private: + Ui::WindowsSettings * ui; string currentDateTime(); - DataBase *db; + DataBase * db; int rennId; -public slots: + public slots: void SaveDauerSlot(); void AbbrechenSlot(); void StreckeSpeichernSlot(); void SaveDauerAndExitSlot(); void repaintMinLapTime(); - + void repaintMinCurLapTime(); }; #endif // WINDOWSSETTINGS_H