RecommendedPrintSetup.qml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.7
  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. UM.I18nCatalog
  16. {
  17. id: catalog
  18. name: "cura"
  19. }
  20. Column
  21. {
  22. width: parent.width - 2 * parent.padding
  23. spacing: UM.Theme.getSize("wide_margin").height
  24. anchors
  25. {
  26. left: parent.left
  27. right: parent.right
  28. top: parent.top
  29. margins: parent.padding
  30. }
  31. // TODO
  32. property real firstColumnWidth: Math.round(width / 3)
  33. RecommendedQualityProfileSelector
  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. RecommendedInfillDensitySelector
  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. RecommendedSupportSelector
  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. RecommendedAdhesionSelector
  52. {
  53. width: parent.width
  54. // TODO Create a reusable component with these properties to not define them separately for each component
  55. labelColumnWidth: parent.firstColumnWidth
  56. }
  57. }
  58. UM.SettingPropertyProvider
  59. {
  60. id: extrudersEnabledCount
  61. containerStack: Cura.MachineManager.activeMachine
  62. key: "extruders_enabled_count"
  63. watchedProperties: [ "value" ]
  64. storeIndex: 0
  65. }
  66. }