mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
re-addded connection text
CL-541
This commit is contained in:
parent
06f35096ad
commit
1986677276
4 changed files with 27 additions and 4 deletions
|
@ -41,6 +41,9 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||
# # Signal to indicate that the hotend of the active printer on the remote changed.
|
||||
hotendIdChanged = pyqtSignal()
|
||||
|
||||
# Signal to indicate that the info text about the connection has changed.
|
||||
connectionTextChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, device_id, parent = None):
|
||||
super().__init__(device_id = device_id, parent = parent)
|
||||
|
||||
|
@ -65,11 +68,21 @@ class PrinterOutputDevice(QObject, OutputDevice):
|
|||
self._connection_state = ConnectionState.closed
|
||||
|
||||
self._address = ""
|
||||
self._connection_text = ""
|
||||
|
||||
@pyqtProperty(str, constant = True)
|
||||
@pyqtProperty(str, notify = connectionTextChanged)
|
||||
def address(self):
|
||||
return self._address
|
||||
|
||||
def setConnectionText(self, connection_text):
|
||||
if self._connection_text != connection_text:
|
||||
self._connection_text = connection_text
|
||||
self.connectionTextChanged.emit()
|
||||
|
||||
@pyqtProperty(str, constant=True)
|
||||
def connectionText(self):
|
||||
return self._connection_text
|
||||
|
||||
def materialHotendChangedMessage(self, callback):
|
||||
Logger.log("w", "materialHotendChangedMessage needs to be implemented, returning 'Yes'")
|
||||
callback(QMessageBox.Yes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue