PrintSetupSelectorHeader.qml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 2.3
  5. import QtQuick.Layouts 1.3
  6. import UM 1.3 as UM
  7. import Cura 1.0 as Cura
  8. RowLayout
  9. {
  10. Cura.IconWithText
  11. {
  12. source: UM.Theme.getIcon("category_layer_height")
  13. text:
  14. {
  15. if (Cura.MachineManager.activeStack)
  16. {
  17. var text = Cura.MachineManager.activeQualityOrQualityChangesName
  18. if (!Cura.MachineManager.hasNotSupportedQuality)
  19. {
  20. text += " " + layerHeight.properties.value + "mm"
  21. }
  22. return text
  23. }
  24. return ""
  25. }
  26. UM.SettingPropertyProvider
  27. {
  28. id: layerHeight
  29. containerStack: Cura.MachineManager.activeStack
  30. key: "layer_height"
  31. watchedProperties: ["value"]
  32. }
  33. }
  34. Cura.IconWithText
  35. {
  36. source: UM.Theme.getIcon("category_infill")
  37. text: Cura.MachineManager.activeStack ? parseInt(infillDensity.properties.value) + "%" : "0%"
  38. UM.SettingPropertyProvider
  39. {
  40. id: infillDensity
  41. containerStack: Cura.MachineManager.activeStack
  42. key: "infill_sparse_density"
  43. watchedProperties: ["value"]
  44. }
  45. }
  46. Cura.IconWithText
  47. {
  48. source: UM.Theme.getIcon("category_support")
  49. text: supportEnabled.properties.value == "True" ? enabledText : disabledText
  50. UM.SettingPropertyProvider
  51. {
  52. id: supportEnabled
  53. containerStack: Cura.MachineManager.activeMachine
  54. key: "support_enable"
  55. watchedProperties: ["value"]
  56. }
  57. }
  58. Cura.IconWithText
  59. {
  60. source: UM.Theme.getIcon("category_adhesion")
  61. text: platformAdhesionType.properties.value != "skirt" && platformAdhesionType.properties.value != "none" ? enabledText : disabledText
  62. UM.SettingPropertyProvider
  63. {
  64. id: platformAdhesionType
  65. containerStack: Cura.MachineManager.activeMachine
  66. key: "adhesion_type"
  67. watchedProperties: [ "value"]
  68. }
  69. }
  70. }