src/MainWindow.cpp

changeset 4
fe106c497b75
parent 3
4b95e33ee476
child 6
f8474f2c5db9
equal deleted inserted replaced
3:4b95e33ee476 4:fe106c497b75
1 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 */
2 #include "MainWindow.h" 17 #include "MainWindow.h"
18 #include "AboutDialog.h"
3 #include "../ui/ui_MainWindow.h" 19 #include "../ui/ui_MainWindow.h"
4 20
5 #include <QApplication> 21 #include <QApplication>
6 #include <QCloseEvent> 22 #include <QCloseEvent>
7 #include <QDebug> 23 #include <QDebug>
9 #include <QWidget> 25 #include <QWidget>
10 26
11 27
12 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) 28 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
13 { 29 {
14 ui->setupUi(this); 30 ui->setupUi(this);
15 } 31 }
16 32
17 33
18 MainWindow::~MainWindow() 34 MainWindow::~MainWindow()
19 { 35 {
20 delete ui; 36 delete ui;
21 } 37 }
22 38
23 39
40 void MainWindow::on_actionExit_triggered()
41 {
42 this->close();
43 }
24 44
45
46 void MainWindow::on_actionAbout_triggered()
47 {
48 AboutDialog dialog(this);
49 dialog.setModal(true);
50 dialog.exec();
51 }
52
53

mercurial