CURA-2079: Using errorCode (WIP)

Sadly I don't see any reason why errorCode doesn't get updated in QML.
self._errorCode is accessible, but changes to it don't take any effect.
This commit is contained in:
Thomas Karl Pietrowski 2016-08-17 01:09:07 +02:00
parent b42ef49a4e
commit e72a10c97a
3 changed files with 80 additions and 55 deletions

View file

@ -38,6 +38,8 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
self._update_thread = threading.Thread(target = self._updateThread)
self._update_thread.setDaemon(True)
self._errorCode = 0
self._check_updates = True
self._firmware_view = None
@ -57,6 +59,10 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
progress += device.progress
return progress / len(self._usb_output_devices)
@pyqtProperty(int, notify = progressChanged)
def errorCode(self):
return self._errorCode
## Return True if all printers finished firmware update
@pyqtProperty(float, notify = firmwareUpdateChange)
def firmwareUpdateCompleteStatus(self):