src/MainWindow.cpp

Sun, 20 Mar 2022 17:22:27 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 20 Mar 2022 17:22:27 +0100
changeset 71
5bd0d7be0167
parent 70
556b4202c5e7
child 72
7992c686e349
permissions
-rw-r--r--

Inventory Miscs now on the mainscreen.

4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
1 /**
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
2 * MainWindow.cpp is part of bmsapp.
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
3 *
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
4 * bmsapp is free software: you can redistribute it and/or modify
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
5 * it under the terms of the GNU General Public License as published by
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
6 * the Free Software Foundation, either version 3 of the License, or
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
7 * (at your option) any later version.
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
8 *
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
9 * bmsapp is distributed in the hope that it will be useful,
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
12 * GNU General Public License for more details.
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
13 *
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
14 * You should have received a copy of the GNU General Public License
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
16 */
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 #include "MainWindow.h"
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
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
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
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"
30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
25 #include "InventoryEquipments.h"
48
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
26 #include "ProfileWaters.h"
49
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
27 #include "ProfileMashs.h"
56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
28 #include "ProfileStyles.h"
57
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
29 #include "ProfileFerments.h"
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
30 #include "Setup.h"
52
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
31 #include "PrinterDialog.h"
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 #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
33 #include "config.h"
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 #include <QApplication>
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 #include <QCloseEvent>
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37 #include <QDebug>
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 #include <QStandardItem>
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 #include <QWidget>
65
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
40 #include <QtWidgets/QTableWidget>
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
41 #include <QtWidgets/QGroupBox>
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
42 #include <QtWidgets/QPushButton>
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
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
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
48 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
49
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
50 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 }
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 MainWindow::~MainWindow()
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
55 {
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
56 qDebug() << Q_FUNC_INFO;
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
57 delete ui;
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58 }
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
60
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
61 void MainWindow::on_actionExit_triggered()
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
62 {
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
63 qDebug() << Q_FUNC_INFO;
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
64 this->close();
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
65 }
3
4b95e33ee476 We have a mainscreen!
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
66
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
67
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
68 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
69 {
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 qDebug() << Q_FUNC_INFO;
65
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
71 ui->mainStack->setCurrentIndex(-1);
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
72 ui->mainStack->removeWidget(InventorySuppliersWindow);
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
73 delete InventorySuppliersWindow;
64
b0d30697af67 First step in loading the Inventory Suppliers database on the mainscreen. But, it is loaded at program start en not removed when done. Weird programming to get this working.
Michiel Broek <mbroek@mbse.eu>
parents: 57
diff changeset
74 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
66
72386c164f54 Added texts on the buttons. Removed a number of debug messages. Hide and show the main menubar during edit. Removed unused and unneeded stackable window pages.
Michiel Broek <mbroek@mbse.eu>
parents: 65
diff changeset
75 ui->menuBar->setVisible(true);
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
76 }
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
77
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
78
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
79 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
80 {
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
81 qDebug() << Q_FUNC_INFO;
65
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
82
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
83 InventorySuppliersWindow = new InventorySuppliers(this);
66
72386c164f54 Added texts on the buttons. Removed a number of debug messages. Hide and show the main menubar during edit. Removed unused and unneeded stackable window pages.
Michiel Broek <mbroek@mbse.eu>
parents: 65
diff changeset
84 int index = ui->mainStack->count();
65
2ef981980daa Finally found out how to make these databases work on a single main window. And it's dynamic too.
Michiel Broek <mbroek@mbse.eu>
parents: 64
diff changeset
85 ui->mainStack->addWidget(InventorySuppliersWindow);
66
72386c164f54 Added texts on the buttons. Removed a number of debug messages. Hide and show the main menubar during edit. Removed unused and unneeded stackable window pages.
Michiel Broek <mbroek@mbse.eu>
parents: 65
diff changeset
86 ui->mainStack->setCurrentIndex(index);
64
b0d30697af67 First step in loading the Inventory Suppliers database on the mainscreen. But, it is loaded at program start en not removed when done. Weird programming to get this working.
Michiel Broek <mbroek@mbse.eu>
parents: 57
diff changeset
87 setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING));
66
72386c164f54 Added texts on the buttons. Removed a number of debug messages. Hide and show the main menubar during edit. Removed unused and unneeded stackable window pages.
Michiel Broek <mbroek@mbse.eu>
parents: 65
diff changeset
88 ui->menuBar->setVisible(false);
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
89 }
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
90
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
91
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
92 void MainWindow::fromInventoryFermentables()
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 qDebug() << Q_FUNC_INFO;
68
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
95 ui->mainStack->setCurrentIndex(-1);
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
96 ui->mainStack->removeWidget(InventoryFermentablesWindow);
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
97 delete InventoryFermentablesWindow;
68
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
98 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
99 ui->menuBar->setVisible(true);
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
100 }
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
101
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
102
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
103 void MainWindow::on_actionFermentables_triggered()
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
104 {
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
105 qDebug() << Q_FUNC_INFO;
68
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
106
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
107 InventoryFermentablesWindow = new InventoryFermentables(this);
68
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
108 int index = ui->mainStack->count();
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
109 ui->mainStack->addWidget(InventoryFermentablesWindow);
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
110 ui->mainStack->setCurrentIndex(index);
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
111 setWindowTitle(QString("BMSapp - %1 - Inventory Fermentables").arg(VERSIONSTRING));
abac28effb21 Inventory Fermentables now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 66
diff changeset
112 ui->menuBar->setVisible(false);
19
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
113 }
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
114
c94edc758a5b Added Inventory Fermentables table.
Michiel Broek <mbroek@mbse.eu>
parents: 16
diff changeset
115
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
116 void MainWindow::fromInventoryHops()
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
117 {
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
118 qDebug() << Q_FUNC_INFO;
69
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
119 ui->mainStack->setCurrentIndex(-1);
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
120 ui->mainStack->removeWidget(InventoryHopsWindow);
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
121 delete InventoryHopsWindow;
69
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
122 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
123 ui->menuBar->setVisible(true);
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
124 }
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
125
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
126
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
127 void MainWindow::on_actionHops_triggered()
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
128 {
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
129 qDebug() << Q_FUNC_INFO;
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
130 InventoryHopsWindow = new InventoryHops(this);
69
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
131 int index = ui->mainStack->count();
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
132 ui->mainStack->addWidget(InventoryHopsWindow);
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
133 ui->mainStack->setCurrentIndex(index);
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
134 setWindowTitle(QString("BMSapp - %1 - Inventory Hops").arg(VERSIONSTRING));
228cb2a01acf Inventory Hops now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 68
diff changeset
135 ui->menuBar->setVisible(false);
24
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
136 }
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
137
684c6e74cc1b Added hops editor.
Michiel Broek <mbroek@mbse.eu>
parents: 19
diff changeset
138
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
139 void MainWindow::fromInventoryYeasts()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
140 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
141 qDebug() << Q_FUNC_INFO;
70
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
142 ui->mainStack->setCurrentIndex(-1);
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
143 ui->mainStack->removeWidget(InventoryYeastsWindow);
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
144 delete InventoryYeastsWindow;
70
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
145 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
146 ui->menuBar->setVisible(true);
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
147 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
148
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
149
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
150 void MainWindow::on_actionYeasts_triggered()
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
151 {
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
152 qDebug() << Q_FUNC_INFO;
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
153 InventoryYeastsWindow = new InventoryYeasts(this);
70
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
154 int index = ui->mainStack->count();
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
155 ui->mainStack->addWidget(InventoryYeastsWindow);
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
156 ui->mainStack->setCurrentIndex(index);
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
157 setWindowTitle(QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING));
556b4202c5e7 Inventory Yeasts now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 69
diff changeset
158 ui->menuBar->setVisible(false);
25
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
159 }
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
160
a9da2744609e Added inventory yeasts editor. Fixed resource icons location.
Michiel Broek <mbroek@mbse.eu>
parents: 24
diff changeset
161
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
162 void MainWindow::fromInventoryMiscs()
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
163 {
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
164 qDebug() << Q_FUNC_INFO;
71
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
165 ui->mainStack->setCurrentIndex(-1);
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
166 ui->mainStack->removeWidget(InventoryMiscsWindow);
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
167 delete InventoryMiscsWindow;
71
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
168 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
169 ui->menuBar->setVisible(true);
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
170 }
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
171
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
172
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
173 void MainWindow::on_actionMiscs_triggered()
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
174 {
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
175 qDebug() << Q_FUNC_INFO;
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
176 InventoryMiscsWindow = new InventoryMiscs(this);
71
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
177 int index = ui->mainStack->count();
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
178 ui->mainStack->addWidget(InventoryMiscsWindow);
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
179 ui->mainStack->setCurrentIndex(index);
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
180 setWindowTitle(QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING));
5bd0d7be0167 Inventory Miscs now on the mainscreen.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
181 ui->menuBar->setVisible(false);
28
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
182 }
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
183
93a70b1502ca Added the inventory miscs table.
Michiel Broek <mbroek@mbse.eu>
parents: 25
diff changeset
184
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
185 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
186 {
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
187 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
188 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
189 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
190 }
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
191
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
192
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
193 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
194 {
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
195 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
196 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
197 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
198 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
199 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
200 }
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
201
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
202
30
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
203 void MainWindow::fromInventoryEquipments()
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
204 {
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
205 qDebug() << Q_FUNC_INFO;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
206 delete InventoryEquipmentsWindow;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
207 this->show();
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
208 }
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
209
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
210
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
211 void MainWindow::on_actionEquipments_triggered()
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
212 {
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
213 qDebug() << Q_FUNC_INFO;
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
214 InventoryEquipmentsWindow = new InventoryEquipments(this);
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
215 QObject::connect(InventoryEquipmentsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryEquipments()));
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
216 this->hide(); // Close the main window
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
217 InventoryEquipmentsWindow->show(); // Show a second window
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
218 }
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
219
0fec6a1abd13 Added inventory equipment table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 29
diff changeset
220
52
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
221 void MainWindow::on_actionSupplies_list_triggered()
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
222 {
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
223 qDebug() << Q_FUNC_INFO;
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
224 QDialog *printer = new PrinterDialog(PR_SUPPLIES, -1, this);
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
225 }
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
226
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
227
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
228 void MainWindow::on_actionYeast_bank_triggered()
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
229 {
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
230 qDebug() << Q_FUNC_INFO;
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
231 QDialog *printer = new PrinterDialog(PR_YEASTBANK, -1, this);
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
232 }
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
233
ff7b3a41c9b5 After several days experimenting, trials and a lot of errors, a working and nice looking printer support has been added to the application.
Michiel Broek <mbroek@mbse.eu>
parents: 49
diff changeset
234
48
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
235 void MainWindow::fromProfileWaters()
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
236 {
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
237 qDebug() << Q_FUNC_INFO;
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
238 delete ProfileWatersWindow;
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
239 this->show();
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
240 }
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
241
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
242
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
243 void MainWindow::on_actionWater_profiles_triggered()
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
244 {
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
245 qDebug() << Q_FUNC_INFO;
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
246 ProfileWatersWindow = new ProfileWaters(this);
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
247 QObject::connect(ProfileWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileWaters()));
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
248 this->hide(); // Close the main window
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
249 ProfileWatersWindow->show(); // Show a second window
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
250 }
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
251
ddd1171ecda5 Added profile water table and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 30
diff changeset
252
49
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
253 void MainWindow::fromProfileMashs()
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
254 {
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
255 qDebug() << Q_FUNC_INFO;
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
256 delete ProfileMashsWindow;
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
257 this->show();
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
258 }
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
259
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
260
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
261 void MainWindow::on_actionMash_profiles_triggered()
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
262 {
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
263 qDebug() << Q_FUNC_INFO;
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
264 ProfileMashsWindow = new ProfileMashs(this);
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
265 QObject::connect(ProfileMashsWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileMashs()));
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
266 this->hide(); // Close the main window
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
267 ProfileMashsWindow->show(); // Show a second window
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
268 }
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
269
29cf6e350063 Added Mash profiles table and the first part of the Mash profile editor. Edit and write must be written.
Michiel Broek <mbroek@mbse.eu>
parents: 48
diff changeset
270
56
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
271 void MainWindow::fromProfileStyles()
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
272 {
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
273 qDebug() << Q_FUNC_INFO;
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
274 delete ProfileStylesWindow;
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
275 this->show();
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
276 }
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
277
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
278
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
279 void MainWindow::on_actionStyles_profiles_triggered()
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
280 {
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
281 qDebug() << Q_FUNC_INFO;
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
282 ProfileStylesWindow = new ProfileStyles(this);
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
283 QObject::connect(ProfileStylesWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileStyles()));
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
284 this->hide(); // Close the main window
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
285 ProfileStylesWindow->show(); // Show a second window
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
286 }
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
287
eb6c564192f4 Added styles tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 52
diff changeset
288
57
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
289 void MainWindow::fromProfileFerments()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
290 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
291 qDebug() << Q_FUNC_INFO;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
292 delete ProfileFermentsWindow;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
293 this->show();
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
294 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
295
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
296
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
297 void MainWindow::on_actionFerments_profiles_triggered()
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
298 {
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
299 qDebug() << Q_FUNC_INFO;
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
300 ProfileFermentsWindow = new ProfileFerments(this);
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
301 QObject::connect(ProfileFermentsWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileFerments()));
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
302 this->hide(); // Close the main window
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
303 ProfileFermentsWindow->show(); // Show a second window
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
304 }
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
305
75d11cc05ce4 Added profile fermentation tables and editor.
Michiel Broek <mbroek@mbse.eu>
parents: 56
diff changeset
306
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
307 void MainWindow::fromSetup()
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
308 {
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
309 qDebug() << Q_FUNC_INFO;
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
310 delete SetupWindow;
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
311 this->show();
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
312 }
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
313
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
314
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
315 void MainWindow::on_actionSetup_triggered()
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
316 {
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
317 qDebug() << Q_FUNC_INFO;
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
318 SetupWindow = new Setup(this);
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
319 QObject::connect(SetupWindow, SIGNAL(firstWindow()), this, SLOT(fromSetup()));
16
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
320 this->hide(); // Close the main window
a5d8e783a7b0 Completed the global setup editor.
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
321 SetupWindow->show(); // Show a setup window
15
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
322 }
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
323
c58b82549713 Started adding the global setup screen.
Michiel Broek <mbroek@mbse.eu>
parents: 6
diff changeset
324
4
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
325 void MainWindow::on_actionAbout_triggered()
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
326 {
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
327 AboutDialog dialog(this);
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
328 dialog.setModal(true);
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
329 dialog.exec();
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
330 }
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
331
fe106c497b75 Added About dialog
Michiel Broek <mbroek@mbse.eu>
parents: 3
diff changeset
332

mercurial