ControlWindow.qml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.1 as UM
  8. UM.Dialog
  9. {
  10. width: 500 * Screen.devicePixelRatio;
  11. height: 100 * Screen.devicePixelRatio;
  12. modality: Qt.NonModal
  13. title: catalog.i18nc("@title:window", "Print with USB")
  14. Column
  15. {
  16. anchors.fill: parent;
  17. Row
  18. {
  19. spacing: UM.Theme.getSize("default_margin").width;
  20. Text
  21. {
  22. //: USB Printing dialog label, %1 is head temperature
  23. text: catalog.i18nc("@label","Extruder Temperature %1").arg(manager.extruderTemperature)
  24. }
  25. Text
  26. {
  27. //: USB Printing dialog label, %1 is bed temperature
  28. text: catalog.i18nc("@label","Bed Temperature %1").arg(manager.bedTemperature)
  29. }
  30. Text
  31. {
  32. text: "" + manager.error
  33. }
  34. UM.I18nCatalog{id: catalog; name:"cura"}
  35. }
  36. ProgressBar
  37. {
  38. id: prog;
  39. anchors.left: parent.left;
  40. anchors.right: parent.right;
  41. minimumValue: 0;
  42. maximumValue: 100;
  43. value: manager.progress
  44. }
  45. }
  46. rightButtons: [
  47. Button
  48. {
  49. //: USB Printing dialog start print button
  50. text: catalog.i18nc("@action:button","Print");
  51. onClicked: { manager.startPrint() }
  52. enabled: manager.progress == 0 ? true : false
  53. },
  54. Button
  55. {
  56. //: USB Printing dialog cancel print button
  57. text: catalog.i18nc("@action:button","Cancel");
  58. onClicked: { manager.cancelPrint() }
  59. enabled: manager.progress == 0 ? false: true
  60. }
  61. ]
  62. }