Commit 1a2d275e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Extend support of shared lib

parent c9b2ce94
......@@ -314,10 +314,14 @@ def gui():
# Import the backend generated by the pyside_B_mapper from aadl2glueC
encoder_backend = __import__("%s_backend" % editor.objectName())
# Set the callbacks in the backend to forward incoming TM to the GUI
# Set the callback in the backend to forward incoming TM to the GUI
encoder_backend.editor = editor
TMHandler = type('TMHandler', (QObject,), {'got_tm': Signal()})
# Callback in the backend to create a condition box in the MSC
MSCHandler = type('TCHandler', (QObject,), {'msc_box': Signal(unicode)})
encoder_backend.tm_callback = TMHandler()
encoder_backend.msc_callback = MSCHandler()
encoder_backend.msc_callback.msc_box.connect(msc.addCondition)
encoder_backend.tm_callback.got_tm.connect(editor.receivedTM)
encoder_backend.log = log
......
......@@ -139,6 +139,15 @@ inst {fv};'''.format(fv=fv_name)]
#comment.setCommentText("Hello!")
self.next_y += 30
@Slot(unicode)
def addCondition(self, condition):
''' Add a "Condition" box to the MSC (single word with no spaces) '''
condbox = self.msc_scene.addCondition(self.taste_instance,
y=self.next_y,
label=condition)
self.next_y += 40
@Slot()
def stopMscRecording(self):
''' Add footer and close MSC file '''
......
......@@ -2,7 +2,7 @@
# Resource object code
#
# Created: Thu Nov 20 15:50:15 2014
# Created: Fri Nov 21 16:43:11 2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
......
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