PrintCoreConfiguration.qml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.5 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. UM.Label
  30. {
  31. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
  32. elide: Text.ElideRight
  33. color: UM.Theme.getColor("text_inactive")
  34. width: parent.width
  35. }
  36. UM.Label
  37. {
  38. text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
  39. elide: Text.ElideRight
  40. font: UM.Theme.getFont("medium")
  41. width: parent.width
  42. }
  43. UM.Label
  44. {
  45. text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
  46. elide: Text.ElideRight
  47. color: UM.Theme.getColor("text_inactive")
  48. width: parent.width
  49. }
  50. }
  51. }