mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Added jobName property
CURA-1036
This commit is contained in:
parent
6d9eb4028e
commit
d0aa33f57f
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue