BufferSection.qml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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("Buffer")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Name")
  13. tooltip: qsTr("Sets the buffer name.")
  14. }
  15. SecondColumnLayout {
  16. LineEdit {
  17. backendValue: backendValues.name
  18. showTranslateCheckBox: false
  19. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  20. + StudioTheme.Values.actionIndicatorWidth
  21. width: implicitWidth
  22. }
  23. ExpandingSpacer {}
  24. }
  25. PropertyLabel {
  26. text: qsTr("Format")
  27. tooltip: qsTr("Sets the format of the buffer.")
  28. }
  29. SecondColumnLayout {
  30. ComboBox {
  31. scope: "Buffer"
  32. model: ["Unknown", "R8", "R16", "R16F", "R32I", "R32UI", "R32F", "RG8", "RGBA8", "RGB8", "SRGB8", "SRGB8A8", "RGB565", "RGBA16F", "RG16F", "RG32F", "RGB32F", "RGBA32F", "R11G11B10", "RGB9E5", "Depth16", "Depth24", "Depth32", "Depth24Stencil8"]
  33. backendValue: backendValues.format
  34. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  35. + StudioTheme.Values.actionIndicatorWidth
  36. }
  37. ExpandingSpacer {}
  38. }
  39. PropertyLabel {
  40. text: qsTr("Filter")
  41. tooltip: qsTr("Sets the texture filter for the buffer.")
  42. }
  43. SecondColumnLayout {
  44. ComboBox {
  45. scope: "Buffer"
  46. model: ["Unknown", "Nearest", "Linear"]
  47. backendValue: backendValues.textureFilterOperation
  48. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  49. + StudioTheme.Values.actionIndicatorWidth
  50. }
  51. ExpandingSpacer {}
  52. }
  53. PropertyLabel {
  54. text: qsTr("Coordinate Operation")
  55. tooltip: qsTr("Sets the texture coordinate operation for the buffer.")
  56. }
  57. SecondColumnLayout {
  58. ComboBox {
  59. scope: "Buffer"
  60. model: ["Unknown", "ClampToEdge", "MirroredRepeat", "Repeat"]
  61. backendValue: backendValues.textureCoordOperation
  62. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  63. + StudioTheme.Values.actionIndicatorWidth
  64. }
  65. ExpandingSpacer {}
  66. }
  67. PropertyLabel {
  68. text: qsTr("Allocation Flags")
  69. tooltip: qsTr("Sets the allocation flags for the buffer.")
  70. }
  71. SecondColumnLayout {
  72. ComboBox {
  73. scope: "Buffer"
  74. model: ["None", "SceneLifetime"]
  75. backendValue: backendValues.bufferFlags
  76. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  77. + StudioTheme.Values.actionIndicatorWidth
  78. }
  79. ExpandingSpacer {}
  80. }
  81. PropertyLabel {
  82. text: qsTr("Size Multiplier")
  83. tooltip: qsTr("Sets the size multiplier for the buffer.")
  84. }
  85. SecondColumnLayout {
  86. SpinBox {
  87. maximumValue: 10000
  88. minimumValue: 0
  89. decimals: 2
  90. realDragRange: 30
  91. backendValue: backendValues.sizeMultiplier
  92. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  93. + StudioTheme.Values.actionIndicatorWidth
  94. }
  95. ExpandingSpacer {}
  96. }
  97. }
  98. }