diff --git a/CMakeLists.txt b/CMakeLists.txt index de018bd..689134b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,4 +109,5 @@ add_executable(Rennbahn ${helloworld_SRCS} ) # Use the Widgets module from Qt 5 target_link_libraries(Rennbahn Qt5::Widgets Qt5::Core Qt5::Sql ${LIBUSB_LIBRARY} pthread fmt::fmt) +#target_link_libraries(Rennbahn Qt5::Widgets Qt5::Core Qt5::Sql ${LIBUSB_LIBRARY} pthread) target_link_libraries(Rennbahn ${Boost_LIBRARIES}) diff --git a/RennbahnZeitmessung.pro.user b/RennbahnZeitmessung.pro.user index d2dbf8b..96b6287 100644 --- a/RennbahnZeitmessung.pro.user +++ b/RennbahnZeitmessung.pro.user @@ -1,14 +1,14 @@ - + EnvironmentId - {fa7f3dc3-5b46-4468-a19f-ea195cf466a8} + {d65476ef-0da9-4e40-9dc0-9f44335f5fac} ProjectExplorer.Project.ActiveTarget - 0 + 1 ProjectExplorer.Project.EditorSettings @@ -55,80 +55,21 @@ ProjectExplorer.Project.PluginSettings - + + true ProjectExplorer.Project.Target.0 - Qt 5.9.1 in PATH (qt5) - Qt 5.9.1 in PATH (qt5) - {48e51839-112c-4842-badf-f2eb9bcf81cb} + Desktop + Desktop + {7c81c2d1-6cc4-440b-a1cc-9bba845de6c4} 0 0 0 - /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_9_1_in_PATH_qt5-Release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - - false - false - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Bereinigen - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - - /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_9_1_in_PATH_qt5-Debug + /home/johannes/Dokumente/build-RennbahnZeitmessung-Desktop-Debug true @@ -174,7 +115,7 @@ 1 - Bereinigen + Clean ProjectExplorer.BuildSteps.Clean @@ -182,21 +123,141 @@ false Debug - + Debug Qt4ProjectManager.Qt4BuildConfiguration 2 true - 2 + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Desktop-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Desktop-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 0 - Deployment + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Lokales Deployment + Deploy Configuration ProjectExplorer.DefaultDeployConfiguration @@ -250,9 +311,272 @@ true RennbahnZeitmessung.pro - false - /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_9_1_in_PATH_qt5-Release + /home/johannes/Dokumente/build-RennbahnZeitmessung-Desktop-Debug + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Qt 5.11.2 in PATH (System) + Qt 5.11.2 in PATH (System) + {a77f7da7-30ed-4ef3-9772-7ccbc14136dd} + 0 + 0 + 0 + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_11_2_in_PATH_System-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_11_2_in_PATH_System-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_11_2_in_PATH_System-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + true + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy Configuration + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + RennbahnZeitmessung + + Qt4ProjectManager.Qt4RunConfiguration:/home/johannes/Dokumente/rennbahnc/RennbahnZeitmessung.pro + true + + RennbahnZeitmessung.pro + + /home/johannes/Dokumente/build-RennbahnZeitmessung-Qt_5_11_2_in_PATH_System-Debug 3768 false true @@ -265,7 +589,7 @@ ProjectExplorer.Project.TargetCount - 1 + 2 ProjectExplorer.Project.Updater.FileVersion diff --git a/windowrace.cpp b/windowrace.cpp index 7f9196e..6c977f2 100644 --- a/windowrace.cpp +++ b/windowrace.cpp @@ -157,6 +157,15 @@ WindowRace::WindowRace(DataBase * db, QWidget * parent) QObject::connect(keyReturn.get(), SIGNAL(activated()), this, SLOT(ReturnPress())); + // setup round / round + // request amount of races + statement = "select fahrershellid, autoshellid, fahrerdeaid, autodeaid " + "from aktrennen where id_rennen like " + + QString::number(this->renn_id).toStdString(); + + vector> tableRaces; + tableRaces = db->getData(statement, 4); + this->ui->lRound->setText("1/" + QString::number(tableRaces.size())); // QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(close())); } @@ -261,6 +270,10 @@ void WindowRace::setDriverAndCar(vector vec) { this->ui->gbShell->setTitle("Shell, " + vec[0] + ", " + vec[1]); this->ui->gbDea->setTitle("Dea, " + vec[2] + ", " + vec[3]); } +void WindowRace::setRoundCounter(uint currentRound, uint rounds) { + this->ui->lRound->setText(QString::number(currentRound) + "/" + + QString::number(rounds)); +} void WindowRace::stopClicked() { this->prepareNextRace(); } diff --git a/windowrace.h b/windowrace.h index acaad76..8487183 100644 --- a/windowrace.h +++ b/windowrace.h @@ -1,4 +1,4 @@ -#ifndef WINDOWRACE_H + #ifndef WINDOWRACE_H #define WINDOWRACE_H #include "ampel.h" @@ -29,6 +29,7 @@ class WindowRace : public QMainWindow { ~WindowRace(); void setWindowRennliste(WindowRennliste * ptrInstance); void setDriverAndCar(vector vec); + void setRoundCounter(uint currentRound, uint rounds); void setDriverAndCarId(vector vec); private: diff --git a/windowrace.ui b/windowrace.ui index 40589b0..105e4b4 100644 --- a/windowrace.ui +++ b/windowrace.ui @@ -216,7 +216,7 @@ - + @@ -601,6 +601,21 @@ + + + + + 20 + + + + + + + Qt::AlignCenter + + + @@ -836,7 +851,7 @@ 0 0 1139 - 24 + 23 diff --git a/windowrennliste.cpp b/windowrennliste.cpp index 75ec41e..4f3f01b 100644 --- a/windowrennliste.cpp +++ b/windowrennliste.cpp @@ -221,6 +221,8 @@ void WindowRennliste::changeSelection() { this->ui->tWRennliste->item(static_cast(this->selectedRow), 4) ->text()); this->instanceWindowRace->setDriverAndCar(vec); + this->instanceWindowRace->setRoundCounter(this->selectedRow + 1, + this->tableData.size()); } }