mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Connection states changes are now tied into the UI again
CL-541
This commit is contained in:
parent
9cfe9769d3
commit
0f78b05802
4 changed files with 19 additions and 13 deletions
|
@ -27,7 +27,7 @@ i18n_catalog = i18nCatalog("cura")
|
|||
@signalemitter
|
||||
class PrinterOutputDevice(QObject, OutputDevice):
|
||||
printersChanged = pyqtSignal()
|
||||
connectionStateChanged = pyqtSignal()
|
||||
connectionStateChanged = pyqtSignal(str)
|
||||
|
||||
def __init__(self, device_id, parent = None):
|
||||
super().__init__(device_id = device_id, parent = parent)
|
||||
|
@ -54,8 +54,10 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||
def isConnected(self):
|
||||
return self._connection_state != ConnectionState.closed and self._connection_state != ConnectionState.error
|
||||
|
||||
def setConnectionState(self, new_state):
|
||||
self._connection_state = new_state
|
||||
def setConnectionState(self, connection_state):
|
||||
if self._connection_state != connection_state:
|
||||
self._connection_state = connection_state
|
||||
self.connectionStateChanged.emit(self._id)
|
||||
|
||||
def _update(self):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue