RecommendedPrintSetup.qml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import UM 1.2 as UM
  5. import Cura 1.0 as Cura
  6. Item
  7. {
  8. id: recommendedPrintSetup
  9. height: childrenRect.height + 2 * padding
  10. property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1
  11. property real padding: UM.Theme.getSize("thick_margin").width
  12. Column
  13. {
  14. spacing: UM.Theme.getSize("wide_margin").height
  15. anchors
  16. {
  17. left: parent.left
  18. right: parent.right
  19. top: parent.top
  20. margins: parent.padding
  21. }
  22. // TODO
  23. property real firstColumnWidth: Math.round(width / 3)
  24. RecommendedQualityProfileSelector
  25. {
  26. width: parent.width
  27. // TODO Create a reusable component with these properties to not define them separately for each component
  28. labelColumnWidth: parent.firstColumnWidth
  29. }
  30. RecommendedInfillDensitySelector
  31. {
  32. width: parent.width
  33. // TODO Create a reusable component with these properties to not define them separately for each component
  34. labelColumnWidth: parent.firstColumnWidth
  35. }
  36. RecommendedSupportSelector
  37. {
  38. width: parent.width
  39. // TODO Create a reusable component with these properties to not define them separately for each component
  40. labelColumnWidth: parent.firstColumnWidth
  41. }
  42. RecommendedAdhesionSelector
  43. {
  44. width: parent.width
  45. // TODO Create a reusable component with these properties to not define them separately for each component
  46. labelColumnWidth: parent.firstColumnWidth
  47. }
  48. }
  49. UM.SettingPropertyProvider
  50. {
  51. id: extrudersEnabledCount
  52. containerStack: Cura.MachineManager.activeMachine
  53. key: "extruders_enabled_count"
  54. watchedProperties: [ "value" ]
  55. storeIndex: 0
  56. }
  57. }