diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index fc11beb2c8..d091ab9f6f 100755
--- a/cura/Settings/MachineManager.py
+++ b/cura/Settings/MachineManager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Ultimaker B.V.
+# Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import time
@@ -531,9 +531,9 @@ 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 = globalContainerChanged)
+ def activeMachineIsAbstractCloudPrinter(self) -> bool:
+ return len(self._printer_output_devices) == 1 and self._printer_output_devices[0].__class__.__name__ == "AbstractCloudOutputDevice"
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineIsGroup(self) -> bool:
@@ -559,8 +559,6 @@ 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 768366c664..a89938530c 100644
--- a/plugins/MonitorStage/MonitorMain.qml
+++ b/plugins/MonitorStage/MonitorMain.qml
@@ -1,4 +1,4 @@
-// Copyright (c) 2018 Ultimaker B.V.
+// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
@@ -12,7 +12,6 @@ Rectangle
id: viewportOverlay
property bool isConnected: Cura.MachineManager.activeMachineHasNetworkConnection || Cura.MachineManager.activeMachineHasCloudConnection
- property bool isAbstractCloudPrinter: Cura.MachineManager.activeMachineIsAbstract
property bool isNetworkConfigurable:
{
if(Cura.MachineManager.activeMachine === null)
@@ -97,7 +96,7 @@ Rectangle
{
horizontalCenter: parent.horizontalCenter
}
- visible: isNetworkConfigured && !isConnected && !isAbstractCloudPrinter
+ visible: isNetworkConfigured && !isConnected
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
@@ -110,62 +109,19 @@ Rectangle
{
horizontalCenter: parent.horizontalCenter
}
- visible: !isNetworkConfigured && isNetworkConfigurable && !isAbstractCloudPrinter
+ visible: !isNetworkConfigured && isNetworkConfigurable
text: catalog.i18nc("@info", "Please connect your printer to the network.")
font: UM.Theme.getFont("medium")
width: contentWidth
}
- Rectangle
- {
- id: sendToFactoryCard
- visible: isAbstractCloudPrinter
- color: UM.Theme.getColor("detail_background")
- height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
- width: childrenRect.width + UM.Theme.getSize("wide_margin").width * 2
- Column
- {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- spacing: UM.Theme.getSize("wide_margin").height
- padding: UM.Theme.getSize("default_margin").width
- topPadding: 0
-
- Image
- {
- id: sendToFactoryImage
- anchors.horizontalCenter: parent.horizontalCenter
- source: UM.Theme.getImage("illustration_connect_printers")
- }
-
- UM.Label
- {
- anchors.horizontalCenter: parent.horizontalCenter
- text: catalog.i18nc("@info", "Monitor your printers from everywhere using Ultimaker Digital Factory")
- font: UM.Theme.getFont("medium")
- width: sendToFactoryImage.width
- wrapMode: Text.WordWrap
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
-
- Cura.PrimaryButton
- {
- id: sendToFactoryButton
- anchors.horizontalCenter: parent.horizontalCenter
- text: catalog.i18nc("@button", "View printers in Digital Factory")
- onClicked: Qt.openUrlExternally("https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=monitor-view-cloud-printer-type")
- }
- }
- }
-
Item
{
anchors
{
left: noNetworkLabel.left
}
- visible: !isNetworkConfigured && isNetworkConfigurable && !isAbstractCloudPrinter
+ visible: !isNetworkConfigured && isNetworkConfigurable
width: childrenRect.width
height: childrenRect.height
diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml
index 6e8f6b4ebd..c55c00f378 100644
--- a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml
+++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml
@@ -1,8 +1,8 @@
-// Copyright (c) 2019 Ultimaker B.V.
+// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
-import QtQuick 2.2
-import UM 1.3 as UM
+import QtQuick 2.15
+import UM 1.5 as UM
import Cura 1.0 as Cura
// This is the root component for the monitor stage.
@@ -37,6 +37,7 @@ Component
Item
{
id: printers
+ visible: !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
anchors
{
top: parent.top
@@ -69,14 +70,66 @@ Component
top: printers.bottom
topMargin: 48 * screenScaleFactor // TODO: Theme!
}
- visible: OutputDevice.supportsPrintJobQueue && OutputDevice.canReadPrintJobs
+ visible: OutputDevice.supportsPrintJobQueue && OutputDevice.canReadPrintJobs && !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
}
PrinterVideoStream
{
anchors.fill: parent
cameraUrl: OutputDevice.activeCameraUrl
- visible: OutputDevice.activeCameraUrl != ""
+ visible: OutputDevice.activeCameraUrl != "" && !Cura.MachineManager.activeMachineIsAbstractCloudPrinter
+ }
+
+ Rectangle
+ {
+ id: sendToFactoryCard
+
+ visible: Cura.MachineManager.activeMachineIsAbstractCloudPrinter
+
+ color: UM.Theme.getColor("detail_background")
+ height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
+ width: childrenRect.width + UM.Theme.getSize("wide_margin").width * 2
+ anchors
+ {
+ horizontalCenter: parent.horizontalCenter
+ top: parent.top
+ topMargin: UM.Theme.getSize("wide_margin").height * screenScaleFactor * 2
+ }
+
+ Column
+ {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: UM.Theme.getSize("wide_margin").height
+ padding: UM.Theme.getSize("default_margin").width
+ topPadding: 0
+
+ Image
+ {
+ id: sendToFactoryImage
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: UM.Theme.getImage("cura_connected_printers")
+ }
+
+ UM.Label
+ {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: catalog.i18nc("@info", "Monitor your printers from everywhere using Ultimaker Digital Factory")
+ font: UM.Theme.getFont("medium")
+ width: sendToFactoryImage.width
+ wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ Cura.PrimaryButton
+ {
+ id: sendToFactoryButton
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: catalog.i18nc("@button", "View printers in Digital Factory")
+ onClicked: Qt.openUrlExternally("https://digitalfactory.ultimaker.com/app/print-jobs?utm_source=cura&utm_medium=software&utm_campaign=monitor-view-cloud-printer-type")
+ }
+ }
}
}
}
diff --git a/resources/themes/cura-dark/images/cura_connected_printers.svg b/resources/themes/cura-dark/images/cura_connected_printers.svg
new file mode 100644
index 0000000000..d7d0dc9d23
--- /dev/null
+++ b/resources/themes/cura-dark/images/cura_connected_printers.svg
@@ -0,0 +1,111 @@
+
+
\ No newline at end of file
diff --git a/resources/themes/cura-light/images/cura_connected_printers.svg b/resources/themes/cura-light/images/cura_connected_printers.svg
new file mode 100644
index 0000000000..9e67f62451
--- /dev/null
+++ b/resources/themes/cura-light/images/cura_connected_printers.svg
@@ -0,0 +1,9 @@
+
diff --git a/resources/themes/cura-light/images/illustration_connect_printers.svg b/resources/themes/cura-light/images/illustration_connect_printers.svg
deleted file mode 100644
index d18302bdf1..0000000000
--- a/resources/themes/cura-light/images/illustration_connect_printers.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file