PrintCoreConfiguration.qml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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.0
  5. import UM 1.2 as UM
  6. Column
  7. {
  8. id: extruderInfo
  9. property var printCoreConfiguration
  10. property var mainColor: "black"
  11. spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
  12. height: childrenRect.height
  13. Item
  14. {
  15. id: extruder
  16. width: parent.width
  17. height: childrenRect.height
  18. Label
  19. {
  20. id: extruderLabel
  21. text: catalog.i18nc("@label:extruder label", "Extruder")
  22. renderType: Text.NativeRendering
  23. elide: Text.ElideRight
  24. anchors.left: parent.left
  25. font: UM.Theme.getFont("default")
  26. color: mainColor
  27. }
  28. // Rounded item to show the extruder number
  29. Item
  30. {
  31. id: extruderIconItem
  32. anchors.verticalCenter: extruderLabel.verticalCenter
  33. anchors.left: extruderLabel.right
  34. anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
  35. width: UM.Theme.getSize("section_icon").width
  36. height: UM.Theme.getSize("section_icon").height
  37. UM.RecolorImage {
  38. id: mainCircle
  39. anchors.fill: parent
  40. anchors.centerIn: parent
  41. sourceSize.width: parent.width
  42. sourceSize.height: parent.height
  43. source: UM.Theme.getIcon("extruder_button")
  44. color: mainColor
  45. }
  46. Label
  47. {
  48. id: extruderNumberText
  49. anchors.centerIn: parent
  50. text: printCoreConfiguration.position + 1
  51. renderType: Text.NativeRendering
  52. font: UM.Theme.getFont("default")
  53. color: mainColor
  54. }
  55. }
  56. }
  57. Label
  58. {
  59. id: materialLabel
  60. text: printCoreConfiguration.material.name
  61. renderType: Text.NativeRendering
  62. elide: Text.ElideRight
  63. width: parent.width
  64. font: UM.Theme.getFont("default_bold")
  65. color: mainColor
  66. }
  67. Label
  68. {
  69. id: printCoreTypeLabel
  70. text: printCoreConfiguration.hotendID
  71. renderType: Text.NativeRendering
  72. elide: Text.ElideRight
  73. width: parent.width
  74. font: UM.Theme.getFont("default")
  75. color: mainColor
  76. }
  77. }