src/mainwindow.cpp

Sat, 24 Aug 2019 14:44:42 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 24 Aug 2019 14:44:42 +0300
changeset 2
2bdc3ac5e77c
parent 1
51d14b0c68c0
child 3
55a55a9ec2c2
permissions
-rw-r--r--

things

0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #include "mainwindow.h"
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 #include "ui_mainwindow.h"
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
3 #include "version.h"
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 MainWindow::MainWindow(QWidget *parent) :
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
6 QMainWindow{parent},
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
7 ui{*new Ui_MainWindow}
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
8 {
1
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
9 ui.setupUi(this);
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
10 connect(ui.actionQuit, &QAction::triggered, this, &QMainWindow::close);
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
11 QString title = ::appName;
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
12 title += " ";
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
13 title += fullVersionString();
51d14b0c68c0 add version
Teemu Piippo <teemu@hecknology.net>
parents: 0
diff changeset
14 setWindowTitle(title);
0
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
15 }
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
16
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
17 MainWindow::~MainWindow()
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
18 {
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
19 delete &this->ui;
f9f4d4d6f162 initial commit
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
20 }

mercurial