FogSection.qml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. caption: qsTr("Fog")
  11. width: parent.width
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Enabled")
  15. tooltip: qsTr("Controls whether fog is applied to the scene")
  16. }
  17. SecondColumnLayout {
  18. CheckBox {
  19. text: backendValues.enabled.valueToString
  20. backendValue: backendValues.enabled
  21. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  22. + StudioTheme.Values.actionIndicatorWidth
  23. }
  24. ExpandingSpacer {}
  25. }
  26. PropertyLabel {
  27. visible: baseSectionLayout.isColorMode
  28. text: qsTr("Color")
  29. tooltip: qsTr("The color of the fog")
  30. }
  31. ColorEditor {
  32. backendValue: backendValues.color
  33. supportGradient: false
  34. }
  35. PropertyLabel {
  36. text: qsTr("Density")
  37. tooltip: qsTr("Controls the density of the fog")
  38. }
  39. SecondColumnLayout {
  40. SpinBox {
  41. minimumValue: 0
  42. maximumValue: 1
  43. decimals: 2
  44. stepSize: 0.01
  45. sliderIndicatorVisible: true
  46. backendValue: backendValues.density
  47. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  48. + StudioTheme.Values.actionIndicatorWidth
  49. }
  50. ExpandingSpacer {}
  51. }
  52. }
  53. }
  54. Section {
  55. caption: qsTr("Depth")
  56. width: parent.width
  57. SectionLayout {
  58. PropertyLabel {
  59. text: qsTr("Enabled")
  60. tooltip: qsTr("Controls if the fog appears in the distance")
  61. }
  62. SecondColumnLayout {
  63. CheckBox {
  64. text: backendValues.depthEnabled.valueToString
  65. backendValue: backendValues.depthEnabled
  66. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  67. + StudioTheme.Values.actionIndicatorWidth
  68. }
  69. ExpandingSpacer {}
  70. }
  71. PropertyLabel {
  72. text: qsTr("Start Distance")
  73. tooltip: qsTr("Starting distance from the camera")
  74. }
  75. SecondColumnLayout {
  76. SpinBox {
  77. minimumValue: 0
  78. maximumValue: 9999999
  79. decimals: 2
  80. backendValue: backendValues.depthNear
  81. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  82. + StudioTheme.Values.actionIndicatorWidth
  83. }
  84. ExpandingSpacer {}
  85. }
  86. PropertyLabel {
  87. text: qsTr("End Distance")
  88. tooltip: qsTr("Ending distance from the camera")
  89. }
  90. SecondColumnLayout {
  91. SpinBox {
  92. minimumValue: 0
  93. maximumValue: 9999999
  94. decimals: 2
  95. backendValue: backendValues.depthFar
  96. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  97. + StudioTheme.Values.actionIndicatorWidth
  98. }
  99. ExpandingSpacer {}
  100. }
  101. PropertyLabel {
  102. text: qsTr("Intensity Curve")
  103. tooltip: qsTr("Controls the intensity curve of depth fog")
  104. }
  105. SecondColumnLayout {
  106. SpinBox {
  107. minimumValue: 0
  108. maximumValue: 9999999
  109. decimals: 2
  110. backendValue: backendValues.depthCurve
  111. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  112. + StudioTheme.Values.actionIndicatorWidth
  113. }
  114. ExpandingSpacer {}
  115. }
  116. }
  117. }
  118. Section {
  119. caption: qsTr("Height")
  120. width: parent.width
  121. SectionLayout {
  122. PropertyLabel {
  123. text: qsTr("Enabled")
  124. tooltip: qsTr("Controls if height fog is enabled")
  125. }
  126. SecondColumnLayout {
  127. CheckBox {
  128. text: backendValues.heightEnabled.valueToString
  129. backendValue: backendValues.heightEnabled
  130. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  131. + StudioTheme.Values.actionIndicatorWidth
  132. }
  133. ExpandingSpacer {}
  134. }
  135. PropertyLabel {
  136. text: qsTr("Least Intense Height")
  137. tooltip: qsTr("Specifies the height where the fog is the least intense.")
  138. }
  139. SecondColumnLayout {
  140. SpinBox {
  141. minimumValue: -9999999
  142. maximumValue: 9999999
  143. decimals: 2
  144. backendValue: backendValues.leastIntenseY
  145. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  146. + StudioTheme.Values.actionIndicatorWidth
  147. }
  148. ExpandingSpacer {}
  149. }
  150. PropertyLabel {
  151. text: qsTr("Most Intense Height")
  152. tooltip: qsTr("Specifies the height where the fog is the most intense.")
  153. }
  154. SecondColumnLayout {
  155. SpinBox {
  156. minimumValue: -9999999
  157. maximumValue: 9999999
  158. decimals: 2
  159. backendValue: backendValues.mostIntenseY
  160. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  161. + StudioTheme.Values.actionIndicatorWidth
  162. }
  163. ExpandingSpacer {}
  164. }
  165. PropertyLabel {
  166. text: qsTr("Intensity Curve")
  167. tooltip: qsTr("Controls the intensity curve of height fog")
  168. }
  169. SecondColumnLayout {
  170. SpinBox {
  171. minimumValue: 0
  172. maximumValue: 9999999
  173. decimals: 2
  174. backendValue: backendValues.heightCurve
  175. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  176. + StudioTheme.Values.actionIndicatorWidth
  177. }
  178. ExpandingSpacer {}
  179. }
  180. }
  181. }
  182. Section {
  183. caption: qsTr("Transmission")
  184. width: parent.width
  185. SectionLayout {
  186. PropertyLabel {
  187. text: qsTr("Enabled")
  188. tooltip: qsTr("Controls if the fog has a light transmission effect enabled")
  189. }
  190. SecondColumnLayout {
  191. CheckBox {
  192. text: backendValues.transmitEnabled.valueToString
  193. backendValue: backendValues.transmitEnabled
  194. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  195. + StudioTheme.Values.actionIndicatorWidth
  196. }
  197. ExpandingSpacer {}
  198. }
  199. PropertyLabel {
  200. text: qsTr("Intensity Curve")
  201. tooltip: qsTr("Controls the intensity curve of the light transmission effect")
  202. }
  203. SecondColumnLayout {
  204. SpinBox {
  205. minimumValue: 0
  206. maximumValue: 9999999
  207. decimals: 2
  208. backendValue: backendValues.transmitCurve
  209. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  210. + StudioTheme.Values.actionIndicatorWidth
  211. }
  212. ExpandingSpacer {}
  213. }
  214. }
  215. }
  216. }