RecommendedPrintSetup.qml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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.Layouts 1.1
  5. import UM 1.6 as UM
  6. import Cura 1.6 as Cura
  7. Item
  8. {
  9. id: recommendedPrintSetup
  10. height: childrenRect.height + 2 * padding
  11. property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
  12. property real padding: UM.Theme.getSize("default_margin").width
  13. ColumnLayout
  14. {
  15. spacing: UM.Theme.getSize("default_margin").height
  16. anchors
  17. {
  18. left: parent.left
  19. right: parent.right
  20. top: parent.top
  21. margins: parent.padding
  22. }
  23. // TODO
  24. property real firstColumnWidth: Math.round(width / 3)
  25. UM.Label
  26. {
  27. text: catalog.i18nc("@label", "Profiles")
  28. font: UM.Theme.getFont("medium")
  29. }
  30. RecommendedQualityProfileSelector
  31. {
  32. width: parent.width
  33. hasQualityOptions: recommendedResolutionSelector.visible
  34. }
  35. RecommendedResolutionSelector
  36. {
  37. id: recommendedResolutionSelector
  38. Layout.fillWidth: true
  39. width: parent.width
  40. }
  41. UnsupportedProfileIndication
  42. {
  43. width: parent.width
  44. visible: !recommendedResolutionSelector.visible
  45. Layout.fillWidth: true
  46. }
  47. ProfileWarningReset
  48. {
  49. width: parent.width
  50. Layout.fillWidth: true
  51. Layout.topMargin: UM.Theme.getSize("default_margin").height
  52. Layout.bottomMargin: UM.Theme.getSize("thin_margin").height
  53. }
  54. //Line between the sections.
  55. Rectangle
  56. {
  57. width: parent.width
  58. height: UM.Theme.getSize("default_lining").height
  59. Layout.topMargin: UM.Theme.getSize("narrow_margin").height
  60. Layout.bottomMargin: UM.Theme.getSize("narrow_margin").height
  61. Layout.fillWidth: true
  62. color: UM.Theme.getColor("lining")
  63. }
  64. UM.Label
  65. {
  66. text: catalog.i18nc("@label", "Print settings")
  67. font: UM.Theme.getFont("medium")
  68. }
  69. RecommendedInfillDensitySelector
  70. {
  71. width: parent.width
  72. labelColumnWidth: parent.firstColumnWidth
  73. Layout.fillWidth: true
  74. Layout.rightMargin: UM.Theme.getSize("default_margin").width
  75. }
  76. RecommendedSupportSelector
  77. {
  78. width: parent.width
  79. labelColumnWidth: parent.firstColumnWidth
  80. Layout.fillWidth: true
  81. }
  82. RecommendedAdhesionSelector
  83. {
  84. width: parent.width
  85. labelColumnWidth: parent.firstColumnWidth
  86. Layout.fillWidth: true
  87. }
  88. }
  89. UM.SettingPropertyProvider
  90. {
  91. id: extrudersEnabledCount
  92. containerStack: Cura.MachineManager.activeMachine
  93. key: "extruders_enabled_count"
  94. watchedProperties: [ "value" ]
  95. storeIndex: 0
  96. }
  97. }