src/MainWindow.cpp

changeset 81
562ed7d1b74d
parent 79
e726db72da3c
child 88
64cf5468fd22
--- a/src/MainWindow.cpp	Mon Mar 21 13:46:33 2022 +0100
+++ b/src/MainWindow.cpp	Wed Mar 23 22:00:28 2022 +0100
@@ -16,6 +16,7 @@
  */
 #include "MainWindow.h"
 #include "AboutDialog.h"
+#include "RecipesTree.h"
 #include "InventorySuppliers.h"
 #include "InventoryFermentables.h"
 #include "InventoryHops.h"
@@ -65,6 +66,30 @@
 }
 
 
+void MainWindow::fromRecipesTree()
+{
+    qDebug() << Q_FUNC_INFO;
+    ui->mainStack->setCurrentIndex(-1);
+    ui->mainStack->removeWidget(RecipesTreeWindow);
+    delete RecipesTreeWindow;
+    setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
+    ui->menuBar->setVisible(true);
+}
+
+
+void MainWindow::on_actionRecipes_triggered()
+{
+    qDebug() << Q_FUNC_INFO;
+
+    RecipesTreeWindow = new RecipesTree(this);
+    int index = ui->mainStack->count();
+    ui->mainStack->addWidget(RecipesTreeWindow);
+    ui->mainStack->setCurrentIndex(index);
+    setWindowTitle( QString("BMSapp - %1 - Recipes").arg(VERSIONSTRING));
+//    ui->menuBar->setVisible(false);
+}
+
+
 void MainWindow::fromInventorySuppliers()
 {
     qDebug() << Q_FUNC_INFO;

mercurial