SceneMetadataView.qml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Copyright (C) 2025 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
  3. import QtQuick
  4. import QtQuick.Controls
  5. import QtQuick.Layouts
  6. import LightmapFile 1.0
  7. Item {
  8. id: root
  9. implicitWidth: 360
  10. implicitHeight: 420
  11. ScrollView {
  12. anchors.fill: parent
  13. contentWidth: availableWidth
  14. ColumnLayout {
  15. anchors.fill: parent
  16. spacing: 6
  17. Label {
  18. text: `Baked with Qt version: ${LightmapFile.qtVersion || "—"}`
  19. font.bold: true
  20. Layout.fillWidth: true
  21. }
  22. Label {
  23. text: LightmapFile.bakeStart
  24. visible: text.length > 0
  25. Layout.fillWidth: true
  26. wrapMode: Text.Wrap
  27. Component.onCompleted: if (text.length)
  28. text = "Bake initiated at:\n" + text
  29. }
  30. Label {
  31. text: LightmapFile.bakeDuration
  32. visible: text.length > 0
  33. wrapMode: Text.Wrap
  34. Layout.fillWidth: true
  35. Component.onCompleted: if (text.length)
  36. text = "Bake took:\n" + text
  37. }
  38. Label {
  39. text: "Options used:"
  40. Layout.fillWidth: true
  41. }
  42. ColumnLayout {
  43. id: optionsColumn
  44. Layout.fillWidth: true
  45. spacing: 4
  46. Repeater {
  47. model: LightmapFile.options
  48. delegate: RowLayout {
  49. width: optionsColumn.width
  50. spacing: 8
  51. Label {
  52. text: (modelData.key ?? "—") + ":"
  53. font.bold: true
  54. Layout.preferredWidth: 150
  55. Layout.alignment: Qt.AlignRight | Qt.AlignTop
  56. elide: Text.ElideRight
  57. }
  58. Label {
  59. text: modelData.value !== undefined ? String(
  60. modelData.value) : "—"
  61. Layout.fillWidth: true
  62. Layout.alignment: Qt.AlignLeft | Qt.AlignTop
  63. elide: Text.ElideRight
  64. }
  65. }
  66. }
  67. }
  68. Item {
  69. width: 1
  70. height: 6
  71. }
  72. }
  73. }
  74. }