Commit 6aaa3115 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add signal to handle state change

parent 4f511f5d
......@@ -335,6 +335,11 @@ def gui():
encoder_backend.msc_callback = MSCHandler()
encoder_backend.msc_callback.msc_box.connect(msc.addCondition)
encoder_backend.tm_callback.got_tm.connect(editor.receivedTM)
# Callback in the backend to update the state of the SDL diagram
SDLHandler = type('SDLHandler', (QObject,), {'change_state':
Signal(unicode)})
encoder_backend.sdl_callback = SDLHandler()
encoder_backend.sdl_callback.change_state.connect(sdl.change_state)
encoder_backend.log = log
encoder_backend.statusbar = statusbar
......
......@@ -69,3 +69,8 @@ class sdlHandler(object):
self.dock.show()
else:
self.dock.hide()
@Slot(unicode)
def change_state(self, new_state):
''' Highlight the current state on the statechart diagram '''
print 'changed state to ', new_state
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