ControlWindow.qml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Copyright (c) 2015 Ultimaker B.V.
  2. // Cura is released under the terms of the AGPLv3 or higher.
  3. import QtQuick 2.1
  4. import QtQuick.Controls 1.1
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Window 2.1
  7. import UM 1.0 as UM
  8. UM.Dialog {
  9. width: 500 * Screen.devicePixelRatio;
  10. height: 100 * Screen.devicePixelRatio;
  11. title: "Print with USB"
  12. Column
  13. {
  14. anchors.fill: parent;
  15. Row
  16. {
  17. spacing: UM.Theme.sizes.default_margin.width;
  18. Text
  19. {
  20. //: USB Printing dialog label, %1 is head temperature
  21. text: qsTr("Extruder Temperature %1").arg(manager.extruderTemperature)
  22. }
  23. Text
  24. {
  25. //: USB Printing dialog label, %1 is bed temperature
  26. text: qsTr("Bed Temperature %1").arg(manager.bedTemperature)
  27. }
  28. Text
  29. {
  30. text: "" + manager.error
  31. }
  32. }
  33. ProgressBar
  34. {
  35. id: prog;
  36. anchors.left: parent.left;
  37. anchors.right: parent.right;
  38. minimumValue: 0;
  39. maximumValue: 100;
  40. value: manager.progress
  41. }
  42. }
  43. rightButtons: [
  44. Button {
  45. //: USB Printing dialog start print button
  46. text: qsTr("Print");
  47. onClicked: { manager.startPrint() }
  48. enabled: manager.progress == 0 ? true : false
  49. },
  50. Button
  51. {
  52. //: USB Printing dialog cancel print button
  53. text: qsTr("Cancel");
  54. onClicked: { manager.cancelPrint() }
  55. enabled: manager.progress == 0 ? false: true
  56. }
  57. ]
  58. }