RecommendedPrintSetup.qml 2.1 KB

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