Fri, 11 Feb 2022 16:00:06 +0100
Menus setup started.
4 | 1 | /** |
2 | * MainWindow.cpp is part of bmsapp. | |
3 | * | |
4 | * bmsapp is free software: you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation, either version 3 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * bmsapp is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 | */ | |
3 | 17 | #include "MainWindow.h" |
4 | 18 | #include "AboutDialog.h" |
3 | 19 | #include "../ui/ui_MainWindow.h" |
20 | ||
21 | #include <QApplication> | |
22 | #include <QCloseEvent> | |
23 | #include <QDebug> | |
24 | #include <QStandardItem> | |
25 | #include <QWidget> | |
26 | ||
27 | ||
28 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) | |
29 | { | |
4 | 30 | ui->setupUi(this); |
3 | 31 | } |
32 | ||
33 | ||
34 | MainWindow::~MainWindow() | |
35 | { | |
4 | 36 | delete ui; |
3 | 37 | } |
38 | ||
39 | ||
4 | 40 | void MainWindow::on_actionExit_triggered() |
41 | { | |
42 | this->close(); | |
43 | } | |
3 | 44 | |
4 | 45 | |
46 | void MainWindow::on_actionAbout_triggered() | |
47 | { | |
48 | AboutDialog dialog(this); | |
49 | dialog.setModal(true); | |
50 | dialog.exec(); | |
51 | } | |
52 | ||
53 |