src/MainWindow.cpp

changeset 29
76846c99f827
parent 28
93a70b1502ca
child 30
0fec6a1abd13
equal deleted inserted replaced
28:93a70b1502ca 29:76846c99f827
19 #include "InventorySuppliers.h" 19 #include "InventorySuppliers.h"
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 "Setup.h" 25 #include "Setup.h"
25 #include "../ui/ui_MainWindow.h" 26 #include "../ui/ui_MainWindow.h"
26 #include "config.h" 27 #include "config.h"
27 28
28 #include <QApplication> 29 #include <QApplication>
143 this->hide(); // Close the main window 144 this->hide(); // Close the main window
144 InventoryMiscsWindow->show(); // Show a second window 145 InventoryMiscsWindow->show(); // Show a second window
145 } 146 }
146 147
147 148
149 void MainWindow::fromInventoryWaters()
150 {
151 qDebug() << Q_FUNC_INFO;
152 delete InventoryWatersWindow;
153 this->show();
154 }
155
156
157 void MainWindow::on_actionWaters_triggered()
158 {
159 qDebug() << Q_FUNC_INFO;
160 InventoryWatersWindow = new InventoryWaters(this);
161 QObject::connect(InventoryWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryWaters()));
162 this->hide(); // Close the main window
163 InventoryWatersWindow->show(); // Show a second window
164 }
165
166
148 void MainWindow::fromSetup() 167 void MainWindow::fromSetup()
149 { 168 {
150 qDebug() << Q_FUNC_INFO; 169 qDebug() << Q_FUNC_INFO;
151 delete SetupWindow; 170 delete SetupWindow;
152 this->show(); 171 this->show();

mercurial