ProgressBarSpecifics.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Copyright (C) 2017 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // Qt-Security score:significant reason:default
  4. import QtQuick
  5. import HelperWidgets
  6. import QtQuick.Layouts
  7. Column {
  8. width: parent.width
  9. Section {
  10. width: parent.width
  11. caption: qsTr("ProgressBar")
  12. SectionLayout {
  13. Label {
  14. text: qsTr("Indeterminate")
  15. tooltip: qsTr("Whether the progress is indeterminate.")
  16. disabledState: !backendValues.indeterminate.isAvailable
  17. }
  18. SecondColumnLayout {
  19. CheckBox {
  20. text: backendValues.indeterminate.valueToString
  21. backendValue: backendValues.indeterminate
  22. Layout.fillWidth: true
  23. enabled: backendValue.isAvailable
  24. }
  25. }
  26. Label {
  27. text: qsTr("Value")
  28. tooltip: qsTr("The current value of the progress.")
  29. }
  30. SecondColumnLayout {
  31. SpinBox {
  32. minimumValue: Math.min(backendValues.from.value, backendValues.to.value)
  33. maximumValue: Math.max(backendValues.from.value, backendValues.to.value)
  34. decimals: 2
  35. stepSize: 0.1
  36. backendValue: backendValues.value
  37. Layout.fillWidth: true
  38. }
  39. }
  40. Label {
  41. text: qsTr("From")
  42. tooltip: qsTr("The starting value for the progress.")
  43. }
  44. SecondColumnLayout {
  45. SpinBox {
  46. maximumValue: 9999999
  47. minimumValue: -9999999
  48. decimals: 2
  49. stepSize: 0.1
  50. backendValue: backendValues.from
  51. Layout.fillWidth: true
  52. }
  53. }
  54. Label {
  55. text: qsTr("To")
  56. tooltip: qsTr("The ending value for the progress.")
  57. }
  58. SecondColumnLayout {
  59. SpinBox {
  60. maximumValue: 9999999
  61. minimumValue: -9999999
  62. decimals: 2
  63. stepSize: 0.1
  64. backendValue: backendValues.to
  65. Layout.fillWidth: true
  66. }
  67. }
  68. }
  69. }
  70. ControlSection {
  71. width: parent.width
  72. }
  73. FontSection {
  74. width: parent.width
  75. }
  76. PaddingSection {
  77. width: parent.width
  78. }
  79. }