Add reconnect Action
* add reconnect method to QSECNode * Rename File Menu to Node * Add Button to 'Node' Menu Fixes: #4687 Change-Id: I04ee55ddbc13253255f0099a9f4d2f8d4d0da77c Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30566 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Georg Brandl <g.brandl@fz-juelich.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
parent
b48b965070
commit
595c32783c
@ -61,6 +61,10 @@ class QSECNode(QObject):
|
|||||||
conn.register_callback(None, self.updateEvent, self.nodeStateChange, self.unhandledMessage)
|
conn.register_callback(None, self.updateEvent, self.nodeStateChange, self.unhandledMessage)
|
||||||
|
|
||||||
# provide methods from old baseclient for making other gui code work
|
# provide methods from old baseclient for making other gui code work
|
||||||
|
def reconnect(self):
|
||||||
|
if self.conn.online:
|
||||||
|
self.conn.disconnect(shutdown=False)
|
||||||
|
self.conn.connect()
|
||||||
|
|
||||||
def getParameters(self, module):
|
def getParameters(self, module):
|
||||||
return self.modules[module]['parameters']
|
return self.modules[module]['parameters']
|
||||||
@ -202,6 +206,10 @@ class MainWindow(QMainWindow):
|
|||||||
QMessageBox.critical(self.parent(),
|
QMessageBox.critical(self.parent(),
|
||||||
'Connecting to %s failed!' % host, str(e))
|
'Connecting to %s failed!' % host, str(e))
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def on_actionReconnect_triggered(self):
|
||||||
|
self.tab.currentWidget().getSecNode().reconnect()
|
||||||
|
|
||||||
def on_actionDetailed_View_toggled(self, toggled):
|
def on_actionDetailed_View_toggled(self, toggled):
|
||||||
self._rebuildAdvanced(toggled)
|
self._rebuildAdvanced(toggled)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>File</string>
|
<string>Node</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuRecent_SECNodes">
|
<widget class="QMenu" name="menuRecent_SECNodes">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -41,6 +41,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<addaction name="actionAdd_SEC_node"/>
|
<addaction name="actionAdd_SEC_node"/>
|
||||||
<addaction name="menuRecent_SECNodes"/>
|
<addaction name="menuRecent_SECNodes"/>
|
||||||
|
<addaction name="actionReconnect"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionExit"/>
|
<addaction name="actionExit"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -143,6 +144,14 @@
|
|||||||
<string>djhfs</string>
|
<string>djhfs</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionReconnect">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reconnect</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Ctrl+R</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../resources/frappy-gui.qrc"/>
|
<include location="../../../resources/frappy-gui.qrc"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user