LodManagerSection.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // Copyright (C) 2023 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. Section {
  8. caption: qsTr("Lod Manager")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Camera")
  13. tooltip: qsTr("Specifies the camera from which the distance to the child nodes is calculated.")
  14. }
  15. SecondColumnLayout {
  16. ItemFilterComboBox {
  17. typeFilter: "QtQuick3D.Camera"
  18. backendValue: backendValues.camera
  19. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  20. + StudioTheme.Values.actionIndicatorWidth
  21. }
  22. ExpandingSpacer {}
  23. }
  24. PropertyLabel {
  25. text: qsTr("Fade Distance")
  26. tooltip: qsTr("Specifies the distance at which the cross-fade between the detail levels starts.")
  27. }
  28. SecondColumnLayout {
  29. SpinBox {
  30. minimumValue: 0
  31. maximumValue: 999999
  32. decimals: 2
  33. stepSize: 0.1
  34. backendValue: backendValues.fadeDistance
  35. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  36. + StudioTheme.Values.actionIndicatorWidth
  37. }
  38. ExpandingSpacer {}
  39. }
  40. PropertyLabel {
  41. text: qsTr("Distances")
  42. tooltip: qsTr("Specifies the thresholds when the detail level changes. The first number is the distance when the first node changes to the second one, etc.")
  43. }
  44. SecondColumnLayout {
  45. ActionIndicator {
  46. icon.color: extFuncLogic.color
  47. icon.text: extFuncLogic.glyph
  48. onClicked: extFuncLogic.show()
  49. forceVisible: extFuncLogic.menuVisible
  50. ExtendedFunctionLogic {
  51. id: extFuncLogic
  52. backendValue: backendValues.distances
  53. }
  54. }
  55. // Placeholder until we can do list of value types: QDS-9090
  56. Label {
  57. text: qsTr("Currently only editable in QML.")
  58. Layout.fillWidth: true
  59. Layout.preferredWidth: StudioTheme.Values.singleControlColumnWidth
  60. Layout.minimumWidth: StudioTheme.Values.singleControlColumnWidth
  61. Layout.maximumWidth: StudioTheme.Values.singleControlColumnWidth
  62. }
  63. ExpandingSpacer {}
  64. }
  65. }
  66. }