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

Add undo, redo and reset buttons

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