Updated documentation for MachineActions

This commit is contained in:
Jaime van Kessel 2016-12-06 14:21:57 +01:00
parent 5aa394b197
commit 3e54c86c88
5 changed files with 22 additions and 5 deletions

View file

@ -8,6 +8,8 @@ from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
## A simple action to handle manual bed leveling procedure for printers that don't have it on the firmware.
# This is currently only used by the Ultimaker Original+
class BedLevelMachineAction(MachineAction):
def __init__(self):
super().__init__("BedLevel", catalog.i18nc("@action", "Level build plate"))

View file

@ -8,6 +8,7 @@ from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
## Action to check up if the self-built UMO was done correctly.
class UMOCheckupMachineAction(MachineAction):
def __init__(self):
super().__init__("UMOCheckup", catalog.i18nc("@action", "Checkup"))
@ -27,7 +28,6 @@ class UMOCheckupMachineAction(MachineAction):
Application.getInstance().getOutputDeviceManager().outputDevicesChanged.connect(self._onOutputDevicesChanged)
onBedTestCompleted = pyqtSignal()
onHotendTestCompleted = pyqtSignal()

View file

@ -7,6 +7,9 @@ catalog = i18nCatalog("cura")
import UM.Settings.InstanceContainer
## The Ultimaker Original can have a few revisions & upgrades. This action helps with selecting them, so they are added
# as a variant.
class UMOUpgradeSelection(MachineAction):
def __init__(self):
super().__init__("UMOUpgradeSelection", catalog.i18nc("@action", "Select upgrades"))

View file

@ -5,6 +5,7 @@ import UM.Settings.DefinitionContainer
catalog = i18nCatalog("cura")
## Upgrade the firmware of a machine by USB with this action.
class UpgradeFirmwareMachineAction(MachineAction):
def __init__(self):
super().__init__("UpgradeFirmware", catalog.i18nc("@action", "Upgrade Firmware"))
@ -12,6 +13,6 @@ class UpgradeFirmwareMachineAction(MachineAction):
cura.Settings.CuraContainerRegistry.getInstance().containerAdded.connect(self._onContainerAdded)
def _onContainerAdded(self, container):
# Add this action as a supported action to all machine definitions
# Add this action as a supported action to all machine definitions if they support USB connection
if isinstance(container, UM.Settings.DefinitionContainer) and container.getMetaDataEntry("type") == "machine" and container.getMetaDataEntry("supports_usb_connection"):
UM.Application.getInstance().getMachineActionManager().addSupportedAction(container.getId(), self.getKey())