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:
authorJaime van Kessel <nallath@gmail.com>2016-10-05 15:31:12 +0300
committerJaime van Kessel <nallath@gmail.com>2016-10-05 15:31:12 +0300
commit2b117c0450c7a30cf30dc948b41de0eee3dac379 (patch)
tree0e397ac1cdcdb076651c595c32e0abdde45bd88f /cura/PrinterOutputDevice.py
parentf24fd5660db141e4a69af45407f3c2f8fd183293 (diff)
Added printer type to output device
CURA-2475
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r--cura/PrinterOutputDevice.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py
index 300e76a192..12335e940b 100644
--- a/cura/PrinterOutputDevice.py
+++ b/cura/PrinterOutputDevice.py
@@ -47,6 +47,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._accepts_commands = True
self._printer_state = ""
+ self._printer_type = "unknown"
def requestWrite(self, node, file_name = None, filter_by_machine = False):
raise NotImplementedError("requestWrite needs to be implemented")
@@ -97,6 +98,12 @@ class PrinterOutputDevice(QObject, OutputDevice):
printerStateChanged = pyqtSignal()
+ printerTypeChanged = pyqtSignal()
+
+ @pyqtProperty(str, notify=printerTypeChanged)
+ def printerType(self):
+ return self._printer_type
+
@pyqtProperty(str, notify=printerStateChanged)
def printerState(self):
return self._printer_state
@@ -105,6 +112,11 @@ class PrinterOutputDevice(QObject, OutputDevice):
def jobState(self):
return self._job_state
+ def _updatePrinterType(self, printer_type):
+ if self._printer_type != printer_type:
+ self._printer_type = printer_type
+ self.printerTypeChanged.emit()
+
def _updatePrinterState(self, printer_state):
if self._printer_state != printer_state:
self._printer_state = printer_state