src/MainWindow.cpp

changeset 24
684c6e74cc1b
parent 19
c94edc758a5b
child 25
a9da2744609e
equal deleted inserted replaced
23:1ac3fb2569c1 24:684c6e74cc1b
16 */ 16 */
17 #include "MainWindow.h" 17 #include "MainWindow.h"
18 #include "AboutDialog.h" 18 #include "AboutDialog.h"
19 #include "InventorySuppliers.h" 19 #include "InventorySuppliers.h"
20 #include "InventoryFermentables.h" 20 #include "InventoryFermentables.h"
21 #include "InventoryHops.h"
21 #include "Setup.h" 22 #include "Setup.h"
22 #include "../ui/ui_MainWindow.h" 23 #include "../ui/ui_MainWindow.h"
23 #include "config.h" 24 #include "config.h"
24 25
25 #include <QApplication> 26 #include <QApplication>
86 this->hide(); // Close the main window 87 this->hide(); // Close the main window
87 InventoryFermentablesWindow->show(); // Show a second window 88 InventoryFermentablesWindow->show(); // Show a second window
88 } 89 }
89 90
90 91
92 void MainWindow::fromInventoryHops()
93 {
94 qDebug() << Q_FUNC_INFO;
95 delete InventoryHopsWindow;
96 this->show();
97 }
98
99
100 void MainWindow::on_actionHops_triggered()
101 {
102 qDebug() << Q_FUNC_INFO;
103 InventoryHopsWindow = new InventoryHops(this);
104 QObject::connect(InventoryHopsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryHops()));
105 this->hide(); // Close the main window
106 InventoryHopsWindow->show(); // Show a second window
107 }
108
109
91 void MainWindow::fromSetup() 110 void MainWindow::fromSetup()
92 { 111 {
93 qDebug() << Q_FUNC_INFO; 112 qDebug() << Q_FUNC_INFO;
94 delete SetupWindow; 113 delete SetupWindow;
95 this->show(); 114 this->show();

mercurial