14 * You should have received a copy of the GNU General Public License |
14 * You should have received a copy of the GNU General Public License |
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 "RecipesTree.h" |
19 #include "InventorySuppliers.h" |
20 #include "InventorySuppliers.h" |
20 #include "InventoryFermentables.h" |
21 #include "InventoryFermentables.h" |
21 #include "InventoryHops.h" |
22 #include "InventoryHops.h" |
22 #include "InventoryYeasts.h" |
23 #include "InventoryYeasts.h" |
23 #include "InventoryMiscs.h" |
24 #include "InventoryMiscs.h" |
63 qDebug() << Q_FUNC_INFO; |
64 qDebug() << Q_FUNC_INFO; |
64 this->close(); |
65 this->close(); |
65 } |
66 } |
66 |
67 |
67 |
68 |
|
69 void MainWindow::fromRecipesTree() |
|
70 { |
|
71 qDebug() << Q_FUNC_INFO; |
|
72 ui->mainStack->setCurrentIndex(-1); |
|
73 ui->mainStack->removeWidget(RecipesTreeWindow); |
|
74 delete RecipesTreeWindow; |
|
75 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
|
76 ui->menuBar->setVisible(true); |
|
77 } |
|
78 |
|
79 |
|
80 void MainWindow::on_actionRecipes_triggered() |
|
81 { |
|
82 qDebug() << Q_FUNC_INFO; |
|
83 |
|
84 RecipesTreeWindow = new RecipesTree(this); |
|
85 int index = ui->mainStack->count(); |
|
86 ui->mainStack->addWidget(RecipesTreeWindow); |
|
87 ui->mainStack->setCurrentIndex(index); |
|
88 setWindowTitle( QString("BMSapp - %1 - Recipes").arg(VERSIONSTRING)); |
|
89 // ui->menuBar->setVisible(false); |
|
90 } |
|
91 |
|
92 |
68 void MainWindow::fromInventorySuppliers() |
93 void MainWindow::fromInventorySuppliers() |
69 { |
94 { |
70 qDebug() << Q_FUNC_INFO; |
95 qDebug() << Q_FUNC_INFO; |
71 ui->mainStack->setCurrentIndex(-1); |
96 ui->mainStack->setCurrentIndex(-1); |
72 ui->mainStack->removeWidget(InventorySuppliersWindow); |
97 ui->mainStack->removeWidget(InventorySuppliersWindow); |