mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Added job_state property
CURA-1036
This commit is contained in:
parent
a735e92dfa
commit
2d78f0a610
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue