FirmwareUpdateWindow.qml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright (c) 2015 Ultimaker B.V.
  2. // Cura is released under the terms of the AGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Window 2.2
  5. import QtQuick.Controls 1.2
  6. import UM 1.0 as UM
  7. UM.Dialog
  8. {
  9. id: base;
  10. width: 500 * Screen.devicePixelRatio;
  11. height: 100 * Screen.devicePixelRatio;
  12. visible: true;
  13. modality: Qt.ApplicationModal;
  14. Column
  15. {
  16. anchors.fill: parent;
  17. Text
  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. SystemPalette {
  54. id: palette;
  55. }
  56. }
  57. rightButtons: Button {
  58. text: qsTr("Close");
  59. enabled: true;
  60. }
  61. }