diff --git a/cura/PrinterOutputDevice.py b/cura/PrinterOutputDevice.py index 9db0a26e55..573fe63158 100644 --- a/cura/PrinterOutputDevice.py +++ b/cura/PrinterOutputDevice.py @@ -27,6 +27,7 @@ i18n_catalog = i18nCatalog("cura") @signalemitter class PrinterOutputDevice(QObject, OutputDevice): printersChanged = pyqtSignal() + connectionStateChanged = pyqtSignal() def __init__(self, device_id, parent = None): super().__init__(device_id = device_id, parent = parent) @@ -48,6 +49,11 @@ class PrinterOutputDevice(QObject, OutputDevice): self._update_timer.setSingleShot(False) self._update_timer.timeout.connect(self._update) + self._connection_state = ConnectionState.closed + + def isConnected(self): + return self._connection_state != ConnectionState.closed and self._connection_state != ConnectionState.error + def _update(self): pass