diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 389c5ded75..a4988be49d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -530,6 +530,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: @@ -554,6 +558,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) diff --git a/plugins/MonitorStage/MonitorMain.qml b/plugins/MonitorStage/MonitorMain.qml index 5d63ac5b83..848c4a7187 100644 --- a/plugins/MonitorStage/MonitorMain.qml +++ b/plugins/MonitorStage/MonitorMain.qml @@ -12,6 +12,7 @@ Rectangle id: viewportOverlay property bool isConnected: Cura.MachineManager.activeMachineHasNetworkConnection || Cura.MachineManager.activeMachineHasCloudConnection + property bool isAbstractCloudPrinter: Cura.MachineManager.activeMachineIsAbstract // && Cura.MachineManager.activeMachineHasCloudRegistration property bool isNetworkConfigurable: { if(Cura.MachineManager.activeMachine === null) @@ -96,7 +97,7 @@ Rectangle { horizontalCenter: parent.horizontalCenter } - visible: isNetworkConfigured && !isConnected + visible: isNetworkConfigured && !isConnected && !isAbstractCloudPrinter text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.") font: UM.Theme.getFont("medium") width: contentWidth @@ -109,11 +110,25 @@ Rectangle { horizontalCenter: parent.horizontalCenter } - visible: !isNetworkConfigured && isNetworkConfigurable + visible: !isNetworkConfigured && isNetworkConfigurable && !isAbstractCloudPrinter text: catalog.i18nc("@info", "Please connect your printer to the network.") font: UM.Theme.getFont("medium") width: contentWidth } + + UM.Label + { + id: sendToFactoryLabel + anchors + { + horizontalCenter: parent.horizontalCenter + } + visible: isAbstractCloudPrinter + text: catalog.i18nc("@info", "Please go to the Digital Factory. [PLACEHOLDER]") + font: UM.Theme.getFont("medium") + width: contentWidth + } + Item { anchors