OrbitCameraControllerSection.qml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. // Copyright (C) 2023 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick 2.15
  4. import QtQuick.Layouts 1.15
  5. import HelperWidgets 2.0
  6. import StudioTheme 1.0 as StudioTheme
  7. Column {
  8. width: parent.width
  9. Section {
  10. width: parent.width
  11. caption: qsTr("Orbit Camera Controller")
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Origin")
  15. tooltip: qsTr("The node that the camera will orbit around.")
  16. }
  17. SecondColumnLayout {
  18. ItemFilterComboBox {
  19. typeFilter: "QtQuick3D.Node"
  20. backendValue: backendValues.origin
  21. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  22. + StudioTheme.Values.actionIndicatorWidth
  23. }
  24. ExpandingSpacer {}
  25. }
  26. PropertyLabel {
  27. text: qsTr("Camera")
  28. tooltip: qsTr("The camera that will be controlled.")
  29. }
  30. SecondColumnLayout {
  31. ItemFilterComboBox {
  32. typeFilter: "QtQuick3D.Camera"
  33. backendValue: backendValues.camera
  34. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  35. + StudioTheme.Values.actionIndicatorWidth
  36. }
  37. ExpandingSpacer {}
  38. }
  39. PropertyLabel {
  40. text: qsTr("Mouse/Touch")
  41. tooltip: qsTr("Enables interaction via mouse and touch.")
  42. }
  43. SecondColumnLayout {
  44. CheckBox {
  45. id: mouseEnabledCheckBox
  46. text: backendValues.mouseEnabled.valueToString
  47. backendValue: backendValues.mouseEnabled
  48. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  49. + StudioTheme.Values.actionIndicatorWidth
  50. }
  51. ExpandingSpacer {}
  52. }
  53. PropertyLabel {
  54. visible: mouseEnabledCheckBox.checked
  55. text: qsTr("Pan Controls")
  56. tooltip: qsTr("Enables panning gestures.")
  57. }
  58. SecondColumnLayout {
  59. visible: mouseEnabledCheckBox.checked
  60. CheckBox {
  61. text: backendValues.panEnabled.valueToString
  62. backendValue: backendValues.panEnabled
  63. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  64. + StudioTheme.Values.actionIndicatorWidth
  65. }
  66. ExpandingSpacer {}
  67. }
  68. PropertyLabel {
  69. visible: mouseEnabledCheckBox.checked
  70. text: qsTr("Invert X")
  71. tooltip: qsTr("Enables inverting X-axis controls.")
  72. }
  73. SecondColumnLayout {
  74. visible: mouseEnabledCheckBox.checked
  75. CheckBox {
  76. text: backendValues.xInvert.valueToString
  77. backendValue: backendValues.xInvert
  78. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  79. + StudioTheme.Values.actionIndicatorWidth
  80. }
  81. ExpandingSpacer {}
  82. }
  83. PropertyLabel {
  84. visible: mouseEnabledCheckBox.checked
  85. text: qsTr("X Speed")
  86. tooltip: qsTr("The speed of the X-axis controls.")
  87. }
  88. SecondColumnLayout {
  89. SpinBox {
  90. minimumValue: 0
  91. maximumValue: 999999
  92. decimals: 2
  93. stepSize: 0.1
  94. backendValue: backendValues.xSpeed
  95. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  96. + StudioTheme.Values.actionIndicatorWidth
  97. }
  98. ExpandingSpacer {}
  99. }
  100. PropertyLabel {
  101. visible: mouseEnabledCheckBox.checked
  102. text: qsTr("Invert Y")
  103. tooltip: qsTr("Enables inverting Y-axis controls.")
  104. }
  105. SecondColumnLayout {
  106. visible: mouseEnabledCheckBox.checked
  107. CheckBox {
  108. text: backendValues.yInvert.valueToString
  109. backendValue: backendValues.yInvert
  110. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  111. + StudioTheme.Values.actionIndicatorWidth
  112. }
  113. ExpandingSpacer {}
  114. }
  115. PropertyLabel {
  116. visible: mouseEnabledCheckBox.checked
  117. text: qsTr("Y Speed")
  118. tooltip: qsTr("The speed of the Y-axis controls.")
  119. }
  120. SecondColumnLayout {
  121. SpinBox {
  122. minimumValue: 0
  123. maximumValue: 999999
  124. decimals: 2
  125. stepSize: 0.1
  126. backendValue: backendValues.ySpeed
  127. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  128. + StudioTheme.Values.actionIndicatorWidth
  129. }
  130. ExpandingSpacer {}
  131. }
  132. }
  133. }
  134. }