Commit 2e59ec9f authored by Maxime Perrotin's avatar Maxime Perrotin

Add undo, redo and reset buttons

parent 2c905ff7
This diff is collapsed.
......@@ -145,12 +145,8 @@ class sdlHandler(QObject):
self.running = not self.running
if self.running:
self.dock.show()
#self.dock_state.show()
#self.dock_simu.show()
else:
self.dock.hide()
#self.dock_state.hide()
#self.dock_simu.hide()
def check_state(self):
''' Highlight the current state on the statechart diagram '''
......@@ -172,7 +168,8 @@ class sdlHandler(QObject):
# get internal variables, translate them to swig, and print them
typename = sort.ReferencedTypeName.replace('-', '_')
setter_ptr = getattr(self.dll, "_set_{}".format(var))
value_as_gser = target_state[idx]
value = target_state[idx]
print "Restoring {} = {}", var, value.GSER()
def on_event(self, tc_name=None, param=None):
''' Process signals indicating that a PI was called in the shared lib:
......
......@@ -27,21 +27,29 @@
<widget class="QListWidget" name="log_tm"/>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Console</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="enabled">
<bool>false</bool>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QToolButton" name="resetButton">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="undoButton">
<property name="text">
<string>Undo</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="redoButton">
<property name="text">
<string>Redo</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
......
Markdown is supported
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