#include "mainwindow.h" #include "ui_mainwindow.h" #include #include "windowssettings.h" #include #include "hardwaresetup.h" #include "windowrace.h" #include "database.h" #include #include "windowrennliste2.h" #include "training.h" #include "unistd.h" using std::vector; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); //test = new HardwareSetup; //this->test->start(); QObject::connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(NewWindowSettings())); QObject::connect(ui->pBRennen, SIGNAL(clicked()), this, SLOT(WindowRennen())); QObject::connect(this->ui->pBTraining, SIGNAL(clicked()), this, SLOT(WindowTraining())); this->db = new DataBase; vector< vector > daten = db->getData("select * from Fahrer", 2); } void MainWindow::closeEvent(QCloseEvent *event){ } MainWindow::~MainWindow() { delete this->db; delete ui; } void MainWindow::WindowTraining(){ } void MainWindow::NewWindowSettings(){ this->interfaceSettings = new WindowsSettings(this->db, this); this->interfaceSettings->show(); } void MainWindow::WindowRennen(){ this->interfaceRace = new WindowRace(this->db, this); this->interfaceRace->show(); this->interfaceRennliste = new WindowRennliste(this->db, this); this->interfaceRennliste->show(); this->interfaceRace->setWindowRennliste(this->interfaceRennliste); this->interfaceRennliste->setWindowRace(this->interfaceRace); }