OutputProcessWidget.qml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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.1
  5. import QtQuick.Layouts 1.3
  6. import QtQuick.Controls 1.4 as Controls1
  7. import UM 1.1 as UM
  8. import Cura 1.0 as Cura
  9. Column
  10. {
  11. id: widget
  12. spacing: UM.Theme.getSize("thin_margin").height
  13. UM.I18nCatalog
  14. {
  15. id: catalog
  16. name: "cura"
  17. }
  18. Item
  19. {
  20. id: information
  21. width: parent.width
  22. height: childrenRect.height
  23. Column
  24. {
  25. id: timeAndCostsInformation
  26. anchors
  27. {
  28. left: parent.left
  29. right: moreInformationIcon.left
  30. rightMargin: UM.Theme.getSize("thin_margin").height
  31. }
  32. Cura.IconLabel
  33. {
  34. id: estimatedTime
  35. width: parent.width
  36. text: "Time"
  37. source: UM.Theme.getIcon("clock")
  38. font: UM.Theme.getFont("small")
  39. }
  40. Cura.IconLabel
  41. {
  42. id: estimatedCosts
  43. width: parent.width
  44. text: "Material costs"
  45. source: UM.Theme.getIcon("spool")
  46. font: UM.Theme.getFont("very_small")
  47. }
  48. }
  49. UM.RecolorImage
  50. {
  51. id: moreInformationIcon
  52. anchors
  53. {
  54. right: parent.right
  55. verticalCenter: timeAndCostsInformation.verticalCenter
  56. }
  57. source: UM.Theme.getIcon("info")
  58. width: UM.Theme.getSize("section_icon").width
  59. height: UM.Theme.getSize("section_icon").height
  60. sourceSize.width: width
  61. sourceSize.height: height
  62. color: UM.Theme.getColor("text_medium")
  63. }
  64. }
  65. Row
  66. {
  67. id: buttonRow
  68. spacing: UM.Theme.getSize("default_margin").width
  69. Cura.ActionButton
  70. {
  71. height: UM.Theme.getSize("action_panel_button").height
  72. text: catalog.i18nc("@button", "Preview")
  73. color: UM.Theme.getColor("secondary")
  74. hoverColor: UM.Theme.getColor("secondary")
  75. textColor: UM.Theme.getColor("primary")
  76. textHoverColor: UM.Theme.getColor("text")
  77. onClicked: console.log("Clicking preview")
  78. }
  79. Cura.OutputDevicesActionButton
  80. {
  81. width: UM.Theme.getSize("action_panel_button").width
  82. height: UM.Theme.getSize("action_panel_button").height
  83. }
  84. }
  85. }