mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Actions are now added as buttons to machinePages
CURA-1385
This commit is contained in:
parent
83c1ee8082
commit
8237047907
4 changed files with 29 additions and 8 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, pyqtSlot
|
||||
from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal
|
||||
from UM.PluginObject import PluginObject
|
||||
|
||||
|
||||
|
@ -11,12 +11,20 @@ class MachineAction(QObject, PluginObject):
|
|||
self._key = key
|
||||
self._label = label
|
||||
|
||||
labelChanged = pyqtSignal()
|
||||
|
||||
def getKey(self):
|
||||
return self._key
|
||||
|
||||
def getLabel(self):
|
||||
@pyqtProperty(str, notify = labelChanged)
|
||||
def label(self):
|
||||
return self._label
|
||||
|
||||
def setLabel(self, label):
|
||||
if self._label != label:
|
||||
self._label = label
|
||||
self.labelChanged.emit()
|
||||
|
||||
@pyqtSlot()
|
||||
def execute(self):
|
||||
self._execute()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue