src/MainWindow.cpp

changeset 30
0fec6a1abd13
parent 29
76846c99f827
child 48
ddd1171ecda5
equal deleted inserted replaced
29:76846c99f827 30:0fec6a1abd13
20 #include "InventoryFermentables.h" 20 #include "InventoryFermentables.h"
21 #include "InventoryHops.h" 21 #include "InventoryHops.h"
22 #include "InventoryYeasts.h" 22 #include "InventoryYeasts.h"
23 #include "InventoryMiscs.h" 23 #include "InventoryMiscs.h"
24 #include "InventoryWaters.h" 24 #include "InventoryWaters.h"
25 #include "InventoryEquipments.h"
25 #include "Setup.h" 26 #include "Setup.h"
26 #include "../ui/ui_MainWindow.h" 27 #include "../ui/ui_MainWindow.h"
27 #include "config.h" 28 #include "config.h"
28 29
29 #include <QApplication> 30 #include <QApplication>
162 this->hide(); // Close the main window 163 this->hide(); // Close the main window
163 InventoryWatersWindow->show(); // Show a second window 164 InventoryWatersWindow->show(); // Show a second window
164 } 165 }
165 166
166 167
168 void MainWindow::fromInventoryEquipments()
169 {
170 qDebug() << Q_FUNC_INFO;
171 delete InventoryEquipmentsWindow;
172 this->show();
173 }
174
175
176 void MainWindow::on_actionEquipments_triggered()
177 {
178 qDebug() << Q_FUNC_INFO;
179 InventoryEquipmentsWindow = new InventoryEquipments(this);
180 QObject::connect(InventoryEquipmentsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryEquipments()));
181 this->hide(); // Close the main window
182 InventoryEquipmentsWindow->show(); // Show a second window
183 }
184
185
167 void MainWindow::fromSetup() 186 void MainWindow::fromSetup()
168 { 187 {
169 qDebug() << Q_FUNC_INFO; 188 qDebug() << Q_FUNC_INFO;
170 delete SetupWindow; 189 delete SetupWindow;
171 this->show(); 190 this->show();

mercurial