Sat, 26 Feb 2022 16:34:20 +0100
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
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" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
19 | #include "InventorySuppliers.h" |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
20 | #include "InventoryFermentables.h" |
24 | 21 | #include "InventoryHops.h" |
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
22 | #include "InventoryYeasts.h" |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
23 | #include "InventoryMiscs.h" |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
24 | #include "InventoryWaters.h" |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
25 | #include "Setup.h" |
3 | 26 | #include "../ui/ui_MainWindow.h" |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
27 | #include "config.h" |
3 | 28 | |
29 | #include <QApplication> | |
30 | #include <QCloseEvent> | |
31 | #include <QDebug> | |
32 | #include <QStandardItem> | |
33 | #include <QWidget> | |
34 | ||
35 | ||
36 | MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) | |
37 | { | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
38 | qDebug() << Q_FUNC_INFO; |
4 | 39 | ui->setupUi(this); |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
40 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
41 | setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
3 | 42 | } |
43 | ||
44 | ||
45 | MainWindow::~MainWindow() | |
46 | { | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
47 | qDebug() << Q_FUNC_INFO; |
4 | 48 | delete ui; |
3 | 49 | } |
50 | ||
51 | ||
4 | 52 | void MainWindow::on_actionExit_triggered() |
53 | { | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
54 | qDebug() << Q_FUNC_INFO; |
4 | 55 | this->close(); |
56 | } | |
3 | 57 | |
4 | 58 | |
6
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
59 | void MainWindow::fromInventorySuppliers() |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
60 | { |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
61 | qDebug() << Q_FUNC_INFO; |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
62 | delete InventorySuppliersWindow; |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
63 | this->show(); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
64 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
65 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
66 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
67 | void MainWindow::on_actionSuppliers_triggered() |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
68 | { |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
69 | qDebug() << Q_FUNC_INFO; |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
70 | InventorySuppliersWindow = new InventorySuppliers(this); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
71 | QObject::connect(InventorySuppliersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventorySuppliers())); |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
72 | this->hide(); // Close the main window |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
73 | InventorySuppliersWindow->show(); // Show a second window |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
74 | } |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
75 | |
f8474f2c5db9
We can fetch a list of suppliers and show it in the wrong window. Still a lot to learn about Qt5
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
76 | |
19
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
77 | void MainWindow::fromInventoryFermentables() |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
78 | { |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
79 | qDebug() << Q_FUNC_INFO; |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
80 | delete InventoryFermentablesWindow; |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
81 | this->show(); |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
82 | } |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
83 | |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
84 | |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
85 | void MainWindow::on_actionFermentables_triggered() |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
86 | { |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
87 | qDebug() << Q_FUNC_INFO; |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
88 | InventoryFermentablesWindow = new InventoryFermentables(this); |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
89 | QObject::connect(InventoryFermentablesWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryFermentables())); |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
90 | this->hide(); // Close the main window |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
91 | InventoryFermentablesWindow->show(); // Show a second window |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
92 | } |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
93 | |
c94edc758a5b
Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
94 | |
24 | 95 | void MainWindow::fromInventoryHops() |
96 | { | |
97 | qDebug() << Q_FUNC_INFO; | |
98 | delete InventoryHopsWindow; | |
99 | this->show(); | |
100 | } | |
101 | ||
102 | ||
103 | void MainWindow::on_actionHops_triggered() | |
104 | { | |
105 | qDebug() << Q_FUNC_INFO; | |
106 | InventoryHopsWindow = new InventoryHops(this); | |
107 | QObject::connect(InventoryHopsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryHops())); | |
108 | this->hide(); // Close the main window | |
109 | InventoryHopsWindow->show(); // Show a second window | |
110 | } | |
111 | ||
112 | ||
25
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
113 | void MainWindow::fromInventoryYeasts() |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
114 | { |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
115 | qDebug() << Q_FUNC_INFO; |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
116 | delete InventoryYeastsWindow; |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
117 | this->show(); |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
118 | } |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
119 | |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
120 | |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
121 | void MainWindow::on_actionYeasts_triggered() |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
122 | { |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
123 | qDebug() << Q_FUNC_INFO; |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
124 | InventoryYeastsWindow = new InventoryYeasts(this); |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
125 | QObject::connect(InventoryYeastsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryYeasts())); |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
126 | this->hide(); // Close the main window |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
127 | InventoryYeastsWindow->show(); // Show a second window |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
128 | } |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
129 | |
a9da2744609e
Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents:
24
diff
changeset
|
130 | |
28
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
131 | void MainWindow::fromInventoryMiscs() |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
132 | { |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
133 | qDebug() << Q_FUNC_INFO; |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
134 | delete InventoryMiscsWindow; |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
135 | this->show(); |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
136 | } |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
137 | |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
138 | |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
139 | void MainWindow::on_actionMiscs_triggered() |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
140 | { |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
141 | qDebug() << Q_FUNC_INFO; |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
142 | InventoryMiscsWindow = new InventoryMiscs(this); |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
143 | QObject::connect(InventoryMiscsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryMiscs())); |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
144 | this->hide(); // Close the main window |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
145 | InventoryMiscsWindow->show(); // Show a second window |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
146 | } |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
147 | |
93a70b1502ca
Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
148 | |
29
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
149 | void MainWindow::fromInventoryWaters() |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
150 | { |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
151 | qDebug() << Q_FUNC_INFO; |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
152 | delete InventoryWatersWindow; |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
153 | this->show(); |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
154 | } |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
155 | |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
156 | |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
157 | void MainWindow::on_actionWaters_triggered() |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
158 | { |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
159 | qDebug() << Q_FUNC_INFO; |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
160 | InventoryWatersWindow = new InventoryWaters(this); |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
161 | QObject::connect(InventoryWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryWaters())); |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
162 | this->hide(); // Close the main window |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
163 | InventoryWatersWindow->show(); // Show a second window |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
164 | } |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
165 | |
76846c99f827
Added inventory water editor and table. In Yeasts table make sure the fields without a tickmark are empty. Removed Utils::Round function, not reliable.
Michiel Broek <mbroek@mbse.eu>
parents:
28
diff
changeset
|
166 | |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
167 | void MainWindow::fromSetup() |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
168 | { |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
169 | qDebug() << Q_FUNC_INFO; |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
170 | delete SetupWindow; |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
171 | this->show(); |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
172 | } |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
173 | |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
174 | |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
175 | void MainWindow::on_actionSetup_triggered() |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
176 | { |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
177 | qDebug() << Q_FUNC_INFO; |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
178 | SetupWindow = new Setup(this); |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
179 | QObject::connect(SetupWindow, SIGNAL(firstWindow()), this, SLOT(fromSetup())); |
16
a5d8e783a7b0
Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
180 | this->hide(); // Close the main window |
a5d8e783a7b0
Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents:
15
diff
changeset
|
181 | SetupWindow->show(); // Show a setup window |
15
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
182 | } |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
183 | |
c58b82549713
Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
6
diff
changeset
|
184 | |
4 | 185 | void MainWindow::on_actionAbout_triggered() |
186 | { | |
187 | AboutDialog dialog(this); | |
188 | dialog.setModal(true); | |
189 | dialog.exec(); | |
190 | } | |
191 | ||
192 |