ScatterSection.qml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. caption: qsTr("Noise")
  11. width: parent.width
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Noise Sample Texture")
  15. tooltip: qsTr("Defines a texture for noise samples.")
  16. }
  17. SecondColumnLayout {
  18. ItemFilterComboBox {
  19. typeFilter: "QtQuick3D.Texture"
  20. backendValue: backendValues.noiseSample_texture
  21. defaultItem: qsTr("Default")
  22. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  23. + StudioTheme.Values.actionIndicatorWidth
  24. }
  25. ExpandingSpacer {}
  26. }
  27. }
  28. }
  29. Section {
  30. caption: qsTr("Scatter")
  31. width: parent.width
  32. SectionLayout {
  33. PropertyLabel {
  34. text: qsTr("Amount")
  35. tooltip: qsTr("Amount of scatter.")
  36. }
  37. SecondColumnLayout {
  38. SpinBox {
  39. minimumValue: 0
  40. maximumValue: 127
  41. decimals: 2
  42. backendValue: backendValues.amount
  43. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  44. + StudioTheme.Values.actionIndicatorWidth
  45. }
  46. ExpandingSpacer {}
  47. }
  48. PropertyLabel {
  49. text: qsTr("Direction")
  50. tooltip: qsTr("Direction of scatter. 0 = both, 1 = horizontal, 2 = vertical.")
  51. }
  52. SecondColumnLayout {
  53. SpinBox {
  54. minimumValue: 0
  55. maximumValue: 2
  56. decimals: 0
  57. backendValue: backendValues.direction
  58. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  59. + StudioTheme.Values.actionIndicatorWidth
  60. }
  61. ExpandingSpacer {}
  62. }
  63. PropertyLabel {
  64. text: qsTr("Randomize")
  65. tooltip: qsTr("Specifies if the scatter is random.")
  66. }
  67. SecondColumnLayout {
  68. CheckBox {
  69. text: backendValues.randomize.valueToString
  70. backendValue: backendValues.randomize
  71. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  72. + StudioTheme.Values.actionIndicatorWidth
  73. }
  74. ExpandingSpacer {}
  75. }
  76. }
  77. }
  78. }