UCPDialog.qml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. UM.Label
  31. {
  32. id: titleLabel
  33. text: catalog.i18nc("@action:title Don't translate 'Universal Cura Project'", "Summary - Universal Cura Project")
  34. font: UM.Theme.getFont("large")
  35. }
  36. UM.Label
  37. {
  38. id: descriptionLabel
  39. 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.")
  40. font: UM.Theme.getFont("default")
  41. wrapMode: Text.Wrap
  42. Layout.maximumWidth: headerColumn.width
  43. }
  44. }
  45. }
  46. Rectangle
  47. {
  48. anchors.fill: parent
  49. color: UM.Theme.getColor("main_background")
  50. UM.I18nCatalog { id: catalog; name: "cura" }
  51. ListView
  52. {
  53. id: settingsExportList
  54. anchors.fill: parent
  55. anchors.margins: UM.Theme.getSize("default_margin").width
  56. spacing: UM.Theme.getSize("thick_margin").height
  57. model: settingsExportModel.settingsGroups
  58. clip: true
  59. ScrollBar.vertical: UM.ScrollBar { id: verticalScrollBar }
  60. delegate: SettingsSelectionGroup { Layout.margins: 0 }
  61. }
  62. }
  63. rightButtons:
  64. [
  65. Cura.TertiaryButton
  66. {
  67. text: catalog.i18nc("@action:button", "Cancel")
  68. onClicked: reject()
  69. },
  70. Cura.PrimaryButton
  71. {
  72. text: catalog.i18nc("@action:button", "Save project")
  73. onClicked: accept()
  74. }
  75. ]
  76. buttonSpacing: UM.Theme.getSize("wide_margin").width
  77. onClosing:
  78. {
  79. manager.notifyClosed()
  80. }
  81. }