From 1f3225f7530ae4dbe1509758c4ed8565d82bd661 Mon Sep 17 00:00:00 2001
From: beuchatp <beuchatp@control.ee.ethz.ch>
Date: Sat, 8 Dec 2018 16:09:34 +0100
Subject: [PATCH] Added load yaml drop down menu to flying agent GUI

---
 .../GUI_Qt/flyingAgentGUI/forms/mainwindow.ui | 20 ++++++++++++++++++-
 .../flyingAgentGUI/include/mainwindow.h       |  2 ++
 .../GUI_Qt/flyingAgentGUI/src/mainwindow.cpp  | 18 +++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
index 9c03449c..e35441f9 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/mainwindow.ui
@@ -151,7 +151,7 @@
      <x>0</x>
      <y>0</y>
      <width>1862</width>
-     <height>25</height>
+     <height>40</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
@@ -160,7 +160,15 @@
     </property>
     <addaction name="actionShowHide_Coordinator"/>
    </widget>
+   <widget class="QMenu" name="menuLoad_YAML">
+    <property name="title">
+     <string>LoadYAML</string>
+    </property>
+    <addaction name="action_LoadYAML_BatteryMonitor"/>
+    <addaction name="action_LoadYAML_ClientConfig"/>
+   </widget>
    <addaction name="menuFile"/>
+   <addaction name="menuLoad_YAML"/>
   </widget>
   <widget class="QToolBar" name="mainToolBar">
    <attribute name="toolBarArea">
@@ -176,6 +184,16 @@
     <string>Hide Coordinator</string>
    </property>
   </action>
+  <action name="action_LoadYAML_BatteryMonitor">
+   <property name="text">
+    <string>BatteryMonitor</string>
+   </property>
+  </action>
+  <action name="action_LoadYAML_ClientConfig">
+   <property name="text">
+    <string>ClientConfig</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
index 124eda80..f61703c4 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/include/mainwindow.h
@@ -58,6 +58,8 @@ public:
 
 private slots:
     void on_actionShowHide_Coordinator_triggered();
+    void on_action_LoadYAML_BatteryMonitor_triggered();
+    void on_action_LoadYAML_ClientConfig_triggered();
 
 private:
     Ui::MainWindow *ui;
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp
index 13382717..544d3ab3 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/src/mainwindow.cpp
@@ -76,3 +76,21 @@ void MainWindow::on_actionShowHide_Coordinator_triggered()
         ui->actionShowHide_Coordinator->setText(qstr);
     }
 }
+
+
+void MainWindow::on_action_LoadYAML_BatteryMonitor_triggered()
+{
+#ifdef CATKIN_MAKE
+    // Send a message that the "BatteryMonitor" Yaml should be loaded
+    // by the appropriate Parameter Service
+#endif
+}
+
+
+void MainWindow::on_action_LoadYAML_ClientConfig_triggered()
+{
+#ifdef CATKIN_MAKE
+    // Send a message that the "ClientConfig" Yaml should be loaded
+    // by the appropriate Parameter Service
+#endif
+}
-- 
GitLab