src/mainwindow.cpp

Sat, 03 Aug 2019 01:18:56 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 03 Aug 2019 01:18:56 +0300
changeset 1
51d14b0c68c0
parent 0
f9f4d4d6f162
child 3
55a55a9ec2c2
permissions
-rw-r--r--

add version

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