FirmwareUpdateWindow.qml 1.6 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.Window 2.1
  6. Rectangle
  7. {
  8. id: base;
  9. width: 500 * Screen.devicePixelRatio;
  10. height: 100 * Screen.devicePixelRatio;
  11. color: palette.window;
  12. signal close();
  13. Column
  14. {
  15. anchors.fill: parent;
  16. anchors.margins: 8 * Screen.devicePixelRatio;
  17. Label
  18. {
  19. anchors {
  20. left: parent.left;
  21. right: parent.right;
  22. }
  23. text: {
  24. if (manager.progress == 0)
  25. {
  26. //: Firmware update status label
  27. return qsTr("Starting firmware update, this may take a while.")
  28. }
  29. else if (manager.progress > 99)
  30. {
  31. //: Firmware update status label
  32. return qsTr("Firmware update completed.")
  33. }
  34. else
  35. {
  36. //: Firmware update status label
  37. return qsTr("Updating firmware.")
  38. }
  39. }
  40. wrapMode: Text.Wrap;
  41. }
  42. ProgressBar
  43. {
  44. id: prog;
  45. value: manager.progress
  46. minimumValue: 0;
  47. maximumValue: 100;
  48. anchors {
  49. left: parent.left;
  50. right: parent.right;
  51. }
  52. }
  53. Button {
  54. anchors.right: parent.right;
  55. text: qsTr("Close");
  56. onClicked: base.close();
  57. }
  58. }
  59. SystemPalette {
  60. id: palette;
  61. }
  62. }