NodeSection.qml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. // Copyright (C) 2022 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("Visibility")
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Visibility")
  15. tooltip: qsTr("Sets the local visibility of the node.")
  16. }
  17. SecondColumnLayout {
  18. // ### should be a slider
  19. CheckBox {
  20. text: qsTr("Visible")
  21. backendValue: backendValues.visible
  22. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  23. + StudioTheme.Values.actionIndicatorWidth
  24. }
  25. ExpandingSpacer {}
  26. }
  27. PropertyLabel {
  28. text: qsTr("Opacity")
  29. tooltip: qsTr("Sets the local opacity value of the node.")
  30. }
  31. SecondColumnLayout {
  32. // ### should be a slider
  33. SpinBox {
  34. minimumValue: 0
  35. maximumValue: 1
  36. decimals: 2
  37. stepSize: 0.1
  38. backendValue: backendValues.opacity
  39. sliderIndicatorVisible: true
  40. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  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. minimumValue: -9999999
  61. maximumValue: 9999999
  62. decimals: 2
  63. backendValue: backendValues.x
  64. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  65. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  78. maximumValue: 9999999
  79. decimals: 2
  80. backendValue: backendValues.y
  81. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  82. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  95. maximumValue: 9999999
  96. decimals: 2
  97. backendValue: backendValues.z
  98. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  99. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  117. maximumValue: 9999999
  118. decimals: 2
  119. backendValue: backendValues.eulerRotation_x
  120. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  121. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  134. maximumValue: 9999999
  135. decimals: 2
  136. backendValue: backendValues.eulerRotation_y
  137. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  138. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  151. maximumValue: 9999999
  152. decimals: 2
  153. backendValue: backendValues.eulerRotation_z
  154. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  155. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  173. maximumValue: 9999999
  174. decimals: 2
  175. backendValue: backendValues.scale_x
  176. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  177. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  190. maximumValue: 9999999
  191. decimals: 2
  192. backendValue: backendValues.scale_y
  193. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  194. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  207. maximumValue: 9999999
  208. decimals: 2
  209. backendValue: backendValues.scale_z
  210. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  211. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  229. maximumValue: 9999999
  230. decimals: 2
  231. backendValue: backendValues.pivot_x
  232. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  233. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  246. maximumValue: 9999999
  247. decimals: 2
  248. backendValue: backendValues.pivot_y
  249. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  250. + StudioTheme.Values.actionIndicatorWidth
  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. minimumValue: -9999999
  263. maximumValue: 9999999
  264. decimals: 2
  265. backendValue: backendValues.pivot_z
  266. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  267. + StudioTheme.Values.actionIndicatorWidth
  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. }