added shortcuts

This commit is contained in:
2014-12-22 13:41:56 +01:00
parent 03b1d7cced
commit db4d19413e

View File

@@ -1,6 +1,7 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QObject>
#include <QShortcut>
#include "windowssettings.h"
#include <iostream>
#include "hardwaresetup.h"
@@ -31,6 +32,12 @@ MainWindow::MainWindow(QWidget *parent) :
QObject::connect(ui->pBRennen, SIGNAL(clicked()), this, SLOT(WindowRennen()));
QObject::connect(this->ui->pBTraining, SIGNAL(clicked()), this, SLOT(WindowTraining()));
QShortcut *startTraining = new QShortcut(QKeySequence("Ctrl+t"), this);
QShortcut *startRennen = new QShortcut(QKeySequence("Ctrl+r"), this);
QObject::connect(startTraining, SIGNAL(activated()), this, SLOT(WindowTraining()));
QObject::connect(startRennen, SIGNAL(activated()), this, SLOT(WindowRennen()));
this->db = new DataBase;