Add basic support for print job actions via Cloud output device

This commit is contained in:
ChrisTerBeke 2019-06-19 13:58:11 +02:00
parent c65fefce67
commit eb8d353e11
7 changed files with 50 additions and 34 deletions

View file

@ -1,5 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from cura.PrinterOutput.Models.PrintJobOutputModel import PrintJobOutputModel
from cura.PrinterOutput.PrinterOutputController import PrinterOutputController
from typing import TYPE_CHECKING
@ -13,10 +14,13 @@ class CloudOutputController(PrinterOutputController):
# The cloud connection only supports fetching the printer and queue status and adding a job to the queue.
# To let the UI know this we mark all features below as False.
self.can_pause = False
self.can_abort = False
self.can_pause = True
self.can_abort = True
self.can_pre_heat_bed = False
self.can_pre_heat_hotends = False
self.can_send_raw_gcode = False
self.can_control_manually = False
self.can_update_firmware = False
def setJobState(self, job: "PrintJobOutputModel", state: str):
self._output_device.setJobState(job.key, state)