NodeSection.qml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. // Copyright (C) 2021 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("Node")
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Opacity")
  15. tooltip: qsTr("Sets the local opacity value of the node.")
  16. }
  17. SecondColumnLayout {
  18. // ### should be a slider
  19. SpinBox {
  20. minimumValue: 0
  21. maximumValue: 1
  22. decimals: 2
  23. stepSize: 0.1
  24. backendValue: backendValues.opacity
  25. sliderIndicatorVisible: true
  26. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  27. + StudioTheme.Values.actionIndicatorWidth
  28. }
  29. ExpandingSpacer {}
  30. }
  31. PropertyLabel {
  32. text: qsTr("Visibility")
  33. tooltip: qsTr("Sets the local visibility of the node.")
  34. }
  35. SecondColumnLayout {
  36. // ### should be a slider
  37. CheckBox {
  38. text: qsTr("Is Visible")
  39. backendValue: backendValues.visible
  40. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  41. + StudioTheme.Values.actionIndicatorWidth
  42. }
  43. ExpandingSpacer {}
  44. }
  45. }
  46. }
  47. Section {
  48. id: transformSection
  49. width: parent.width
  50. caption: qsTr("Transform")
  51. ColumnLayout {
  52. spacing: StudioTheme.Values.transform3DSectionSpacing
  53. SectionLayout {
  54. PropertyLabel {
  55. text: qsTr("Translation")
  56. tooltip: qsTr("Sets the translation of the node.")
  57. }
  58. SecondColumnLayout {
  59. SpinBox {
  60. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  61. + StudioTheme.Values.actionIndicatorWidth
  62. minimumValue: -9999999
  63. maximumValue: 9999999
  64. decimals: 2
  65. backendValue: backendValues.x
  66. }
  67. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  68. ControlLabel {
  69. text: "X"
  70. color: StudioTheme.Values.theme3DAxisXColor
  71. }
  72. ExpandingSpacer {}
  73. }
  74. PropertyLabel {}
  75. SecondColumnLayout {
  76. SpinBox {
  77. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  78. + StudioTheme.Values.actionIndicatorWidth
  79. minimumValue: -9999999
  80. maximumValue: 9999999
  81. decimals: 2
  82. backendValue: backendValues.y
  83. }
  84. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  85. ControlLabel {
  86. text: "Y"
  87. color: StudioTheme.Values.theme3DAxisYColor
  88. }
  89. ExpandingSpacer {}
  90. }
  91. PropertyLabel {}
  92. SecondColumnLayout {
  93. SpinBox {
  94. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  95. + StudioTheme.Values.actionIndicatorWidth
  96. minimumValue: -9999999
  97. maximumValue: 9999999
  98. decimals: 2
  99. backendValue: backendValues.z
  100. }
  101. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  102. ControlLabel {
  103. text: "Z"
  104. color: StudioTheme.Values.theme3DAxisZColor
  105. }
  106. ExpandingSpacer {}
  107. }
  108. }
  109. SectionLayout {
  110. PropertyLabel {
  111. text: qsTr("Rotation")
  112. tooltip: qsTr("Sets the rotation of the node in degrees.")
  113. }
  114. SecondColumnLayout {
  115. SpinBox {
  116. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  117. + StudioTheme.Values.actionIndicatorWidth
  118. minimumValue: -9999999
  119. maximumValue: 9999999
  120. decimals: 2
  121. backendValue: backendValues.eulerRotation_x
  122. }
  123. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  124. ControlLabel {
  125. text: "X"
  126. color: StudioTheme.Values.theme3DAxisXColor
  127. }
  128. ExpandingSpacer {}
  129. }
  130. PropertyLabel {}
  131. SecondColumnLayout {
  132. SpinBox {
  133. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  134. + StudioTheme.Values.actionIndicatorWidth
  135. minimumValue: -9999999
  136. maximumValue: 9999999
  137. decimals: 2
  138. backendValue: backendValues.eulerRotation_y
  139. }
  140. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  141. ControlLabel {
  142. text: "Y"
  143. color: StudioTheme.Values.theme3DAxisYColor
  144. }
  145. ExpandingSpacer {}
  146. }
  147. PropertyLabel {}
  148. SecondColumnLayout {
  149. SpinBox {
  150. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  151. + StudioTheme.Values.actionIndicatorWidth
  152. minimumValue: -9999999
  153. maximumValue: 9999999
  154. decimals: 2
  155. backendValue: backendValues.eulerRotation_z
  156. }
  157. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  158. ControlLabel {
  159. text: "Z"
  160. color: StudioTheme.Values.theme3DAxisZColor
  161. }
  162. ExpandingSpacer {}
  163. }
  164. }
  165. SectionLayout {
  166. PropertyLabel {
  167. text: qsTr("Scale")
  168. tooltip: qsTr("Sets the scale of the node.")
  169. }
  170. SecondColumnLayout {
  171. SpinBox {
  172. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  173. + StudioTheme.Values.actionIndicatorWidth
  174. minimumValue: -9999999
  175. maximumValue: 9999999
  176. decimals: 2
  177. backendValue: backendValues.scale_x
  178. }
  179. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  180. ControlLabel {
  181. text: "X"
  182. color: StudioTheme.Values.theme3DAxisXColor
  183. }
  184. ExpandingSpacer {}
  185. }
  186. PropertyLabel {}
  187. SecondColumnLayout {
  188. SpinBox {
  189. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  190. + StudioTheme.Values.actionIndicatorWidth
  191. minimumValue: -9999999
  192. maximumValue: 9999999
  193. decimals: 2
  194. backendValue: backendValues.scale_y
  195. }
  196. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  197. ControlLabel {
  198. text: "Y"
  199. color: StudioTheme.Values.theme3DAxisYColor
  200. }
  201. ExpandingSpacer {}
  202. }
  203. PropertyLabel {}
  204. SecondColumnLayout {
  205. SpinBox {
  206. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  207. + StudioTheme.Values.actionIndicatorWidth
  208. minimumValue: -9999999
  209. maximumValue: 9999999
  210. decimals: 2
  211. backendValue: backendValues.scale_z
  212. }
  213. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  214. ControlLabel {
  215. text: "Z"
  216. color: StudioTheme.Values.theme3DAxisZColor
  217. }
  218. ExpandingSpacer {}
  219. }
  220. }
  221. SectionLayout {
  222. PropertyLabel {
  223. text: qsTr("Pivot")
  224. tooltip: qsTr("Sets the pivot of the node.")
  225. }
  226. SecondColumnLayout {
  227. SpinBox {
  228. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  229. + StudioTheme.Values.actionIndicatorWidth
  230. minimumValue: -9999999
  231. maximumValue: 9999999
  232. decimals: 2
  233. backendValue: backendValues.pivot_x
  234. }
  235. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  236. ControlLabel {
  237. text: "X"
  238. color: StudioTheme.Values.theme3DAxisXColor
  239. }
  240. ExpandingSpacer {}
  241. }
  242. PropertyLabel {}
  243. SecondColumnLayout {
  244. SpinBox {
  245. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  246. + StudioTheme.Values.actionIndicatorWidth
  247. minimumValue: -9999999
  248. maximumValue: 9999999
  249. decimals: 2
  250. backendValue: backendValues.pivot_y
  251. }
  252. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  253. ControlLabel {
  254. text: "Y"
  255. color: StudioTheme.Values.theme3DAxisYColor
  256. }
  257. ExpandingSpacer {}
  258. }
  259. PropertyLabel {}
  260. SecondColumnLayout {
  261. SpinBox {
  262. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  263. + StudioTheme.Values.actionIndicatorWidth
  264. minimumValue: -9999999
  265. maximumValue: 9999999
  266. decimals: 2
  267. backendValue: backendValues.pivot_z
  268. }
  269. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  270. ControlLabel {
  271. text: "Z"
  272. color: StudioTheme.Values.theme3DAxisZColor
  273. }
  274. ExpandingSpacer {}
  275. }
  276. }
  277. }
  278. }
  279. }