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-06-23 18:05:45 +0300
committerJaime van Kessel <nallath@gmail.com>2016-06-23 18:05:45 +0300
commitd0aa33f57f62f0b56b1c689cfa821622ac792dcd (patch)
tree9aae39f455c1346ee36dd133853c59ac2e708878 /cura/PrinterOutputDevice.py
parent6d9eb4028e1f0481e3beb31503c9643254a3c835 (diff)
Added jobName property
CURA-1036
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 8dca62f368..7f6e51e1fd 100644
--- a/cura/PrinterOutputDevice.py
+++ b/cura/PrinterOutputDevice.py
@@ -32,6 +32,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._time_elapsed = 0
self._time_total = 0
self._job_state = ""
+ self._job_name = ""
def requestWrite(self, node, file_name = None, filter_by_machine = False):
raise NotImplementedError("requestWrite needs to be implemented")
@@ -66,6 +67,8 @@ class PrinterOutputDevice(QObject, OutputDevice):
jobStateChanged = pyqtSignal()
+ jobNameChanged = pyqtSignal()
+
@pyqtProperty(str, notify = jobStateChanged)
def jobState(self):
return self._job_state
@@ -82,6 +85,15 @@ class PrinterOutputDevice(QObject, OutputDevice):
def _setJobState(self, job_state):
Logger.log("w", "_setJobState is not implemented by this output device")
+ @pyqtProperty(str, notify = jobNameChanged)
+ def jobName(self):
+ return self._job_name
+
+ def setJobName(self, name):
+ if self._job_name != name:
+ self._job_name = name
+ self.jobNameChanged.emit()
+
## Get the bed temperature of the bed (if any)
# This function is "final" (do not re-implement)
# /sa _getBedTemperature implementation function