mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Add activeMachineAddress to MachineManager for easy access
Contributes to CL-1222
This commit is contained in:
parent
348689eace
commit
01ca3546aa
1 changed files with 6 additions and 0 deletions
|
@ -523,6 +523,12 @@ class MachineManager(QObject):
|
||||||
return ""
|
return ""
|
||||||
return self._printer_output_devices[0].firmwareVersion
|
return self._printer_output_devices[0].firmwareVersion
|
||||||
|
|
||||||
|
@pyqtProperty(str, notify = globalContainerChanged)
|
||||||
|
def activeMachineAddress(self) -> str:
|
||||||
|
if not self._printer_output_devices[0]:
|
||||||
|
return ""
|
||||||
|
return self._printer_output_devices[0].address
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||||
def printerConnected(self) -> bool:
|
def printerConnected(self) -> bool:
|
||||||
return bool(self._printer_output_devices)
|
return bool(self._printer_output_devices)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue