changed more pointers to smart pointers + added some tooltips for shortcuts

This commit is contained in:
2018-12-28 17:28:10 +01:00
parent c2dc4b72a5
commit fcec2ad4b4
4 changed files with 19 additions and 4 deletions

View File

@@ -35,12 +35,12 @@ MainWindow::MainWindow(QWidget * parent)
QObject::connect(this->ui->pBEvaluation, SIGNAL(clicked()), this,
SLOT(WindowEvaluation()));
QShortcut * startTraining = new QShortcut(QKeySequence("Ctrl+t"), this);
QShortcut * startRennen = new QShortcut(QKeySequence("Ctrl+r"), this);
startTraining = std::make_shared<QShortcut>(QKeySequence("Ctrl+t"), this);
startRennen = std::make_shared<QShortcut>(QKeySequence("Ctrl+r"), this);
QObject::connect(startTraining, SIGNAL(activated()), this,
QObject::connect(startTraining.get(), SIGNAL(activated()), this,
SLOT(WindowTraining()));
QObject::connect(startRennen, SIGNAL(activated()), this,
QObject::connect(startRennen.get(), SIGNAL(activated()), this,
SLOT(WindowRennen()));
this->db = std::make_shared<DataBase>();

View File

@@ -39,6 +39,9 @@ class MainWindow : public QMainWindow {
std::shared_ptr<WindowsSettings> interfaceSettings;
std::shared_ptr<WindowRennliste> interfaceRennliste;
std::shared_ptr<Evaluation> interfaceEvaluation;
std::shared_ptr<QShortcut> startTraining;
std::shared_ptr<QShortcut> startRennen;
};
#endif // MAINWINDOW_H

View File

@@ -19,6 +19,9 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,1,1,0">
<item>
<widget class="QPushButton" name="pBRennen">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Strg+r&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Rennen</string>
</property>
@@ -26,6 +29,9 @@
</item>
<item>
<widget class="QPushButton" name="pBTraining">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Strg+t&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Training</string>
</property>

View File

@@ -421,6 +421,9 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pBResetShell">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Strg+s&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Reset Shell</string>
</property>
@@ -435,6 +438,9 @@
</item>
<item>
<widget class="QPushButton" name="pBResetDea">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Strg+d&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Reset Dea</string>
</property>