Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfieldOfView <aldo@fieldofview.com>2016-08-04 16:06:22 +0300
committerfieldOfView <aldo@fieldofview.com>2016-08-04 16:06:22 +0300
commited669925ad35a3647f2ae50983dd4617ce894757 (patch)
tree71fed4ccb872f8a460e0ab459a5e00e6833618ed /cura/PrinterOutputDevice.py
parentf3a119f9bbee912573631a83714ed06414c8a9ce (diff)
Disable print monitor if the printer is not (yet) ready to receive commands
CURA-1851
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r--cura/PrinterOutputDevice.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py
index f42c365ca3..0fac851aba 100644
--- a/cura/PrinterOutputDevice.py
+++ b/cura/PrinterOutputDevice.py
@@ -36,6 +36,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._job_state = ""
self._job_name = ""
self._error_text = ""
+ self._accepts_commands = True
def requestWrite(self, node, file_name = None, filter_by_machine = False):
raise NotImplementedError("requestWrite needs to be implemented")
@@ -80,6 +81,8 @@ class PrinterOutputDevice(QObject, OutputDevice):
errorTextChanged = pyqtSignal()
+ acceptsCommandsChanged = pyqtSignal()
+
@pyqtProperty(str, notify = jobStateChanged)
def jobState(self):
return self._job_state
@@ -115,6 +118,16 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._error_text = error_text
self.errorTextChanged.emit()
+ @pyqtProperty(str, notify = acceptsCommandsChanged)
+ def acceptsCommands(self):
+ return self._accepts_commands
+
+ ## Set a flag to signal the UI that the printer is not (yet) ready to receive commands
+ def setAcceptsCommands(self, accepts_commands):
+ if self._accepts_commands != accepts_commands:
+ self._accepts_commands = accepts_commands
+ self.acceptsCommandsChanged.emit()
+
## Get the bed temperature of the bed (if any)
# This function is "final" (do not re-implement)
# /sa _getBedTemperature implementation function