diff options
author | fieldOfView <aldo@fieldofview.com> | 2016-08-04 14:25:28 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2016-08-04 14:25:28 +0300 |
commit | a74d5dd8cb60b8f808a1ef128e3897c66bdc493a (patch) | |
tree | c1847ae837fe04c1a4c3c8277bcba83194928054 /cura/PrinterOutputDevice.py | |
parent | aba027373b06fadc586a41a27dae0c90e420ee09 (diff) |
Show error text in print monitor
CURA-1990
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r-- | cura/PrinterOutputDevice.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 212ed86ab3..f42c365ca3 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -35,6 +35,7 @@ class PrinterOutputDevice(QObject, OutputDevice): self._time_total = 0 self._job_state = "" self._job_name = "" + self._error_text = "" def requestWrite(self, node, file_name = None, filter_by_machine = False): raise NotImplementedError("requestWrite needs to be implemented") @@ -77,6 +78,8 @@ class PrinterOutputDevice(QObject, OutputDevice): jobNameChanged = pyqtSignal() + errorTextChanged = pyqtSignal() + @pyqtProperty(str, notify = jobStateChanged) def jobState(self): return self._job_state @@ -102,6 +105,16 @@ class PrinterOutputDevice(QObject, OutputDevice): self._job_name = name self.jobNameChanged.emit() + @pyqtProperty(str, notify = errorTextChanged) + def errorText(self): + return self._error_text + + ## Set the error-text that is shown in the print monitor in case of an error + def setErrorText(self, error_text): + if self._error_text != error_text: + self._error_text = error_text + self.errorTextChanged.emit() + ## Get the bed temperature of the bed (if any) # This function is "final" (do not re-implement) # /sa _getBedTemperature implementation function |