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): ...@@ -104,13 +104,14 @@ class sdlHandler(QObject):
self.asn1_editor = asn1_value_editor.asn1Editor(self.parent) self.asn1_editor = asn1_value_editor.asn1Editor(self.parent)
self.asn1_editor.hideExtraColumns() self.asn1_editor.hideExtraColumns()
self.dock_state = QDockWidget('Internal state', self.parent) self.dock_state = QDockWidget('Internal state', self.parent)
self.dock_state.setFloating(True) self.dock_state.setFloating(False)
self.dock_state.resize(400, 400) #self.dock_state.resize(400, 400)
self.dock_state.setObjectName('InternalStateViewer') self.dock_state.setObjectName('InternalStateViewer')
self.parent.addDockWidget(Qt.RightDockWidgetArea, self.dock_state) 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.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 # Add the SDL variables to the ASN.1 editor
row = 0 row = 0
for var, (sort, _) in self.proc.variables.viewitems(): for var, (sort, _) in self.proc.variables.viewitems():
...@@ -135,12 +136,12 @@ class sdlHandler(QObject): ...@@ -135,12 +136,12 @@ class sdlHandler(QObject):
self.running = not self.running self.running = not self.running
if self.running: if self.running:
self.dock.show() self.dock.show()
self.dock_state.show() #self.dock_state.show()
self.dock_simu.show() #self.dock_simu.show()
else: else:
self.dock.hide() self.dock.hide()
self.dock_state.hide() #self.dock_state.hide()
self.dock_simu.hide() #self.dock_simu.hide()
def check_state(self): def check_state(self):
''' Highlight the current state on the statechart diagram ''' ''' Highlight the current state on the statechart diagram '''
...@@ -152,6 +153,7 @@ class sdlHandler(QObject): ...@@ -152,6 +153,7 @@ class sdlHandler(QObject):
self.sdl_scene.highlight(each) self.sdl_scene.highlight(each)
# Propagate event for other updates (e.g. MSC) # Propagate event for other updates (e.g. MSC)
self.state_change.emit(state) self.state_change.emit(state)
self.log_area.addItem('New state: {}'.format(state))
@Slot() @Slot()
def on_event(self): def on_event(self):
...@@ -213,12 +215,12 @@ class sdlHandler(QObject): ...@@ -213,12 +215,12 @@ class sdlHandler(QObject):
widgets = loader.load(ui, parent=self.parent) widgets = loader.load(ui, parent=self.parent)
dock = QDockWidget('Simulation bay', self.parent) dock = QDockWidget('Simulation bay', self.parent)
dock.setFloating(False) dock.setFloating(False)
dock.resize(400, 400) #dock.resize(400, 400)
dock.setObjectName('Simulation') dock.setObjectName('Simulation')
self.parent.addDockWidget(Qt.RightDockWidgetArea, dock) self.parent.addDockWidget(Qt.RightDockWidgetArea, dock)
#dock.setAllowedAreas(Qt.NoDockWidgetArea) #dock.setAllowedAreas(Qt.NoDockWidgetArea)
dock.setWidget(widgets) dock.setWidget(widgets)
dock.hide() dock.show()
return dock return dock
def send_tc(self, name, tc_func_ptr): 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