62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#ifndef WINDOWSSETTINGS_H
|
|
#define WINDOWSSETTINGS_H
|
|
|
|
#include "database.h"
|
|
#include <QMainWindow>
|
|
#include <memory>
|
|
#include <qcolordialog.h>
|
|
#include <qstringlistmodel.h>
|
|
#include <string>
|
|
|
|
using std::string;
|
|
namespace Ui {
|
|
class WindowsSettings;
|
|
}
|
|
|
|
class WindowsSettings : public QMainWindow {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit WindowsSettings(DataBase * db, QWidget * parent = nullptr);
|
|
~WindowsSettings();
|
|
|
|
private:
|
|
Ui::WindowsSettings * ui;
|
|
string currentDateTime();
|
|
DataBase * db;
|
|
int rennId;
|
|
vector<vector<QString>> carIds;
|
|
vector<vector<QString>> driversList;
|
|
std::shared_ptr<QStringListModel> carModel;
|
|
std::shared_ptr<QStringListModel> driversModel;
|
|
vector<vector<QString>> driversLV;
|
|
std::shared_ptr<QColorDialog> colorDialogEditCar;
|
|
std::shared_ptr<QColorDialog> colorDialogNewCar;
|
|
QString curCarColor;
|
|
QString curCarId;
|
|
|
|
void repaintDrivers();
|
|
void repaintCars();
|
|
|
|
public slots:
|
|
void changeColorEdit();
|
|
void changeColorNew();
|
|
void SaveDauerSlot();
|
|
void AbbrechenSlot();
|
|
void StreckeSpeichernSlot();
|
|
void SaveDauerAndExitSlot();
|
|
void repaintMinLapTime();
|
|
void repaintMinCurLapTime();
|
|
void createRaceListAndClose();
|
|
void closeWindow();
|
|
void saveNewDriver();
|
|
void saveEditCar();
|
|
void listClickEditCar(const QModelIndex & index);
|
|
void openEditColor();
|
|
void openNewColor();
|
|
void saveNewCar();
|
|
void changeInterface();
|
|
};
|
|
|
|
#endif // WINDOWSSETTINGS_H
|