Commit b970f347 authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Fix #455, splitted the SRT AS GUI into a management one and a view-only one. (#456)

The management one has the buttons to control the functions of the USDs enabled, the view-only one has those buttons disabled and hidden. The view-only one can actually set the profile of the AS or park it like before (is not actually completely view-only, but the USDs cannot be controlled manually).
parent 0fbc43ca
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
#include <maciSimpleClient.h>
#include <qthread.h>

class eventLoop:public QThread
{
	public:
	virtual void run(void);
	virtual void setSimpleClient(maci::SimpleClient*);
	virtual void stop(void);

	private:
	maci::SimpleClient* sc;
	bool eventEnd;
};
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ class SRTActiveSurfaceGUI : public QWidget, public Ui_SRTActiveSurfaceGUI

    public slots:
        void Quit();
        void manager();
        void move();
        void setprofile();
        void correction();
+5 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ USER_LIB = -lACE \
#
# C programs (public and local)
# -----------------------------
EXECUTABLES     = SRTActiveSurfaceGUIClient
EXECUTABLES     = SRTActiveSurfaceGUIClient SRTActiveSurfaceManagementGUIClient
EXECUTABLES_L   = 

#
@@ -136,6 +136,8 @@ QT_COMPILE_FILES = $(subst .cpp,,$(QT_UI_FILES_MOC) $(QT_UI_FILES_EXTERN_MOC_H)
# <brief description of xxxxx program>
SRTActiveSurfaceGUIClient_OBJECTS   = $(QT_COMPILE_FILES) SRTActiveSurfaceGUIui SRTActiveSurfaceCore SRTActiveSurfaceClientEventLoop SRTActiveSurfaceGUIClient 
SRTActiveSurfaceGUIClient_LIBS      = IRALibrary ActiveSurfaceBossStubs SRTActiveSurfaceBossStubs ASErrors ComponentErrors ClientErrors ManagementErrors ManagmentDefinitionsStubs
SRTActiveSurfaceManagementGUIClient_OBJECTS   = $(QT_COMPILE_FILES) SRTActiveSurfaceManagementGUIui SRTActiveSurfaceCore SRTActiveSurfaceClientEventLoop SRTActiveSurfaceGUIClient 
SRTActiveSurfaceManagementGUIClient_LIBS      = IRALibrary ActiveSurfaceBossStubs SRTActiveSurfaceBossStubs ASErrors ComponentErrors ClientErrors ManagementErrors ManagmentDefinitionsStubs

$(PROG)_OBJECTS            = $(PROG)
$(PROG)_LDFLAGS            =
@@ -145,6 +147,7 @@ $(PROG)_LIBS = C++
#
# special compilation flags for single c sources
#yyyyy_CFLAGS   = 
SRTActiveSurfaceManagementGUIui_CFLAGS   = -DMANAGEMENT

#
# Includes (.h) files (public only)
@@ -325,6 +328,7 @@ man : do_man
	@echo " . . . man page(s) done"

install : install_all
	@chmod 700 $(INTROOT)/bin/SRTActiveSurfaceManagementGUIClient
	@echo " . . . installation done"


+0 −25
Original line number Diff line number Diff line
#include <SRTActiveSurfaceEventLoop.h>
#include <maciSimpleClient.h>
#include <ace/Time_Value.h>

void eventLoop::setSimpleClient (maci::SimpleClient * theClient)
{
  sc = theClient;
}

void eventLoop::run (void)
{
  eventEnd = false;
  ACE_Time_Value t;

  while (!eventEnd)
    {
      t.set (5L, 0L);
      sc->run (t);
    }
}

void eventLoop::stop (void)
{
  eventEnd = true;
}
+3 −558
Original line number Diff line number Diff line
@@ -25,464 +25,6 @@
  <property name="windowTitle">
   <string>SRT Active Surface</string>
  </property>
  <widget class="QPushButton" name="ManagerButton">
   <property name="geometry">
    <rect>
     <x>975</x>
     <y>408</y>
     <width>130</width>
     <height>35</height>
    </rect>
   </property>
   <property name="palette">
    <palette>
     <active>
      <colorrole role="WindowText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Button">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Light">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>127</red>
         <green>170</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Midlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>63</red>
         <green>127</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Dark">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>42</green>
         <blue>127</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Mid">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>57</green>
         <blue>170</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Text">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="BrightText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="ButtonText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Base">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Window">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Shadow">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Highlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="HighlightedText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Link">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="LinkVisited">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
     </active>
     <inactive>
      <colorrole role="WindowText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Button">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Light">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>127</red>
         <green>170</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Midlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>38</red>
         <green>110</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Dark">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>42</green>
         <blue>127</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Mid">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>57</green>
         <blue>170</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Text">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="BrightText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="ButtonText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Base">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Window">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Shadow">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Highlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="HighlightedText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Link">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="LinkVisited">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>0</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
     </inactive>
     <disabled>
      <colorrole role="WindowText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>128</red>
         <green>128</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Button">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Light">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>127</red>
         <green>170</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Midlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>38</red>
         <green>110</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Dark">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>42</green>
         <blue>127</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Mid">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>57</green>
         <blue>170</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Text">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>128</red>
         <green>128</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="BrightText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="ButtonText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>128</red>
         <green>128</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Base">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Window">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>85</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Shadow">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>0</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Highlight">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>128</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="HighlightedText">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>255</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="Link">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>0</red>
         <green>0</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
      <colorrole role="LinkVisited">
       <brush brushstyle="SolidPattern">
        <color alpha="255">
         <red>255</red>
         <green>0</green>
         <blue>255</blue>
        </color>
       </brush>
      </colorrole>
     </disabled>
    </palette>
   </property>
   <property name="styleSheet">
    <string>background-color: rgb(0, 85, 255);</string>
   </property>
   <property name="text">
    <string>MANAGER</string>
   </property>
  </widget>
  <widget class="QLabel" name="ActuatorLabel">
   <property name="geometry">
    <rect>
@@ -994,46 +536,6 @@
    <bool>true</bool>
   </property>
  </widget>
  <widget class="QLineEdit" name="ManagerPasswordlineEdit">
   <property name="enabled">
    <bool>false</bool>
   </property>
   <property name="geometry">
    <rect>
     <x>1115</x>
     <y>408</y>
     <width>135</width>
     <height>35</height>
    </rect>
   </property>
   <property name="font">
    <font>
     <family>DejaVu LGC Sans</family>
     <pointsize>12</pointsize>
    </font>
   </property>
   <property name="focusPolicy">
    <enum>Qt::StrongFocus</enum>
   </property>
   <property name="maxLength">
    <number>32767</number>
   </property>
   <property name="echoMode">
    <enum>QLineEdit::Password</enum>
   </property>
   <property name="cursorPosition">
    <number>0</number>
   </property>
   <property name="alignment">
    <set>Qt::AlignHCenter</set>
   </property>
   <property name="dragEnabled">
    <bool>true</bool>
   </property>
   <property name="readOnly">
    <bool>false</bool>
   </property>
  </widget>
  <widget class="QLabel" name="ManagerLabel">
   <property name="enabled">
    <bool>true</bool>
@@ -1041,7 +543,7 @@
   <property name="geometry">
    <rect>
     <x>970</x>
     <y>362</y>
     <y>760</y>
     <width>287</width>
     <height>32</height>
    </rect>
@@ -568913,7 +568415,7 @@
   <property name="geometry">
    <rect>
     <x>970</x>
     <y>448</y>
     <y>470</y>
     <width>288</width>
     <height>291</height>
    </rect>
@@ -575017,31 +574519,6 @@
    </property>
   </widget>
  </widget>
  <widget class="QLineEdit" name="lineEdit">
   <property name="geometry">
    <rect>
     <x>970</x>
     <y>750</y>
     <width>288</width>
     <height>40</height>
    </rect>
   </property>
   <property name="autoFillBackground">
    <bool>false</bool>
   </property>
   <property name="styleSheet">
    <string>background-color: rgb(0, 85, 255);</string>
   </property>
   <property name="text">
    <string>OPERATOR / OBSERVER</string>
   </property>
   <property name="alignment">
    <set>Qt::AlignCenter</set>
   </property>
   <property name="readOnly">
    <bool>true</bool>
   </property>
  </widget>
  <widget class="QPushButton" name="startASbutton">
   <property name="geometry">
    <rect>
@@ -576988,7 +576465,7 @@
    <string>background-color: rgb(0, 85, 255);</string>
   </property>
   <property name="text">
    <string>ACTUAL PROFILE</string>
    <string>CURRENT PROFILE</string>
   </property>
   <property name="alignment">
    <set>Qt::AlignCenter</set>
@@ -577062,22 +576539,6 @@
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>ManagerButton</sender>
   <signal>clicked()</signal>
   <receiver>SRTActiveSurfaceGUI</receiver>
   <slot>manager()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>20</x>
     <y>20</y>
    </hint>
    <hint type="destinationlabel">
     <x>20</x>
     <y>20</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>ActuatorButton01_24</sender>
   <signal>clicked()</signal>
@@ -596998,22 +596459,6 @@
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>ManagerPasswordlineEdit</sender>
   <signal>returnPressed()</signal>
   <receiver>SRTActiveSurfaceGUI</receiver>
   <slot>manager()</slot>
   <hints>
    <hint type="sourcelabel">
     <x>20</x>
     <y>20</y>
    </hint>
    <hint type="destinationlabel">
     <x>20</x>
     <y>20</y>
    </hint>
   </hints>
  </connection>
  <connection>
   <sender>startASbutton</sender>
   <signal>clicked()</signal>
Loading