HeightFieldGeometrySection.qml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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("Height Field Geometry")
  12. ColumnLayout {
  13. spacing: StudioTheme.Values.transform3DSectionSpacing
  14. SectionLayout {
  15. PropertyLabel {
  16. text: qsTr("Extents")
  17. tooltip: qsTr("Sets the dimensions of a box contain the geometry.")
  18. }
  19. SecondColumnLayout {
  20. SpinBox {
  21. minimumValue: -9999999
  22. maximumValue: 9999999
  23. decimals: 2
  24. backendValue: backendValues.extents_x
  25. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  26. + StudioTheme.Values.actionIndicatorWidth
  27. }
  28. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  29. ControlLabel {
  30. text: "X"
  31. color: StudioTheme.Values.theme3DAxisXColor
  32. }
  33. ExpandingSpacer {}
  34. }
  35. PropertyLabel {}
  36. SecondColumnLayout {
  37. SpinBox {
  38. minimumValue: -9999999
  39. maximumValue: 9999999
  40. decimals: 2
  41. backendValue: backendValues.extents_y
  42. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  43. + StudioTheme.Values.actionIndicatorWidth
  44. }
  45. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  46. ControlLabel {
  47. text: "Y"
  48. color: StudioTheme.Values.theme3DAxisYColor
  49. }
  50. ExpandingSpacer {}
  51. }
  52. PropertyLabel {}
  53. SecondColumnLayout {
  54. SpinBox {
  55. minimumValue: -9999999
  56. maximumValue: 9999999
  57. decimals: 2
  58. backendValue: backendValues.extents_z
  59. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  60. + StudioTheme.Values.actionIndicatorWidth
  61. }
  62. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  63. ControlLabel {
  64. text: "Z"
  65. color: StudioTheme.Values.theme3DAxisZColor
  66. }
  67. ExpandingSpacer {}
  68. }
  69. }
  70. SectionLayout {
  71. PropertyLabel {
  72. text: qsTr("Source")
  73. tooltip: qsTr("Sets the location of an image file containing the heightmap data.")
  74. }
  75. SecondColumnLayout {
  76. UrlChooser {
  77. backendValue: backendValues.source
  78. }
  79. ExpandingSpacer {}
  80. }
  81. PropertyLabel {
  82. text: qsTr("Smooth Shading")
  83. tooltip: qsTr("Sets whether the height map is shown with smooth shading or with hard angles between the squares of the map.")
  84. }
  85. SecondColumnLayout {
  86. CheckBox {
  87. text: backendValues.smoothShading.valueToString
  88. backendValue: backendValues.smoothShading
  89. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  90. + StudioTheme.Values.actionIndicatorWidth
  91. }
  92. ExpandingSpacer {}
  93. }
  94. }
  95. }
  96. }
  97. }