Gravity3DSection.qml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 HelperWidgets 2.0
  5. import QtQuick.Layouts 1.15
  6. import StudioTheme 1.0 as StudioTheme
  7. Section {
  8. caption: qsTr("Particle Gravity")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Magnitude")
  13. tooltip: qsTr("Sets the magnitude in position change per second.")
  14. }
  15. SecondColumnLayout {
  16. SpinBox {
  17. minimumValue: -999999
  18. maximumValue: 999999
  19. decimals: 2
  20. backendValue: backendValues.magnitude
  21. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  22. + StudioTheme.Values.actionIndicatorWidth
  23. }
  24. ExpandingSpacer {}
  25. }
  26. PropertyLabel {
  27. text: qsTr("Direction")
  28. tooltip: qsTr("Sets the direction the gravity will affect toward.")
  29. }
  30. SecondColumnLayout {
  31. SpinBox {
  32. minimumValue: -9999999
  33. maximumValue: 9999999
  34. decimals: 2
  35. backendValue: backendValues.direction_x
  36. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  37. + StudioTheme.Values.actionIndicatorWidth
  38. }
  39. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  40. ControlLabel {
  41. text: "X"
  42. color: StudioTheme.Values.theme3DAxisXColor
  43. }
  44. ExpandingSpacer {}
  45. }
  46. PropertyLabel {}
  47. SecondColumnLayout {
  48. SpinBox {
  49. minimumValue: -9999999
  50. maximumValue: 9999999
  51. decimals: 2
  52. backendValue: backendValues.direction_y
  53. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  54. + StudioTheme.Values.actionIndicatorWidth
  55. }
  56. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  57. ControlLabel {
  58. text: "Y"
  59. color: StudioTheme.Values.theme3DAxisYColor
  60. }
  61. ExpandingSpacer {}
  62. }
  63. PropertyLabel {}
  64. SecondColumnLayout {
  65. SpinBox {
  66. minimumValue: -9999999
  67. maximumValue: 9999999
  68. decimals: 2
  69. backendValue: backendValues.direction_z
  70. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  71. + StudioTheme.Values.actionIndicatorWidth
  72. }
  73. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  74. ControlLabel {
  75. text: "Z"
  76. color: StudioTheme.Values.theme3DAxisZColor
  77. }
  78. ExpandingSpacer {}
  79. }
  80. }
  81. }