15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
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 "Setup.h" |
21 #include "Setup.h" |
21 #include "../ui/ui_MainWindow.h" |
22 #include "../ui/ui_MainWindow.h" |
22 #include "config.h" |
23 #include "config.h" |
23 |
24 |
24 #include <QApplication> |
25 #include <QApplication> |
67 this->hide(); // Close the main window |
68 this->hide(); // Close the main window |
68 InventorySuppliersWindow->show(); // Show a second window |
69 InventorySuppliersWindow->show(); // Show a second window |
69 } |
70 } |
70 |
71 |
71 |
72 |
|
73 void MainWindow::fromInventoryFermentables() |
|
74 { |
|
75 qDebug() << Q_FUNC_INFO; |
|
76 delete InventoryFermentablesWindow; |
|
77 this->show(); |
|
78 } |
|
79 |
|
80 |
|
81 void MainWindow::on_actionFermentables_triggered() |
|
82 { |
|
83 qDebug() << Q_FUNC_INFO; |
|
84 InventoryFermentablesWindow = new InventoryFermentables(this); |
|
85 QObject::connect(InventoryFermentablesWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryFermentables())); |
|
86 this->hide(); // Close the main window |
|
87 InventoryFermentablesWindow->show(); // Show a second window |
|
88 } |
|
89 |
|
90 |
72 void MainWindow::fromSetup() |
91 void MainWindow::fromSetup() |
73 { |
92 { |
74 qDebug() << Q_FUNC_INFO; |
93 qDebug() << Q_FUNC_INFO; |
75 delete SetupWindow; |
94 delete SetupWindow; |
76 this->show(); |
95 this->show(); |