mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 15:19:00 +08:00
Add activeMachineAddress to MachineManager for easy access
Contributes to CL-1222
This commit is contained in:
parent
348689eace
commit
01ca3546aa
@ -523,6 +523,12 @@ class MachineManager(QObject):
|
||||
return ""
|
||||
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)
|
||||
def printerConnected(self) -> bool:
|
||||
return bool(self._printer_output_devices)
|
||||
|
Loading…
x
Reference in New Issue
Block a user