Fleshing out of bedleveling action

CURA-1385
This commit is contained in:
Jaime van Kessel 2016-06-21 13:30:36 +02:00
parent 81602e9ccd
commit 924af37dff
4 changed files with 142 additions and 1 deletions

View file

@ -17,7 +17,7 @@ class MachineAction(QObject, PluginObject):
super().__init__()
self._key = key
self._label = label
self._qml_url = ""
self._qml_url = ""
self._component = None
self._context = None
@ -41,6 +41,18 @@ class MachineAction(QObject, PluginObject):
def execute(self):
self._execute()
## Reset the action to it's default state.
# This should not be re-implemented by child classes, instead re-implement _reset.
# /sa _reset
@pyqtSlot()
def reset(self):
self._reset()
## Protected implementation of reset.
# /sa reset()
def _reset(self):
pass
def _execute(self):
raise NotImplementedError("Execute() must be implemented")