PhysicsMaterialSection.qml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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("Physics Material")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: "Static Friction"
  13. tooltip: "The friction coefficient of the material when it is not moving."
  14. }
  15. SecondColumnLayout {
  16. SpinBox {
  17. minimumValue: 0
  18. maximumValue: 9999999
  19. decimals: 2
  20. stepSize: 0.01
  21. backendValue: backendValues.staticFriction
  22. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  23. + StudioTheme.Values.actionIndicatorWidth
  24. }
  25. ExpandingSpacer {}
  26. }
  27. PropertyLabel {
  28. text: "Dynamic Friction"
  29. tooltip: "The friction coefficient of the material when it is moving."
  30. }
  31. SecondColumnLayout {
  32. SpinBox {
  33. minimumValue: 0
  34. maximumValue: 9999999
  35. decimals: 2
  36. stepSize: 0.01
  37. backendValue: backendValues.dynamicFriction
  38. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  39. + StudioTheme.Values.actionIndicatorWidth
  40. }
  41. ExpandingSpacer {}
  42. }
  43. PropertyLabel {
  44. text: "Restitution"
  45. tooltip: "The coefficient of restitution of the material."
  46. }
  47. SecondColumnLayout {
  48. SpinBox {
  49. minimumValue: 0
  50. maximumValue: 1
  51. decimals: 2
  52. stepSize: 0.01
  53. sliderIndicatorVisible: true
  54. backendValue: backendValues.restitution
  55. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  56. + StudioTheme.Values.actionIndicatorWidth
  57. }
  58. ExpandingSpacer {}
  59. }
  60. }
  61. }