From 958091feacf13b9505ff22f781d5749ba22fe484 Mon Sep 17 00:00:00 2001
From: Paul Beuchat <beuchatp@control.ee.ethz.ch>
Date: Sun, 9 Sep 2018 23:55:52 +0200
Subject: [PATCH] Adjusted sizing of the flying agent GUI forms

---
 .../flyingAgentGUI/forms/coordinator.ui       |  11 +-
 .../flyingAgentGUI/forms/coordinatorrow.ui    | 167 ++++++++++------
 .../forms/enablecontrollerloadyamlbar.ui      | 184 +++++++++---------
 .../GUI_Qt/flyingAgentGUI/forms/mainwindow.ui |  14 +-
 4 files changed, 222 insertions(+), 154 deletions(-)

diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinator.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinator.ui
index 7969a64d..13377061 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinator.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinator.ui
@@ -67,8 +67,13 @@
    </item>
    <item>
     <widget class="QCheckBox" name="coordinate_all_checkBox">
+     <property name="font">
+      <font>
+       <pointsize>16</pointsize>
+      </font>
+     </property>
      <property name="styleSheet">
-      <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
+      <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
      </property>
      <property name="text">
       <string>Coordinate All</string>
@@ -88,8 +93,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>571</width>
-        <height>744</height>
+        <width>583</width>
+        <height>854</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_for_coordinatedAgentsScrollArea"/>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
index 0fce7b31..790ff9ce 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/coordinatorrow.ui
@@ -6,25 +6,31 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1567</width>
-    <height>72</height>
+    <width>660</width>
+    <height>45</height>
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+   <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
    </sizepolicy>
   </property>
+  <property name="minimumSize">
+   <size>
+    <width>0</width>
+    <height>45</height>
+   </size>
+  </property>
   <property name="maximumSize">
    <size>
     <width>16777215</width>
-    <height>80</height>
+    <height>45</height>
    </size>
   </property>
   <property name="font">
    <font>
-    <pointsize>16</pointsize>
+    <pointsize>12</pointsize>
    </font>
   </property>
   <property name="windowTitle">
@@ -32,47 +38,50 @@
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
    <property name="spacing">
-    <number>15</number>
+    <number>2</number>
+   </property>
+   <property name="leftMargin">
+    <number>2</number>
    </property>
    <property name="topMargin">
-    <number>6</number>
+    <number>5</number>
    </property>
    <property name="rightMargin">
-    <number>12</number>
+    <number>2</number>
    </property>
    <property name="bottomMargin">
-    <number>6</number>
+    <number>5</number>
    </property>
    <item>
     <widget class="QCheckBox" name="shouldCoordinate_checkBox">
      <property name="sizePolicy">
-      <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
      <property name="minimumSize">
       <size>
-       <width>120</width>
-       <height>40</height>
+       <width>180</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>40</height>
+       <width>180</width>
+       <height>35</height>
       </size>
      </property>
      <property name="font">
       <font>
-       <pointsize>16</pointsize>
+       <pointsize>12</pointsize>
       </font>
      </property>
      <property name="styleSheet">
-      <string notr="true">QCheckBox::indicator{ width:40px ; height:40px }</string>
+      <string notr="true">QCheckBox::indicator{ width:30px ; height:30px }</string>
      </property>
      <property name="text">
-      <string>XXX</string>
+      <string>IDYYY , PPS_CFXX</string>
      </property>
      <property name="checkable">
       <bool>true</bool>
@@ -81,20 +90,26 @@
    </item>
    <item>
     <widget class="QPushButton" name="rf_disconnect_button">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>0</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
-      <string>RF-DIS</string>
+      <string>DIS</string>
      </property>
     </widget>
    </item>
@@ -108,14 +123,14 @@
      </property>
      <property name="minimumSize">
       <size>
-       <width>70</width>
-       <height>50</height>
+       <width>43</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>70</width>
-       <height>50</height>
+       <width>43</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
@@ -125,20 +140,26 @@
    </item>
    <item>
     <widget class="QPushButton" name="rf_connect_button">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>0</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
-      <string>RF-CON</string>
+      <string>CON</string>
      </property>
     </widget>
    </item>
@@ -152,14 +173,14 @@
      </property>
      <property name="minimumSize">
       <size>
-       <width>160</width>
-       <height>60</height>
+       <width>68</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>160</width>
-       <height>60</height>
+       <width>68</width>
+       <height>35</height>
       </size>
      </property>
      <property name="font">
@@ -178,14 +199,14 @@
     <widget class="QLabel" name="battery_status_label">
      <property name="minimumSize">
       <size>
-       <width>50</width>
-       <height>50</height>
+       <width>25</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>50</width>
-       <height>50</height>
+       <width>25</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
@@ -195,16 +216,22 @@
    </item>
    <item>
     <widget class="QPushButton" name="enable_flying_button">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>0</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
@@ -214,16 +241,22 @@
    </item>
    <item>
     <widget class="QPushButton" name="disable_flying_button">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>0</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
@@ -241,14 +274,14 @@
      </property>
      <property name="minimumSize">
       <size>
-       <width>70</width>
-       <height>50</height>
+       <width>50</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>70</width>
-       <height>50</height>
+       <width>50</width>
+       <height>35</height>
       </size>
      </property>
      <property name="text">
@@ -258,16 +291,22 @@
    </item>
    <item>
     <widget class="QPushButton" name="motors_off_button">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
-       <width>0</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>16777215</width>
-       <height>50</height>
+       <width>40</width>
+       <height>35</height>
       </size>
      </property>
      <property name="font">
@@ -283,6 +322,24 @@
    </item>
    <item>
     <widget class="QLabel" name="controller_enabled_label">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>70</width>
+       <height>35</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>70</width>
+       <height>35</height>
+      </size>
+     </property>
      <property name="text">
       <string>Controller</string>
      </property>
diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
index 38bee8ad..a18b775e 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/flyingAgentGUI/forms/enablecontrollerloadyamlbar.ui
@@ -30,21 +30,21 @@
      <item row="0" column="0">
       <widget class="QLabel" name="enable_controller_top_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>0</height>
+         <width>120</width>
+         <height>20</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>16777215</height>
+         <width>180</width>
+         <height>20</height>
         </size>
        </property>
        <property name="font">
@@ -64,21 +64,21 @@
      <item row="0" column="1">
       <widget class="QLabel" name="load_yaml_top_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>0</height>
+         <width>120</width>
+         <height>20</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>16777215</height>
+         <width>180</width>
+         <height>20</height>
         </size>
        </property>
        <property name="font">
@@ -98,21 +98,21 @@
      <item row="3" column="1">
       <widget class="QPushButton" name="load_yaml_demo_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="text">
@@ -123,27 +123,27 @@
      <item row="3" column="0">
       <widget class="QPushButton" name="enable_demo_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="font">
         <font>
-         <weight>75</weight>
-         <bold>true</bold>
+         <weight>50</weight>
+         <bold>false</bold>
         </font>
        </property>
        <property name="text">
@@ -154,54 +154,23 @@
      <item row="2" column="1">
       <widget class="QPushButton" name="load_yaml_safe_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize">
-        <size>
-         <width>160</width>
-         <height>80</height>
-        </size>
-       </property>
-       <property name="maximumSize">
-        <size>
-         <width>220</width>
-         <height>80</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>Safe</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="0">
-      <widget class="QPushButton" name="enable_safe_button">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
-       <property name="font">
-        <font>
-         <weight>75</weight>
-         <bold>true</bold>
-        </font>
-       </property>
        <property name="text">
         <string>Safe</string>
        </property>
@@ -223,21 +192,21 @@
      <item row="1" column="0">
       <widget class="QLabel" name="enable_controller_bot_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>0</height>
+         <width>120</width>
+         <height>20</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>16777215</height>
+         <width>180</width>
+         <height>20</height>
         </size>
        </property>
        <property name="font">
@@ -257,21 +226,21 @@
      <item row="1" column="1">
       <widget class="QLabel" name="load_yaml_bot_label">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>0</height>
+         <width>120</width>
+         <height>20</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>16777215</height>
+         <width>180</width>
+         <height>20</height>
         </size>
        </property>
        <property name="font">
@@ -291,27 +260,27 @@
      <item row="4" column="0">
       <widget class="QPushButton" name="enable_student_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="font">
         <font>
-         <weight>75</weight>
-         <bold>true</bold>
+         <weight>50</weight>
+         <bold>false</bold>
         </font>
        </property>
        <property name="text">
@@ -322,21 +291,21 @@
      <item row="4" column="1">
       <widget class="QPushButton" name="load_yaml_student_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="text">
@@ -347,27 +316,27 @@
      <item row="5" column="0">
       <widget class="QPushButton" name="enable_mpc_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="font">
         <font>
-         <weight>75</weight>
-         <bold>true</bold>
+         <weight>50</weight>
+         <bold>false</bold>
         </font>
        </property>
        <property name="text">
@@ -378,21 +347,21 @@
      <item row="5" column="1">
       <widget class="QPushButton" name="load_yaml_mpc_button">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="minimumSize">
         <size>
-         <width>160</width>
-         <height>80</height>
+         <width>120</width>
+         <height>40</height>
         </size>
        </property>
        <property name="maximumSize">
         <size>
-         <width>220</width>
-         <height>80</height>
+         <width>180</width>
+         <height>40</height>
         </size>
        </property>
        <property name="text">
@@ -400,6 +369,37 @@
        </property>
       </widget>
      </item>
+     <item row="2" column="0">
+      <widget class="QPushButton" name="enable_safe_button">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>120</width>
+         <height>40</height>
+        </size>
+       </property>
+       <property name="maximumSize">
+        <size>
+         <width>180</width>
+         <height>40</height>
+        </size>
+       </property>
+       <property name="font">
+        <font>
+         <weight>50</weight>
+         <bold>false</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string>Safe</string>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
   </layout>
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 cbad976e..9c03449c 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
@@ -36,13 +36,13 @@
        <widget class="Coordinator" name="customWidget_coordinator" native="true">
         <property name="minimumSize">
          <size>
-          <width>900</width>
+          <width>400</width>
           <height>0</height>
          </size>
         </property>
         <property name="maximumSize">
          <size>
-          <width>1500</width>
+          <width>680</width>
           <height>16777215</height>
          </size>
         </property>
@@ -118,11 +118,17 @@
              <bool>true</bool>
             </property>
             <property name="sizePolicy">
-             <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
+            <property name="minimumSize">
+             <size>
+              <width>200</width>
+              <height>0</height>
+             </size>
+            </property>
             <property name="maximumSize">
              <size>
               <width>500</width>
@@ -145,7 +151,7 @@
      <x>0</x>
      <y>0</y>
      <width>1862</width>
-     <height>37</height>
+     <height>25</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">
-- 
GitLab