PrintCoreConfiguration.qml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. import Cura 1.0 as Cura
  7. Item
  8. {
  9. id: extruderInfo
  10. property var printCoreConfiguration
  11. height: information.height
  12. //Extruder icon.
  13. Cura.ExtruderIcon
  14. {
  15. id: icon
  16. materialColor: printCoreConfiguration !== null ? printCoreConfiguration.material.color : ""
  17. anchors.verticalCenter: parent.verticalCenter
  18. extruderEnabled: printCoreConfiguration !== null && printCoreConfiguration.material.brand !== "" && printCoreConfiguration.hotendID !== ""
  19. }
  20. Column
  21. {
  22. id: information
  23. anchors
  24. {
  25. left: icon.right
  26. right: parent.right
  27. margins: UM.Theme.getSize("default_margin").width
  28. }
  29. Label
  30. {
  31. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
  32. renderType: Text.NativeRendering
  33. elide: Text.ElideRight
  34. font: UM.Theme.getFont("default")
  35. color: UM.Theme.getColor("text_inactive")
  36. width: parent.width
  37. }
  38. Label
  39. {
  40. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
  41. renderType: Text.NativeRendering
  42. elide: Text.ElideRight
  43. font: UM.Theme.getFont("medium")
  44. color: UM.Theme.getColor("text")
  45. width: parent.width
  46. }
  47. Label
  48. {
  49. text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
  50. renderType: Text.NativeRendering
  51. elide: Text.ElideRight
  52. font: UM.Theme.getFont("default")
  53. color: UM.Theme.getColor("text_inactive")
  54. width: parent.width
  55. }
  56. }
  57. }