Files
Rennbahn/windowrace.h

81 lines
1.7 KiB
C++

#ifndef WINDOWRACE_H
#define WINDOWRACE_H
#include <QMainWindow>
#include "hardwaresetup.h"
#include "counter.h"
#include <vector>
#include "countdown.h"
#include <string>
#include "ampel.h"
#include "database.h"
#include "windowrennliste.h"
#include <QMessageBox>
#include "timemodel.h"
using std::string;
namespace Ui {
class WindowRace;
}
class WindowRace : public QMainWindow
{
Q_OBJECT
public:
explicit WindowRace(DataBase *db, QWidget *parent = 0);
~WindowRace();
void setWindowRennliste(WindowRennliste *ptrInstance);
void setDriverAndCar(vector<QString> vec);
void setDriverAndCarId(vector<QString> vec);
private:
int shellDriverId;
int deaDriverId;
int deaCarId;
int shellCarId;
void closeEvent(QCloseEvent *event);
bool started;
Countdown *countdown;
HardwareSetup *Hardware;
Ui::WindowRace *ui;
Counter counterShell;
Counter counterDea;
bool firstTimeShell;
bool firstTimeDea;
QVector<QVector<int>> VecShell;
QVector<QVector<int>> VecDea;
TimeModel *timeModelShell;
TimeModel *timeModelDea;
long getMinimum(std::vector<long> a);
QString timeWrapper(long zahl);
long countdownValue; //in sec
Ampel *startAmpelThread;
int ampelCounter;
bool paused;
DataBase *db;
bool finished;
WindowRennliste *wRennliste;
bool wRennlisteSeted;
int fahrzeit;
int renn_id;
int minimumTime;
QVector<int> minSecTime;
public slots:
void stopClicked();
void prepareNextRace();
void breakCounter();
void countdownUpdate();
void go();
void ampelSlot();
void laufcheck();
void deaSlot(int, int);
void shellSlot(int, int);
void ReturnPress();
};
#endif // WINDOWRACE_H