mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Merge branch 'main' of github.com:Ultimaker/Cura into CURA-8463_cloud_configuration
This commit is contained in:
commit
4c55befad7
237 changed files with 130 additions and 251 deletions
|
@ -531,6 +531,10 @@ class MachineManager(QObject):
|
|||
def printerConnected(self) -> bool:
|
||||
return bool(self._printer_output_devices)
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsAbstract(self) -> bool:
|
||||
return (self.activeMachine is not None) and parseBool(self.activeMachine.getMetaDataEntry("is_abstract_machine", False))
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsGroup(self) -> bool:
|
||||
if self.activeMachine is None:
|
||||
|
@ -555,6 +559,8 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasCloudRegistration(self) -> bool:
|
||||
if self.activeMachineIsAbstract:
|
||||
return any(m.getMetaDataEntry("is_online", False) for m in self.getMachinesWithDefinition(self.activeMachine.definition.getId(), True))
|
||||
return self.activeMachine is not None and ConnectionType.CloudConnection in self.activeMachine.configuredConnectionTypes
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue