RecommendedStrengthSelector.qml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Copyright (c) 2022 UltiMaker
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.7
  4. import QtQuick.Controls 2.15
  5. import QtQuick.Layouts 2.10
  6. import UM 1.7 as UM
  7. import Cura 1.7 as Cura
  8. RecommendedSettingSection
  9. {
  10. id: strengthSection
  11. title: catalog.i18nc("@label", "Strength")
  12. icon: UM.Theme.getIcon("Hammer")
  13. enableSectionSwitchVisible: false
  14. enableSectionSwitchEnabled: false
  15. tooltipText: catalog.i18nc("@label", "The following settings define the strength of your part.")
  16. UM.SettingPropertyProvider
  17. {
  18. id: infillSteps
  19. containerStackId: Cura.MachineManager.activeStackId
  20. key: "gradual_infill_steps"
  21. watchedProperties: ["value", "enabled"]
  22. storeIndex: 0
  23. }
  24. contents: [
  25. RecommendedSettingItem
  26. {
  27. settingName: catalog.i18nc("infill_sparse_density description", "Infill Density")
  28. tooltipText: catalog.i18nc("@label", "Adjusts the density of infill of the print.")
  29. settingControl: Cura.SingleSettingSlider
  30. {
  31. height: UM.Theme.getSize("combobox").height
  32. width: parent.width
  33. settingName: "infill_sparse_density"
  34. updateAllExtruders: true
  35. function updateSetting(value)
  36. {
  37. Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", value)
  38. Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")
  39. }
  40. }
  41. },
  42. RecommendedSettingItem
  43. {
  44. settingName: catalog.i18nc("@action:label", "Infill Pattern")
  45. tooltipText: catalog.i18nc("@label",
  46. "The pattern of the infill material of the print:\n\nFor quick prints of non functional model choose line, zig zag or lightning infill.\n\nFor functional part not subjected to a lot of stress we recommend grid or triangle or tri hexagon.\n\nFor functional 3D prints which require high strength in multiple directions use cubic, cubic subdivision, quarter cubic, octet, and gyroid.")
  47. settingControl: Cura.SingleSettingComboBox
  48. {
  49. width: parent.width
  50. settingName: "infill_pattern"
  51. updateAllExtruders: true
  52. }
  53. },
  54. RecommendedSettingItem
  55. {
  56. settingName: catalog.i18nc("@action:label", "Shell Thickness")
  57. tooltipText: catalog.i18nc("@label", "Defines the thickness of your part side walls, roof and floor.")
  58. settingControl: RowLayout
  59. {
  60. anchors.fill: parent
  61. spacing: UM.Theme.getSize("default_margin").width
  62. UM.ComponentWithIcon
  63. {
  64. Layout.fillWidth: true
  65. source: UM.Theme.getIcon("PrintWalls")
  66. Cura.SingleSettingTextField
  67. {
  68. width: parent.width
  69. settingName: "wall_thickness"
  70. updateAllExtruders: true
  71. validator: UM.FloatValidator {}
  72. unitText: catalog.i18nc("@label", "mm")
  73. }
  74. }
  75. UM.ComponentWithIcon
  76. {
  77. Layout.fillWidth: true
  78. source: UM.Theme.getIcon("PrintTopBottom")
  79. Cura.SingleSettingTextField
  80. {
  81. width: parent.width
  82. settingName: "top_bottom_thickness"
  83. updateAllExtruders: true
  84. validator: UM.FloatValidator {}
  85. unitText: catalog.i18nc("@label", "mm")
  86. }
  87. }
  88. }
  89. }
  90. ]
  91. }