diff options
author | Jaime van Kessel <nallath@gmail.com> | 2017-09-04 16:16:55 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2017-09-04 16:16:55 +0300 |
commit | 8683275d4fae75753b69dd400fc5e8a0f7a5311d (patch) | |
tree | d0a12d294f948fdaf19d4c701830a3a038704354 /cura/PrinterOutputDevice.py | |
parent | 20ffb0cd6d77354f5882582f9fea07f7f3aeb2c4 (diff) |
Added canAbort & canPause feature to PrinterOutputDevice
Diffstat (limited to 'cura/PrinterOutputDevice.py')
-rw-r--r-- | cura/PrinterOutputDevice.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 6643ce6e03..64544d3d3f 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -71,6 +71,8 @@ class PrinterOutputDevice(QObject, OutputDevice): self._control_item = None self._qml_context = None + self._can_pause = True + self._can_abort = True def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None): raise NotImplementedError("requestWrite needs to be implemented") @@ -126,6 +128,16 @@ class PrinterOutputDevice(QObject, OutputDevice): # Signal to be emitted when some drastic change occurs in the remaining time (not when the time just passes on normally). preheatBedRemainingTimeChanged = pyqtSignal() + # Does the printer support pause at all + @pyqtProperty(bool, constant=True) + def canPause(self): + return self._can_pause + + # Does the printer support abort at all + @pyqtProperty(bool, constant=True) + def canAbort(self): + return self._can_abort + @pyqtProperty(QObject, constant=True) def monitorItem(self): # Note that we specifically only check if the monitor component is created. |