mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Machine actions can now be triggered from QML
CURA-1385
This commit is contained in:
parent
af3e4e3a15
commit
6f7affa2bf
3 changed files with 50 additions and 39 deletions
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2016 Ultimaker B.V.
|
||||
# Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
from PyQt5.QtCore import QObject
|
||||
from PyQt5.QtCore import QObject, pyqtSlot
|
||||
from UM.PluginObject import PluginObject
|
||||
|
||||
|
||||
|
@ -16,3 +16,10 @@ class MachineAction(QObject, PluginObject):
|
|||
|
||||
def getLabel(self):
|
||||
return self._label
|
||||
|
||||
@pyqtSlot()
|
||||
def execute(self):
|
||||
self._execute()
|
||||
|
||||
def _execute(self):
|
||||
raise NotImplementedError("Execute() must be implemented")
|
Loading…
Add table
Add a link
Reference in a new issue