mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 00:56:01 +08:00
Added job_state property
CURA-1036
This commit is contained in:
parent
a735e92dfa
commit
2d78f0a610
@ -31,6 +31,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
||||
self._connection_state = ConnectionState.closed
|
||||
self._time_elapsed = 0
|
||||
self._time_total = 0
|
||||
self._job_state = ""
|
||||
|
||||
def requestWrite(self, node, file_name = None, filter_by_machine = False):
|
||||
raise NotImplementedError("requestWrite needs to be implemented")
|
||||
@ -63,6 +64,17 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
||||
|
||||
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)
|
||||
# This function is "final" (do not re-implement)
|
||||
# /sa _getBedTemperature implementation function
|
||||
|
Loading…
x
Reference in New Issue
Block a user