UCPDialog.qml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Copyright (c) 2024 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 QtQuick.Window 2.2
  7. import UM 1.5 as UM
  8. import Cura 1.1 as Cura
  9. UM.Dialog
  10. {
  11. id: exportDialog
  12. title: catalog.i18nc("@title:window Don't translate 'Universal Cura Project'", "Export Universal Cura Project")
  13. margin: UM.Theme.getSize("default_margin").width
  14. minimumWidth: UM.Theme.getSize("modal_window_minimum").width
  15. minimumHeight: UM.Theme.getSize("modal_window_minimum").height
  16. backgroundColor: UM.Theme.getColor("detail_background")
  17. headerComponent: Rectangle
  18. {
  19. height: childrenRect.height + 2 * UM.Theme.getSize("default_margin").height
  20. color: UM.Theme.getColor("main_background")
  21. ColumnLayout
  22. {
  23. id: headerColumn
  24. anchors.top: parent.top
  25. anchors.left: parent.left
  26. anchors.right: parent.right
  27. anchors.topMargin: UM.Theme.getSize("default_margin").height
  28. anchors.leftMargin: UM.Theme.getSize("default_margin").width
  29. anchors.rightMargin: anchors.leftMargin
  30. RowLayout
  31. {
  32. UM.Label
  33. {
  34. id: titleLabel
  35. text: catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Universal Cura Project")
  36. font: UM.Theme.getFont("large")
  37. }
  38. Cura.TertiaryButton
  39. {
  40. id: learnMoreButton
  41. text: catalog.i18nc("@button", "Learn more")
  42. iconSource: UM.Theme.getIcon("LinkExternal")
  43. isIconOnRightSide: true
  44. onClicked: Qt.openUrlExternally("https://support.ultimaker.com/s/article/000002979")
  45. }
  46. }
  47. UM.Label
  48. {
  49. id: descriptionLabel
  50. text: catalog.i18nc("@action:description Don't translate 'Universal Cura Project'", "Universal Cura Project files can be printed on different 3D printers while retaining positional data and selected settings. When exported, all models present on the build plate will be included along with their current position, orientation, and scale. You can also select which per-extruder or per-model settings should be included to ensure proper printing.")
  51. font: UM.Theme.getFont("default")
  52. wrapMode: Text.Wrap
  53. Layout.maximumWidth: headerColumn.width
  54. }
  55. }
  56. }
  57. Rectangle
  58. {
  59. anchors.fill: parent
  60. color: UM.Theme.getColor("main_background")
  61. UM.I18nCatalog { id: catalog; name: "cura" }
  62. ListView
  63. {
  64. id: settingsExportList
  65. anchors.fill: parent
  66. anchors.margins: UM.Theme.getSize("default_margin").width
  67. spacing: UM.Theme.getSize("thick_margin").height
  68. model: settingsExportModel.settingsGroups
  69. clip: true
  70. ScrollBar.vertical: UM.ScrollBar { id: verticalScrollBar }
  71. delegate: SettingsSelectionGroup { Layout.margins: 0 }
  72. }
  73. }
  74. rightButtons:
  75. [
  76. Cura.TertiaryButton
  77. {
  78. text: catalog.i18nc("@action:button", "Cancel")
  79. onClicked: reject()
  80. },
  81. Cura.PrimaryButton
  82. {
  83. text: catalog.i18nc("@action:button", "Save project")
  84. onClicked: accept()
  85. }
  86. ]
  87. buttonSpacing: UM.Theme.getSize("wide_margin").width
  88. onClosing:
  89. {
  90. manager.notifyClosed()
  91. }
  92. }