PerspectiveCameraSection.qml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. Section {
  8. caption: qsTr("Perspective Camera")
  9. SectionLayout {
  10. PropertyLabel {
  11. text: qsTr("Clip Near")
  12. tooltip: qsTr("Sets the near value of the view frustum of the camera.")
  13. }
  14. SecondColumnLayout {
  15. SpinBox {
  16. minimumValue: -9999999
  17. maximumValue: 9999999
  18. decimals: 0
  19. backendValue: backendValues.clipNear
  20. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  21. + StudioTheme.Values.actionIndicatorWidth
  22. }
  23. ExpandingSpacer {}
  24. }
  25. PropertyLabel {
  26. text: qsTr("Clip Far")
  27. tooltip: qsTr("Sets the far value of the view frustum of the camera.")
  28. }
  29. SecondColumnLayout {
  30. SpinBox {
  31. minimumValue: -9999999
  32. maximumValue: 9999999
  33. decimals: 0
  34. stepSize: 100
  35. backendValue: backendValues.clipFar
  36. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  37. + StudioTheme.Values.actionIndicatorWidth
  38. }
  39. ExpandingSpacer {}
  40. }
  41. PropertyLabel {
  42. text: qsTr("Field of View")
  43. tooltip: qsTr("Sets the field of view of the camera in degrees.")
  44. }
  45. SecondColumnLayout {
  46. SpinBox {
  47. minimumValue: 1
  48. maximumValue: 180
  49. decimals: 2
  50. backendValue: backendValues.fieldOfView
  51. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  52. + StudioTheme.Values.actionIndicatorWidth
  53. }
  54. ExpandingSpacer {}
  55. }
  56. PropertyLabel {
  57. text: qsTr("FOV Orientation")
  58. tooltip: qsTr("Sets if the field of view property reflects the vertical or the horizontal field of view.")
  59. }
  60. SecondColumnLayout {
  61. ComboBox {
  62. scope: "PerspectiveCamera"
  63. model: ["Vertical", "Horizontal"]
  64. backendValue: backendValues.fieldOfViewOrientation
  65. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  66. + StudioTheme.Values.actionIndicatorWidth
  67. }
  68. ExpandingSpacer {}
  69. }
  70. }
  71. }