Commit c4feb061 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Improve layout and log state change

parent 2f0793c0
......@@ -104,13 +104,14 @@ class sdlHandler(QObject):
self.asn1_editor = asn1_value_editor.asn1Editor(self.parent)
self.asn1_editor.hideExtraColumns()
self.dock_state = QDockWidget('Internal state', self.parent)
self.dock_state.setFloating(True)
self.dock_state.resize(400, 400)
self.dock_state.setFloating(False)
#self.dock_state.resize(400, 400)
self.dock_state.setObjectName('InternalStateViewer')
self.parent.addDockWidget(Qt.RightDockWidgetArea, self.dock_state)
self.dock_state.setAllowedAreas(Qt.NoDockWidgetArea)
#self.dock_state.setAllowedAreas(Qt.NoDockWidgetArea)
self.dock_state.setWidget(self.asn1_editor)
self.dock_state.hide()
self.dock_state.show()
self.parent.tabifyDockWidget(self.dock_state, self.dock_simu)
# Add the SDL variables to the ASN.1 editor
row = 0
for var, (sort, _) in self.proc.variables.viewitems():
......@@ -135,12 +136,12 @@ class sdlHandler(QObject):
self.running = not self.running
if self.running:
self.dock.show()
self.dock_state.show()
self.dock_simu.show()
#self.dock_state.show()
#self.dock_simu.show()
else:
self.dock.hide()
self.dock_state.hide()
self.dock_simu.hide()
#self.dock_state.hide()
#self.dock_simu.hide()
def check_state(self):
''' Highlight the current state on the statechart diagram '''
......@@ -152,6 +153,7 @@ class sdlHandler(QObject):
self.sdl_scene.highlight(each)
# Propagate event for other updates (e.g. MSC)
self.state_change.emit(state)
self.log_area.addItem('New state: {}'.format(state))
@Slot()
def on_event(self):
......@@ -213,12 +215,12 @@ class sdlHandler(QObject):
widgets = loader.load(ui, parent=self.parent)
dock = QDockWidget('Simulation bay', self.parent)
dock.setFloating(False)
dock.resize(400, 400)
#dock.resize(400, 400)
dock.setObjectName('Simulation')
self.parent.addDockWidget(Qt.RightDockWidgetArea, dock)
#dock.setAllowedAreas(Qt.NoDockWidgetArea)
dock.setWidget(widgets)
dock.hide()
dock.show()
return dock
def send_tc(self, name, tc_func_ptr):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment