diff options
author | Jaime van Kessel <nallath@gmail.com> | 2016-04-29 12:11:25 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2016-04-29 12:11:25 +0300 |
commit | 5a1af3b1eae50d3966cf5f5f2f4052f6500c3ac9 (patch) | |
tree | 898a3238f7caf69a8102da65a7ced52f6c8f0c74 /cura/MachineActionManager.py | |
parent | 958918e03349fa52d7e9a60370002227f22011e5 (diff) |
Added getters for required & supported actions
CURA-1385
Diffstat (limited to 'cura/MachineActionManager.py')
-rw-r--r-- | cura/MachineActionManager.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cura/MachineActionManager.py b/cura/MachineActionManager.py index ade4ee2fe7..520fb94d1e 100644 --- a/cura/MachineActionManager.py +++ b/cura/MachineActionManager.py @@ -58,6 +58,24 @@ class MachineActionManager: # Todo: define specific Exception types (instead of general type) raise Exception("MachineAction with key %s was already added. Actions must have unique keys.", action.getKey()) + ## Get all actions supported by given machine + # \param machine The machine you want the supported actions of + # \returns set of supported actions. + def getSupportedActions(self, machine): + if machine in self._supported_actions: + return self._supported_actions[machine] + else: + return set() + + ## Get all actions required by given machine + # \param machine The machine you want the required actions of + # \returns set of required actions. + def getRequiredActions(self, machine): + if machine in self._required_actions: + return self._required_actions[machine] + else: + return set() + ## Remove Machine action from manager # \param action to remove def removeMachineAction(self, action): |