diff --git a/cura/UI/AddPrinterPagesModel.py b/cura/UI/AddPrinterPagesModel.py
index 9b35dbcacc..1962a6e2ec 100644
--- a/cura/UI/AddPrinterPagesModel.py
+++ b/cura/UI/AddPrinterPagesModel.py
@@ -12,7 +12,7 @@ class AddPrinterPagesModel(WelcomePagesModel):
def initialize(self, cancellable: bool = True) -> None:
self._pages.append({"id": "add_network_or_local_printer",
- "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"),
+ "page_url": self._getBuiltinWelcomePagePath("AddUltimakerOrThirdPartyPrinterStack.qml"),
"next_page_id": "machine_actions",
"next_page_button_text": self._catalog.i18nc("@action:button", "Add"),
})
diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py
index 26c27418cf..5faf39311e 100644
--- a/cura/UI/WelcomePagesModel.py
+++ b/cura/UI/WelcomePagesModel.py
@@ -265,7 +265,7 @@ class WelcomePagesModel(ListModel):
"should_show_function": self.shouldShowCloudPage,
},
{"id": "add_network_or_local_printer",
- "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"),
+ "page_url": self._getBuiltinWelcomePagePath("AddUltimakerOrThirdPartyPrinterStack.qml"),
"next_page_id": "machine_actions",
},
{"id": "add_printer_by_ip",
diff --git a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml
index 36c670f462..3d138e3d2e 100644
--- a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml
+++ b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml
@@ -175,21 +175,6 @@ Item
onClicked: base.addByIpButtonClicked()
}
- Cura.SecondaryButton
- {
- id: addCloudPrinterButton
- anchors.left: addPrinterByIpButton.right
- anchors.leftMargin: UM.Theme.getSize("default_margin").width
- anchors.verticalCenter: parent.verticalCenter
- text: catalog.i18nc("@label", "Add cloud printer")
- height: UM.Theme.getSize("message_action_button").height
- onClicked: {
- CuraApplication.getDiscoveredCloudPrintersModel().clear()
- Cura.API.account.sync(true)
- base.addCloudPrinterButtonClicked()
- }
- }
-
Item
{
id: troubleshootingButton
diff --git a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml
similarity index 86%
rename from resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml
rename to resources/qml/WelcomePages/AddThirdPartyPrinter.qml
index 83a38eab7a..f25cdccbf1 100644
--- a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml
+++ b/resources/qml/WelcomePages/AddThirdPartyPrinter.qml
@@ -15,22 +15,13 @@ Item
{
UM.I18nCatalog { id: catalog; name: "cura" }
- UM.Label
- {
- id: titleLabel
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- horizontalAlignment: Text.AlignHCenter
- text: catalog.i18nc("@label", "Add a printer")
- color: UM.Theme.getColor("primary_button")
- font: UM.Theme.getFont("huge")
- }
+ property var goToUltimakerPrinter
DropDownWidget
{
id: addNetworkPrinterDropDown
- anchors.top: titleLabel.bottom
+ anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: UM.Theme.getSize("wide_margin").height
@@ -103,18 +94,13 @@ Item
}
}
- // This "Back" button only shows in the "Add Machine" dialog, which has "previous_page_button_text" set to "Cancel"
Cura.SecondaryButton
{
id: backButton
anchors.left: parent.left
anchors.bottom: parent.bottom
- visible: base.currentItem.previous_page_button_text ? true : false
- text: base.currentItem.previous_page_button_text ? base.currentItem.previous_page_button_text : ""
- onClicked:
- {
- base.endWizard()
- }
+ text: catalog.i18nc("@button", "Add Ultimaker printer via Digital Factory")
+ onClicked: goToUltimakerPrinter()
}
Cura.PrimaryButton
diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml
new file mode 100644
index 0000000000..0e88e0373f
--- /dev/null
+++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinter.qml
@@ -0,0 +1,78 @@
+// Copyright (c) 2022 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+import UM 1.5 as UM
+import Cura 1.1 as Cura
+
+
+//
+// This component contains the content for the "Add a printer" (network) page of the welcome on-boarding process.
+//
+Control
+{
+ UM.I18nCatalog { id: catalog; name: "cura" }
+
+ property var goToUltimakerPrinter
+ property var goToThirdPartyPrinter
+
+ contentItem: ColumnLayout
+ {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ UM.Label
+ {
+ text: catalog.i18nc("@label", "In order to start using Cura you will need to configure a printer.")
+ font: UM.Theme.getFont("default")
+ Layout.alignment: Qt.AlignTop
+ }
+
+ UM.Label
+ {
+ text: catalog.i18nc("@label", "What printer would you like to setup?")
+ font: UM.Theme.getFont("default_bold")
+ Layout.alignment: Qt.AlignTop
+ }
+
+ RowLayout
+ {
+ spacing: UM.Theme.getSize("wide_margin").width
+ Layout.preferredWidth: childrenRect.width
+ Layout.preferredHeight: childrenRect.height
+ Layout.topMargin: UM.Theme.getSize("wide_margin").height
+ Layout.bottomMargin: UM.Theme.getSize("wide_margin").height
+ Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
+
+ PrinterCard
+ {
+ id: ultimakerPrinterCard
+ onClicked: goToUltimakerPrinter
+ text: catalog.i18nc("@button", "Ultimaker printer")
+ imageSource: UM.Theme.getImage("ultimaker_printer")
+ }
+
+ PrinterCard
+ {
+ id: thrirdPartyPrinterCard
+ onClicked: goToThirdPartyPrinter
+ text: catalog.i18nc("@button", "Non Ultimaker printer")
+ imageSource: UM.Theme.getImage("third_party_printer")
+ }
+ }
+
+ Cura.TertiaryButton
+ {
+ id: learnMoreButton
+ Layout.alignment: Qt.AlignBottom
+ text: catalog.i18nc("@button", "Learn more about adding printers to Cura")
+ iconSource: UM.Theme.getIcon("LinkExternal")
+ isIconOnRightSide: true
+ textFont: UM.Theme.getFont("small")
+ onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer")
+ }
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml
new file mode 100644
index 0000000000..104a0cc96b
--- /dev/null
+++ b/resources/qml/WelcomePages/AddUltimakerOrThirdPartyPrinterStack.qml
@@ -0,0 +1,55 @@
+// Copyright (c) 2022 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+import UM 1.5 as UM
+import Cura 1.1 as Cura
+
+ColumnLayout
+{
+ id: root
+
+ UM.I18nCatalog { id: catalog; name: "cura" }
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ property var goToUltimakerPrinter: () => layout.currentIndex = 1
+ property var goToThirdPartyPrinter: () => layout.currentIndex = 2
+
+ UM.Label
+ {
+ id: title_label
+ Layout.fillWidth: true
+ Layout.bottomMargin: UM.Theme.getSize("thick_margin").height
+ horizontalAlignment: Text.AlignHCenter
+ text: catalog.i18nc("@label", "Add printer")
+ color: UM.Theme.getColor("primary_button")
+ font: UM.Theme.getFont("huge")
+ }
+
+ StackLayout
+ {
+ id: layout
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ currentIndex: 0
+ AddUltimakerOrThirdPartyPrinter
+ {
+ goToUltimakerPrinter: root.goToUltimakerPrinter
+ goToThirdPartyPrinter: root.goToThirdPartyPrinter
+ }
+ AddUltimakerPrinter
+ {
+ goToThirdPartyPrinter: root.goToThirdPartyPrinter
+ }
+ AddThirdPartyPrinter
+ {
+ goToUltimakerPrinter: root.goToUltimakerPrinter
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/resources/qml/WelcomePages/AddUltimakerPrinter.qml b/resources/qml/WelcomePages/AddUltimakerPrinter.qml
new file mode 100644
index 0000000000..a2b08a45b6
--- /dev/null
+++ b/resources/qml/WelcomePages/AddUltimakerPrinter.qml
@@ -0,0 +1,127 @@
+// Copyright (c) 2022 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+import UM 1.5 as UM
+import Cura 1.1 as Cura
+
+Control
+{
+ UM.I18nCatalog { id: catalog; name: "cura" }
+
+ property var goToThirdPartyPrinter
+
+ signal cloudPrintersDetected(bool newCloudPrintersDetected)
+ Component.onCompleted: CuraApplication.getDiscoveredCloudPrintersModel().cloudPrintersDetectedChanged.connect(cloudPrintersDetected)
+ onCloudPrintersDetected: function(newCloudPrintersDetected)
+ {
+ if(newCloudPrintersDetected)
+ {
+ base.goToPage("add_cloud_printers")
+ }
+ else
+ {
+ goToThirdPartyPrinter()
+ }
+ }
+
+ contentItem: ColumnLayout
+ {
+ UM.Label
+ {
+ Layout.fillWidth: true
+ text: catalog.i18nc("@label", "New Ultimaker printers can be connected to Digital Factory and monitored remotely.")
+ wrapMode: Text.WordWrap
+ }
+
+ RowLayout
+ {
+ Layout.fillWidth: true
+
+ Image
+ {
+ source: UM.Theme.getImage("add_printer")
+ Layout.preferredWidth: 200 * screenScaleFactor
+ Layout.preferredHeight: 200 * screenScaleFactor
+ }
+
+ ColumnLayout
+ {
+ Layout.fillHeight: true
+ Layout.alignment: Qt.AlignVCenter
+ spacing: UM.Theme.getSize("default_margin").height
+
+ UM.Label
+ {
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+ wrapMode: Text.WordWrap
+ font: UM.Theme.getFont("default_bold")
+ text: catalog.i18nc("@label", "If you are trying to add a new Ultimaker printer to Cura")
+ }
+
+ UM.Label
+ {
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+ wrapMode: Text.WordWrap
+ text: {
+ const steps = [
+ catalog.i18nc("@info", "Sign in into Ultimaker Digilal Factory"),
+ catalog.i18nc("@info", "Follow the procedure to add a new printer"),
+ catalog.i18nc("@info", "Your new printer will automatically appear in Cura"),
+ ];
+ return steps.join("
");
+ }
+ }
+
+ Cura.TertiaryButton
+ {
+ id: learnMoreButton
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+ text: catalog.i18nc("@button", "Learn more")
+ iconSource: UM.Theme.getIcon("LinkExternal")
+ isIconOnRightSide: true
+ textFont: UM.Theme.getFont("small")
+ onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer")
+ }
+ }
+ }
+
+ Control
+ {
+ Layout.alignment: Qt.AlignBottom
+ Layout.fillWidth: true
+
+ contentItem: RowLayout
+ {
+
+ Cura.SecondaryButton
+ {
+ id: addLocalPrinterButton
+ Layout.alignment: Qt.AlignLeft
+ text: catalog.i18nc("@button", "Add local printer")
+ onClicked: goToThirdPartyPrinter()
+ }
+
+ Cura.PrimaryButton
+ {
+ id: signInButton
+ Layout.alignment: Qt.AlignRight
+ text: catalog.i18nc("@button", "Sign in to Digital Factory")
+ onClicked: function()
+ {
+ text = catalog.i18nc("@button", "Waiting for new printers")
+ busy = true;
+ enabled = false;
+ Cura.API.account.login();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/resources/qml/WelcomePages/PrinterCard.qml b/resources/qml/WelcomePages/PrinterCard.qml
new file mode 100644
index 0000000000..6b0a5bb526
--- /dev/null
+++ b/resources/qml/WelcomePages/PrinterCard.qml
@@ -0,0 +1,85 @@
+// Copyright (c) 2022 Ultimaker B.V.
+// Cura is released under the terms of the LGPLv3 or higher.
+
+import QtQuick 2.10
+import QtQuick.Controls 2.3
+import QtQuick.Layouts 1.3
+
+import UM 1.5 as UM
+import Cura 1.1 as Cura
+
+Control
+{
+ id: root
+ property alias text: link_text.text
+ property alias imageSource: image.source
+ property var onClicked
+
+ states:
+ [
+ State
+ {
+ name: "hovered";
+ when: mouse_area.containsMouse
+ PropertyChanges
+ {
+ target: background
+ color: UM.Theme.getColor("monitor_card_hover")
+ }
+ PropertyChanges
+ {
+ target: link_text
+ font.underline: true
+ }
+ }
+ ]
+
+ MouseArea
+ {
+ id: mouse_area
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: root.onClicked && root.onClicked()
+ }
+
+ topPadding: UM.Theme.getSize("wide_margin").height
+ rightPadding: UM.Theme.getSize("wide_margin").width
+ bottomPadding: UM.Theme.getSize("wide_margin").height
+ leftPadding: UM.Theme.getSize("wide_margin").width
+
+ background: Rectangle
+ {
+ id: background
+ anchors.fill: parent
+ border.color: UM.Theme.getColor("primary_button")
+ color: "transparent"
+ border.width: 1
+ radius: 3
+ }
+
+ contentItem: ColumnLayout
+ {
+ spacing: UM.Theme.getSize("wide_margin").height
+ height: childrenRect.height
+ width: childrenRect.width
+
+ Image
+ {
+ id: image
+ source: imageSource
+ width: 180 * screenScaleFactor
+ height: 180 * screenScaleFactor
+ sourceSize.width: width
+ sourceSize.height: height
+ }
+
+ UM.Label
+ {
+ id: link_text
+ Layout.fillWidth: true
+ font: UM.Theme.getFont("medium")
+ color: UM.Theme.getColor("text_link")
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+}
diff --git a/resources/themes/cura-dark/images/add_printer.svg b/resources/themes/cura-dark/images/add_printer.svg
new file mode 100644
index 0000000000..06f838bc76
--- /dev/null
+++ b/resources/themes/cura-dark/images/add_printer.svg
@@ -0,0 +1,53 @@
+
diff --git a/resources/themes/cura-dark/images/third_party_printer.svg b/resources/themes/cura-dark/images/third_party_printer.svg
new file mode 100644
index 0000000000..6ffe5c20f3
--- /dev/null
+++ b/resources/themes/cura-dark/images/third_party_printer.svg
@@ -0,0 +1,60 @@
+
diff --git a/resources/themes/cura-dark/images/ultimaker_printer.svg b/resources/themes/cura-dark/images/ultimaker_printer.svg
new file mode 100644
index 0000000000..e5a99a6e5c
--- /dev/null
+++ b/resources/themes/cura-dark/images/ultimaker_printer.svg
@@ -0,0 +1,35 @@
+
diff --git a/resources/themes/cura-light/images/add_printer.svg b/resources/themes/cura-light/images/add_printer.svg
new file mode 100644
index 0000000000..3d814f48ef
--- /dev/null
+++ b/resources/themes/cura-light/images/add_printer.svg
@@ -0,0 +1 @@
+
diff --git a/resources/themes/cura-light/images/third_party_printer.svg b/resources/themes/cura-light/images/third_party_printer.svg
new file mode 100644
index 0000000000..d2444d2d28
--- /dev/null
+++ b/resources/themes/cura-light/images/third_party_printer.svg
@@ -0,0 +1,2 @@
+
diff --git a/resources/themes/cura-light/images/ultimaker_printer.svg b/resources/themes/cura-light/images/ultimaker_printer.svg
new file mode 100644
index 0000000000..f2184d4bd1
--- /dev/null
+++ b/resources/themes/cura-light/images/ultimaker_printer.svg
@@ -0,0 +1 @@
+