Added job_state property

CURA-1036
This commit is contained in:
Jaime van Kessel 2016-06-16 11:43:25 +02:00
parent a735e92dfa
commit 2d78f0a610

View file

@ -31,6 +31,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._connection_state = ConnectionState.closed self._connection_state = ConnectionState.closed
self._time_elapsed = 0 self._time_elapsed = 0
self._time_total = 0 self._time_total = 0
self._job_state = ""
def requestWrite(self, node, file_name = None, filter_by_machine = False): def requestWrite(self, node, file_name = None, filter_by_machine = False):
raise NotImplementedError("requestWrite needs to be implemented") raise NotImplementedError("requestWrite needs to be implemented")
@ -63,6 +64,17 @@ class PrinterOutputDevice(QObject, OutputDevice):
timeTotalChanged = pyqtSignal() timeTotalChanged = pyqtSignal()
jobStateChanged = pyqtSignal()
@pyqtProperty(str, notify = jobStateChanged)
def jobState(self):
return self._job_state
def setJobState(self, job_state):
if self._job_state != job_state:
self._job_state = job_state
self.jobStateChanged.emit()
## Get the bed temperature of the bed (if any) ## Get the bed temperature of the bed (if any)
# This function is "final" (do not re-implement) # This function is "final" (do not re-implement)
# /sa _getBedTemperature implementation function # /sa _getBedTemperature implementation function