src/MainWindow.cpp

changeset 48
ddd1171ecda5
parent 30
0fec6a1abd13
child 49
29cf6e350063
--- a/src/MainWindow.cpp	Sun Mar 06 12:00:07 2022 +0100
+++ b/src/MainWindow.cpp	Sun Mar 06 15:31:40 2022 +0100
@@ -23,6 +23,7 @@
 #include "InventoryMiscs.h"
 #include "InventoryWaters.h"
 #include "InventoryEquipments.h"
+#include "ProfileWaters.h"
 #include "Setup.h"
 #include "../ui/ui_MainWindow.h"
 #include "config.h"
@@ -183,6 +184,24 @@
 }
 
 
+void MainWindow::fromProfileWaters()
+{
+    qDebug() << Q_FUNC_INFO;
+    delete ProfileWatersWindow;
+    this->show();
+}
+
+
+void MainWindow::on_actionWater_profiles_triggered()
+{
+    qDebug() << Q_FUNC_INFO;
+    ProfileWatersWindow = new ProfileWaters(this);
+    QObject::connect(ProfileWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileWaters()));
+    this->hide();    // Close the main window
+    ProfileWatersWindow->show();  // Show a second window
+}
+
+
 void MainWindow::fromSetup()
 {
     qDebug() << Q_FUNC_INFO;

mercurial