DialSpecifics.qml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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("Dial")
  12. SectionLayout {
  13. Label {
  14. text: qsTr("Value")
  15. tooltip: qsTr("The current value of the dial.")
  16. }
  17. SecondColumnLayout {
  18. SpinBox {
  19. minimumValue: Math.min(backendValues.from.value, backendValues.to.value)
  20. maximumValue: Math.max(backendValues.from.value, backendValues.to.value)
  21. decimals: 2
  22. stepSize: 0.1
  23. backendValue: backendValues.value
  24. Layout.fillWidth: true
  25. }
  26. }
  27. Label {
  28. text: qsTr("From")
  29. tooltip: qsTr("The starting value of the dial range.")
  30. }
  31. SecondColumnLayout {
  32. SpinBox {
  33. maximumValue: 9999999
  34. minimumValue: -9999999
  35. decimals: 2
  36. stepSize: 0.1
  37. backendValue: backendValues.from
  38. Layout.fillWidth: true
  39. }
  40. }
  41. Label {
  42. text: qsTr("To")
  43. tooltip: qsTr("The ending value of the dial range.")
  44. }
  45. SecondColumnLayout {
  46. SpinBox {
  47. maximumValue: 9999999
  48. minimumValue: -9999999
  49. decimals: 2
  50. stepSize: 0.1
  51. backendValue: backendValues.to
  52. Layout.fillWidth: true
  53. }
  54. }
  55. Label {
  56. text: qsTr("Step Size")
  57. tooltip: qsTr("The step size of the dial.")
  58. }
  59. SecondColumnLayout {
  60. SpinBox {
  61. maximumValue: 9999999
  62. minimumValue: -9999999
  63. decimals: 2
  64. stepSize: 0.1
  65. backendValue: backendValues.stepSize
  66. Layout.fillWidth: true
  67. }
  68. }
  69. Label {
  70. text: qsTr("Snap Mode")
  71. tooltip: qsTr("The snap mode of the dial.")
  72. }
  73. SecondColumnLayout {
  74. ComboBox {
  75. backendValue: backendValues.snapMode
  76. model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ]
  77. scope: "Dial"
  78. Layout.fillWidth: true
  79. }
  80. }
  81. Label {
  82. text: qsTr("Live")
  83. tooltip: qsTr("Whether the dial provides live value updates.")
  84. }
  85. SecondColumnLayout {
  86. CheckBox {
  87. text: backendValues.live.valueToString
  88. backendValue: backendValues.live
  89. Layout.fillWidth: true
  90. }
  91. }
  92. Label {
  93. text: qsTr("Input Mode")
  94. tooltip: qsTr("How the dial tracks movement.")
  95. }
  96. SecondColumnLayout {
  97. ComboBox {
  98. backendValue: backendValues.inputMode
  99. model: [ "Circular", "Horizontal", "Vertical" ]
  100. scope: "Dial"
  101. Layout.fillWidth: true
  102. }
  103. }
  104. Label {
  105. text: qsTr("Wrap")
  106. tooltip: qsTr("Whether the dial wraps when dragged.")
  107. }
  108. SecondColumnLayout {
  109. CheckBox {
  110. text: backendValues.wrap.valueToString
  111. backendValue: backendValues.wrap
  112. Layout.fillWidth: true
  113. }
  114. }
  115. }
  116. }
  117. ControlSection {
  118. width: parent.width
  119. }
  120. FontSection {
  121. width: parent.width
  122. }
  123. PaddingSection {
  124. width: parent.width
  125. }
  126. }