fixed some heavy pointermistakes
This commit is contained in:
@@ -23,7 +23,8 @@ SOURCES += main.cpp\
|
|||||||
countdown.cpp \
|
countdown.cpp \
|
||||||
ampel.cpp \
|
ampel.cpp \
|
||||||
database.cpp \
|
database.cpp \
|
||||||
windowrennliste.cpp
|
windowrennliste.cpp \
|
||||||
|
training.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
mainwindow.h \
|
mainwindow.h \
|
||||||
@@ -34,12 +35,14 @@ HEADERS += \
|
|||||||
countdown.h \
|
countdown.h \
|
||||||
ampel.h \
|
ampel.h \
|
||||||
database.h \
|
database.h \
|
||||||
windowrennliste.h
|
windowrennliste.h \
|
||||||
|
training.h
|
||||||
|
|
||||||
FORMS += mainwindow.ui \
|
FORMS += mainwindow.ui \
|
||||||
windowrace.ui \
|
windowrace.ui \
|
||||||
windowssettings.ui \
|
windowssettings.ui \
|
||||||
windowrennliste.ui
|
windowrennliste.ui \
|
||||||
|
training.ui
|
||||||
|
|
||||||
OTHER_FILES +=
|
OTHER_FILES +=
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 3.0.1, 2014-09-13T13:57:17. -->
|
<!-- Written by QtCreator 3.0.1, 2014-09-24T20:28:48. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
|||||||
@@ -3,11 +3,15 @@
|
|||||||
|
|
||||||
Ampel::Ampel()
|
Ampel::Ampel()
|
||||||
{
|
{
|
||||||
|
this->running = 1;
|
||||||
|
}
|
||||||
|
void Ampel::setStop(){
|
||||||
|
this->running = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ampel::run(){
|
void Ampel::run(){
|
||||||
int anzahl = 0;
|
int anzahl = 0;
|
||||||
while(1){
|
while(this->running){
|
||||||
anzahl++;
|
anzahl++;
|
||||||
if(anzahl < 6){
|
if(anzahl < 6){
|
||||||
usleep(800000);
|
usleep(800000);
|
||||||
|
|||||||
2
ampel.h
2
ampel.h
@@ -7,8 +7,10 @@ class Ampel:public QThread
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Ampel();
|
Ampel();
|
||||||
|
void setStop();
|
||||||
protected:
|
protected:
|
||||||
void run();
|
void run();
|
||||||
|
bool running;
|
||||||
signals:
|
signals:
|
||||||
void ampelUpdate();
|
void ampelUpdate();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,9 +2,14 @@
|
|||||||
#include "unistd.h"
|
#include "unistd.h"
|
||||||
Countdown::Countdown()
|
Countdown::Countdown()
|
||||||
{
|
{
|
||||||
|
this->running = 1;
|
||||||
}
|
}
|
||||||
|
void Countdown::setStop(){
|
||||||
|
this->running = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void Countdown::run(){
|
void Countdown::run(){
|
||||||
while(1){
|
while(this->running){
|
||||||
sleep(1);
|
sleep(1);
|
||||||
emit CountdownUpdate();
|
emit CountdownUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ class Countdown : public QThread
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
protected:
|
protected:
|
||||||
void run();
|
void run();
|
||||||
|
bool running;
|
||||||
public:
|
public:
|
||||||
|
void setStop();
|
||||||
Countdown();
|
Countdown();
|
||||||
signals:
|
signals:
|
||||||
void CountdownUpdate();
|
void CountdownUpdate();
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ DataBase::DataBase()
|
|||||||
this->db->setDatabaseName("Renndatenbank.sqlite");
|
this->db->setDatabaseName("Renndatenbank.sqlite");
|
||||||
std::cout << "Konstruktor Database" << std::endl;
|
std::cout << "Konstruktor Database" << std::endl;
|
||||||
}
|
}
|
||||||
|
DataBase::~DataBase(){
|
||||||
|
std::cout << "Destruktor aus Datenbank" << std::endl;
|
||||||
|
delete this->db;
|
||||||
|
//delete this;
|
||||||
|
}
|
||||||
|
|
||||||
vector< vector<QString> > DataBase::getData2(std::string statement, int cols){
|
vector< vector<QString> > DataBase::getData2(std::string statement, int cols){
|
||||||
|
|
||||||
vector<QString> data;
|
vector<QString> data;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class DataBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataBase();
|
DataBase();
|
||||||
|
~DataBase();
|
||||||
vector< vector<QString> > getData(std::string statement, int cols);
|
vector< vector<QString> > getData(std::string statement, int cols);
|
||||||
vector< vector<QString> > getData2(std::string statement, int cols);
|
vector< vector<QString> > getData2(std::string statement, int cols);
|
||||||
void setData(std::string statement);
|
void setData(std::string statement);
|
||||||
|
|||||||
@@ -12,17 +12,23 @@ HardwareSetup::HardwareSetup()
|
|||||||
}
|
}
|
||||||
shellBefore = false;
|
shellBefore = false;
|
||||||
deaBefore = false;
|
deaBefore = false;
|
||||||
|
this->stop = 0;
|
||||||
}
|
}
|
||||||
|
void HardwareSetup::setStop(){
|
||||||
|
this->stop = 1;
|
||||||
|
}
|
||||||
|
|
||||||
HardwareSetup::~HardwareSetup(){
|
HardwareSetup::~HardwareSetup(){
|
||||||
if (ioperm(BASEPORT, 3, 0)) {
|
/*if (ioperm(BASEPORT, 3, 0)) {
|
||||||
//perror("ioperm");
|
//perror("ioperm");
|
||||||
}
|
}*/
|
||||||
|
std::cout << "Hardware beendet" << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HardwareSetup::run(){
|
void HardwareSetup::run(){
|
||||||
while(1){
|
while(!this->stop){
|
||||||
usleep(10000);
|
usleep(500);
|
||||||
if(getDea()){
|
if(getDea()){
|
||||||
if(!deaBefore){
|
if(!deaBefore){
|
||||||
deaBefore = true;
|
deaBefore = true;
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ private:
|
|||||||
bool getShell();
|
bool getShell();
|
||||||
bool getDea();
|
bool getDea();
|
||||||
int* findBit(int *array, int zahl);
|
int* findBit(int *array, int zahl);
|
||||||
|
bool stop;
|
||||||
public:
|
public:
|
||||||
|
void setStop();
|
||||||
~HardwareSetup();
|
~HardwareSetup();
|
||||||
HardwareSetup();
|
HardwareSetup();
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "windowrennliste2.h"
|
#include "windowrennliste2.h"
|
||||||
|
#include "training.h"
|
||||||
|
#include "unistd.h"
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
@@ -16,23 +18,36 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
test = new HardwareSetup;
|
//test = new HardwareSetup;
|
||||||
|
|
||||||
this->test->start();
|
//this->test->start();
|
||||||
QObject::connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(NewWindowSettings()));
|
QObject::connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(NewWindowSettings()));
|
||||||
|
|
||||||
QObject::connect(ui->pBRennen, SIGNAL(clicked()), this, SLOT(WindowRennen()));
|
QObject::connect(ui->pBRennen, SIGNAL(clicked()), this, SLOT(WindowRennen()));
|
||||||
|
QObject::connect(this->ui->pBTraining, SIGNAL(clicked()), this, SLOT(WindowTraining()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this->db = new DataBase;
|
this->db = new DataBase;
|
||||||
|
|
||||||
vector< vector <QString> > daten = db->getData("select * from Fahrer", 2);
|
vector< vector <QString> > daten = db->getData("select * from Fahrer", 2);
|
||||||
|
|
||||||
|
}
|
||||||
|
void MainWindow::closeEvent(QCloseEvent *event){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
delete this->db;
|
||||||
delete ui;
|
delete ui;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::WindowTraining(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::NewWindowSettings(){
|
void MainWindow::NewWindowSettings(){
|
||||||
this->interfaceSettings = new WindowsSettings(this->db, this);
|
this->interfaceSettings = new WindowsSettings(this->db, this);
|
||||||
this->interfaceSettings->show();
|
this->interfaceSettings->show();
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
void NewWindowSettings();
|
void NewWindowSettings();
|
||||||
void WindowRennen();
|
void WindowRennen();
|
||||||
|
void WindowTraining();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
DataBase *db;
|
DataBase *db;
|
||||||
HardwareSetup *test;
|
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
WindowRace *interfaceRace;
|
WindowRace *interfaceRace;
|
||||||
WindowsSettings *interfaceSettings;
|
WindowsSettings *interfaceSettings;
|
||||||
|
|||||||
@@ -6,57 +6,48 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>568</width>
|
<width>512</width>
|
||||||
<height>427</height>
|
<height>235</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>MainWindow</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<widget class="QWidget" name="centralWidget">
|
||||||
<widget class="QPushButton" name="pushButton">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1">
|
||||||
<x>410</x>
|
<item>
|
||||||
<y>10</y>
|
<widget class="QPushButton" name="pBRennen">
|
||||||
<width>80</width>
|
<property name="text">
|
||||||
<height>23</height>
|
<string>Rennen</string>
|
||||||
</rect>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
<property name="text">
|
</item>
|
||||||
<string>Einstellungen</string>
|
<item>
|
||||||
</property>
|
<widget class="QPushButton" name="pBTraining">
|
||||||
</widget>
|
<property name="text">
|
||||||
<widget class="QPushButton" name="pBRennen">
|
<string>Training</string>
|
||||||
<property name="geometry">
|
</property>
|
||||||
<rect>
|
</widget>
|
||||||
<x>410</x>
|
</item>
|
||||||
<y>60</y>
|
<item>
|
||||||
<width>80</width>
|
<widget class="QPushButton" name="pushButton">
|
||||||
<height>23</height>
|
<property name="text">
|
||||||
</rect>
|
<string>Einstellungen</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Rennen</string>
|
</item>
|
||||||
</property>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
<widget class="QLineEdit" name="lineEdit">
|
</layout>
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>140</x>
|
|
||||||
<y>100</y>
|
|
||||||
<width>113</width>
|
|
||||||
<height>23</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menuBar">
|
<widget class="QMenuBar" name="menuBar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>568</width>
|
<width>512</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
14
training.cpp
Normal file
14
training.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include "training.h"
|
||||||
|
#include "ui_training.h"
|
||||||
|
|
||||||
|
Training::Training(QWidget *parent) :
|
||||||
|
QMainWindow(parent),
|
||||||
|
ui(new Ui::Training)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
Training::~Training()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
22
training.h
Normal file
22
training.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef TRAINING_H
|
||||||
|
#define TRAINING_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class Training;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Training : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit Training(QWidget *parent = 0);
|
||||||
|
~Training();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::Training *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TRAINING_H
|
||||||
609
training.ui
Normal file
609
training.ui
Normal file
@@ -0,0 +1,609 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Training</class>
|
||||||
|
<widget class="QMainWindow" name="Training">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_18">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gbShell">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Shell</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Bestzeit</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lBestZeitShell">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>∞</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Zeit aktueller Runde</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lCurRoundTimeShell">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>∞</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="lWShellTime">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,0,1">
|
||||||
|
<item alignment="Qt::AlignHCenter|Qt::AlignTop">
|
||||||
|
<widget class="QLabel" name="lCountdown">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>17</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Verbleibende Zeit</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item alignment="Qt::AlignHCenter">
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>170</width>
|
||||||
|
<height>100</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW11" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel11" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW21" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel21" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW12" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel12" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hw22" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel22" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_15">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW13" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel13" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW23" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel23" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_16">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW14" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel14" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW24" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel24" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_17">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW15" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel15" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="hW25" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="WAmpel25" native="true">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>23</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-image: url(:/new/prefix1/ampel.png);</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_2" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gbDea">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>14</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Dea</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_4">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Bestzeit</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lBestZeitDea">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>∞</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>12</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Zeit aktueller Runde</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lCurRoundDea">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>20</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>∞</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="lWDeaTime">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QStatusBar" name="statusbar"/>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include "unistd.h"
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::string;
|
using std::string;
|
||||||
@@ -175,8 +176,8 @@ void WindowRace::setDriverAndCarId(vector<QString> vec){
|
|||||||
}
|
}
|
||||||
void WindowRace::closeEvent(QCloseEvent *event){
|
void WindowRace::closeEvent(QCloseEvent *event){
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText("The document has been modified.");
|
msgBox.setText("Wirklich schliessen?");
|
||||||
msgBox.setInformativeText("Do you want to save your changes?");
|
msgBox.setInformativeText("");
|
||||||
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Save);
|
msgBox.setDefaultButton(QMessageBox::Save);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
@@ -235,6 +236,15 @@ void WindowRace::countdownUpdate(){
|
|||||||
|
|
||||||
WindowRace::~WindowRace()
|
WindowRace::~WindowRace()
|
||||||
{
|
{
|
||||||
|
this->startAmpelThread->setStop();
|
||||||
|
this->countdown->setStop();
|
||||||
|
this->Hardware->setStop();
|
||||||
|
usleep(1000010); //eine Sekunde
|
||||||
|
|
||||||
|
delete this->countdown;
|
||||||
|
delete this->Hardware;
|
||||||
|
delete this->startAmpelThread;
|
||||||
|
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
void WindowRace::shellSlot(){
|
void WindowRace::shellSlot(){
|
||||||
@@ -362,5 +372,4 @@ void WindowRace::ampelSlot(){
|
|||||||
|
|
||||||
void WindowRace::go(){
|
void WindowRace::go(){
|
||||||
startAmpelThread->start();
|
startAmpelThread->start();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ void WindowRennliste::closeEvent(QCloseEvent *event){
|
|||||||
void WindowRennliste::schliessen(){
|
void WindowRennliste::schliessen(){
|
||||||
this->windowClose = true;
|
this->windowClose = true;
|
||||||
this->close();
|
this->close();
|
||||||
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowRennliste::setSelection(int row){
|
void WindowRennliste::setSelection(int row){
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ WindowsSettings::WindowsSettings(DataBase *db, QWidget *parent) :
|
|||||||
}
|
}
|
||||||
void WindowsSettings::AbbrechenSlot(){
|
void WindowsSettings::AbbrechenSlot(){
|
||||||
this->close();
|
this->close();
|
||||||
|
delete this;
|
||||||
}
|
}
|
||||||
void WindowsSettings::SaveDauerSlot(){
|
void WindowsSettings::SaveDauerSlot(){
|
||||||
string statement = "update renndauer set dauer="+this->ui->leRenndauer->text().toStdString()+" where id like 1";
|
string statement = "update renndauer set dauer="+this->ui->leRenndauer->text().toStdString()+" where id like 1";
|
||||||
@@ -98,6 +99,7 @@ void WindowsSettings::StreckeSpeichernSlot(){
|
|||||||
WindowsSettings::~WindowsSettings()
|
WindowsSettings::~WindowsSettings()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
|
std::cout << "Destruktor einstellungen" << std::endl;
|
||||||
}
|
}
|
||||||
// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
|
// Get current date/time, format is YYYY-MM-DD.HH:mm:ss
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user