GraphsCameraSection.qml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. // Copyright (C) 2023 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick
  4. import HelperWidgets
  5. import QtQuick.Layouts
  6. Section {
  7. anchors.left: parent.left
  8. anchors.right: parent.right
  9. caption: qsTr("Camera")
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Preset")
  13. tooltip: qsTr("Camera preset")
  14. Layout.fillWidth: true
  15. }
  16. SecondColumnLayout {
  17. ComboBox {
  18. backendValue: backendValues.cameraPreset
  19. model: ["NoPreset", "FrontLow", "Front", "FrontHigh", "LeftLow",
  20. "Left", "LeftHigh", "RightLow", "Right", "RightHigh", "BehindLow",
  21. "Behind", "BehindHigh", "IsometricLeft", "IsometricLeftHigh",
  22. "IsometricRight", "IsometricRightHigh", "DirectlyAbove",
  23. "DirectlyAboveCW45", "DirectlyAboveCCW45", "FrontBelow",
  24. "LeftBelow", "RightBelow", "BehindBelow", "DirectlyBelow"]
  25. Layout.fillWidth: true
  26. scope: "Graphs3D"
  27. }
  28. }
  29. PropertyLabel {
  30. text: qsTr("Target")
  31. tooltip: qsTr("Camera target position")
  32. Layout.fillWidth: true
  33. }
  34. SecondColumnLayout {
  35. SpinBox {
  36. backendValue: backendValues.cameraTargetPosition_x
  37. minimumValue: -1.0
  38. maximumValue: 1.0
  39. stepSize: 0.01
  40. decimals: 2
  41. Layout.fillWidth: true
  42. }
  43. ControlLabel {
  44. text: "X"
  45. }
  46. SpinBox {
  47. backendValue: backendValues.cameraTargetPosition_y
  48. minimumValue: -1.0
  49. maximumValue: 1.0
  50. stepSize: 0.01
  51. decimals: 2
  52. Layout.fillWidth: true
  53. }
  54. ControlLabel {
  55. text:"Y"
  56. }
  57. SpinBox {
  58. backendValue: backendValues.cameraTargetPosition_z
  59. minimumValue: -1.0
  60. maximumValue: 1.0
  61. stepSize: 0.01
  62. decimals: 2
  63. Layout.fillWidth: true
  64. }
  65. ControlLabel {
  66. text: "Z"
  67. }
  68. }
  69. PropertyLabel {
  70. text: qsTr("Zoom")
  71. tooltip: qsTr("Camera zoom level")
  72. Layout.fillWidth: true
  73. }
  74. SecondColumnLayout {
  75. SpinBox {
  76. backendValue: backendValues.cameraZoomLevel
  77. minimumValue: backendValues.minCameraZoomLevel
  78. maximumValue: backendValues.maxCameraZoomLevel
  79. stepSize: 1
  80. decimals: 0
  81. Layout.fillWidth: true
  82. }
  83. }
  84. PropertyLabel {
  85. text: qsTr("Min Zoom")
  86. tooltip: qsTr("Camera minimum zoom")
  87. Layout.fillWidth: true
  88. }
  89. SecondColumnLayout {
  90. SpinBox {
  91. backendValue: backendValues.minCameraZoomLevel
  92. minimumValue: 0
  93. maximumValue: backendValues.maxCameraZoomLevel
  94. stepSize: 1
  95. decimals: 0
  96. Layout.fillWidth: true
  97. }
  98. }
  99. PropertyLabel {
  100. text: qsTr("Max Zoom")
  101. tooltip: qsTr("Camera maximum zoom")
  102. Layout.fillWidth: true
  103. }
  104. SecondColumnLayout {
  105. SpinBox {
  106. backendValue: backendValues.maxCameraZoomLevel
  107. minimumValue: backendValues.minCameraZoomLevel
  108. maximumValue: 500
  109. stepSize: 1
  110. decimals: 0
  111. Layout.fillWidth: true
  112. }
  113. }
  114. PropertyLabel {
  115. text: qsTr("X Rotation")
  116. tooltip: qsTr("Camera X rotation")
  117. Layout.fillWidth: true
  118. }
  119. SecondColumnLayout {
  120. SpinBox {
  121. backendValue: backendValues.cameraXRotation
  122. minimumValue: -180
  123. maximumValue: 180
  124. stepSize: 1
  125. decimals: 0
  126. Layout.fillWidth: true
  127. }
  128. }
  129. PropertyLabel {
  130. text: qsTr("Wrap X")
  131. tooltip: qsTr("Wrap camera X rotation")
  132. Layout.fillWidth: true
  133. }
  134. SecondColumnLayout {
  135. CheckBox {
  136. backendValue: backendValues.wrapCameraXRotation
  137. Layout.fillWidth: true
  138. }
  139. }
  140. PropertyLabel {
  141. text: qsTr("Y Rotation")
  142. tooltip: qsTr("Camera Y rotation")
  143. Layout.fillWidth: true
  144. }
  145. SecondColumnLayout {
  146. SpinBox {
  147. backendValue: backendValues.cameraYRotation
  148. minimumValue: 0
  149. maximumValue: 90
  150. stepSize: 1
  151. decimals: 0
  152. Layout.fillWidth: true
  153. }
  154. }
  155. PropertyLabel {
  156. text: qsTr("Wrap Y")
  157. tooltip: qsTr("Wrap camera Y rotation")
  158. Layout.fillWidth: true
  159. }
  160. SecondColumnLayout {
  161. CheckBox {
  162. backendValue: backendValues.wrapCameraYRotation
  163. Layout.fillWidth: true
  164. }
  165. }
  166. PropertyLabel {
  167. text: qsTr("Orthographic")
  168. tooltip: qsTr("Use orthographic camera")
  169. Layout.fillWidth: true
  170. }
  171. SecondColumnLayout {
  172. CheckBox {
  173. backendValue: backendValues.orthoProjection
  174. Layout.fillWidth: true
  175. }
  176. }
  177. }
  178. }