mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 04:07:57 -06:00
Merge branch '4.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
a8f66a558c
15 changed files with 112 additions and 79 deletions
|
@ -511,13 +511,13 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtProperty(str, notify = globalContainerChanged)
|
||||
def activeMachineFirmwareVersion(self) -> str:
|
||||
if not self._printer_output_devices[0]:
|
||||
if not self._printer_output_devices:
|
||||
return ""
|
||||
return self._printer_output_devices[0].firmwareVersion
|
||||
|
||||
@pyqtProperty(str, notify = globalContainerChanged)
|
||||
def activeMachineAddress(self) -> str:
|
||||
if not self._printer_output_devices[0]:
|
||||
if not self._printer_output_devices:
|
||||
return ""
|
||||
return self._printer_output_devices[0].address
|
||||
|
||||
|
@ -547,14 +547,18 @@ class MachineManager(QObject):
|
|||
return bool(self._printer_output_devices) and len(self._printer_output_devices[0].printers) > 1
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasActiveNetworkConnection(self) -> bool:
|
||||
def activeMachineHasNetworkConnection(self) -> bool:
|
||||
# A network connection is only available if any output device is actually a network connected device.
|
||||
return any(d.connectionType == ConnectionType.NetworkConnection for d in self._printer_output_devices)
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasActiveCloudConnection(self) -> bool:
|
||||
def activeMachineHasCloudConnection(self) -> bool:
|
||||
# A cloud connection is only available if any output device actually is a cloud connected device.
|
||||
return any(d.connectionType == ConnectionType.CloudConnection for d in self._printer_output_devices)
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsUsingCloudConnection(self) -> bool:
|
||||
return self.activeMachineHasCloudConnection and not self.activeMachineHasNetworkConnection
|
||||
|
||||
def activeMachineNetworkKey(self) -> str:
|
||||
if self._global_container_stack:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue