AddUltimakerOrThirdPartyPrinter.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Copyright (c) 2022 UltiMaker
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 2.3
  5. import QtQuick.Layouts 1.3
  6. import UM 1.5 as UM
  7. import Cura 1.1 as Cura
  8. //
  9. // This component contains the content for the "Add a printer" (network) page of the welcome on-boarding process.
  10. //
  11. Control
  12. {
  13. UM.I18nCatalog { id: catalog; name: "cura" }
  14. property var goToUltimakerPrinter
  15. property var goToThirdPartyPrinter
  16. contentItem: ColumnLayout
  17. {
  18. Layout.fillWidth: true
  19. Layout.fillHeight: true
  20. UM.Label
  21. {
  22. text: catalog.i18nc("@label", "In order to start using Cura you will need to configure a printer.")
  23. font: UM.Theme.getFont("default")
  24. Layout.alignment: Qt.AlignTop
  25. }
  26. UM.Label
  27. {
  28. text: catalog.i18nc("@label", "What printer would you like to setup?")
  29. font: UM.Theme.getFont("default_bold")
  30. Layout.alignment: Qt.AlignTop
  31. }
  32. RowLayout
  33. {
  34. spacing: UM.Theme.getSize("wide_margin").width
  35. Layout.preferredWidth: childrenRect.width
  36. Layout.preferredHeight: childrenRect.height
  37. Layout.topMargin: UM.Theme.getSize("wide_margin").height
  38. Layout.bottomMargin: UM.Theme.getSize("wide_margin").height
  39. Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
  40. PrinterCard
  41. {
  42. id: ultimakerPrinterCard
  43. Layout.alignment: Qt.AlignBottom
  44. onClicked: goToUltimakerPrinter
  45. text: catalog.i18nc("@button", "UltiMaker printer")
  46. imageSource: UM.Theme.getImage("ultimaker_printer")
  47. }
  48. PrinterCard
  49. {
  50. id: thrirdPartyPrinterCard
  51. Layout.alignment: Qt.AlignBottom
  52. onClicked: goToThirdPartyPrinter
  53. text: catalog.i18nc("@button", "Non UltiMaker printer")
  54. imageSource: UM.Theme.getImage("third_party_printer")
  55. }
  56. }
  57. Cura.TertiaryButton
  58. {
  59. id: learnMoreButton
  60. Layout.alignment: Qt.AlignBottom
  61. text: catalog.i18nc("@button", "Learn more about adding printers to Cura")
  62. iconSource: UM.Theme.getIcon("LinkExternal")
  63. isIconOnRightSide: true
  64. textFont: UM.Theme.getFont("small")
  65. onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=onboarding-add-printer")
  66. }
  67. }
  68. }