AddUltimakerOrThirdPartyPrinterStack.qml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright (c) 2022 Ultimaker B.V.
  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. ColumnLayout
  9. {
  10. id: root
  11. UM.I18nCatalog { id: catalog; name: "cura" }
  12. Layout.fillWidth: true
  13. Layout.fillHeight: true
  14. property var goToUltimakerPrinter: () => layout.currentIndex = 1
  15. property var goToThirdPartyPrinter: () => layout.currentIndex = 2
  16. UM.Label
  17. {
  18. id: title_label
  19. Layout.fillWidth: true
  20. Layout.bottomMargin: UM.Theme.getSize("thick_margin").height
  21. horizontalAlignment: Text.AlignHCenter
  22. text: catalog.i18nc("@label", "Add printer")
  23. color: UM.Theme.getColor("primary_button")
  24. font: UM.Theme.getFont("huge")
  25. }
  26. StackLayout
  27. {
  28. id: layout
  29. Layout.fillWidth: true
  30. Layout.fillHeight: true
  31. currentIndex: 0
  32. AddUltimakerOrThirdPartyPrinter
  33. {
  34. goToUltimakerPrinter: root.goToUltimakerPrinter
  35. goToThirdPartyPrinter: root.goToThirdPartyPrinter
  36. }
  37. AddUltimakerPrinter
  38. {
  39. goToThirdPartyPrinter: root.goToThirdPartyPrinter
  40. }
  41. AddThirdPartyPrinter
  42. {
  43. goToUltimakerPrinter: root.goToUltimakerPrinter
  44. }
  45. }
  46. }