blob: 2438eb46976f8875d1400fbd7cec80e8b2631e81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import VirtualAssistant.Constants
Pane {
id: root
topPadding: 10
leftPadding: 40
rightPadding: 40
bottomPadding: 40
required property var camera
property alias cameraControllerEnabled: enableCamera.checked
property alias cameraFov: fov.value
property alias skyboxRotation: skyboxRot.value
ColumnLayout {
anchors.fill: parent
spacing: 10
Label {
text: qsTr("Scene settings")
font.pixelSize: 24
Layout.alignment: Qt.AlignHCenter
}
CheckBox {
id: enableCamera
Layout.alignment: Qt.AlignHCenter
text: qsTr("Enable Camera Controller")
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 5
Label {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Camera Fov: ") + fov.value
font.pixelSize: 14
}
Slider {
id: fov
from: 35
to: 125
value: 80
stepSize: 1
}
}
ColumnLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 5
Label {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Skybox rotation: ") + skyboxRot.value
font.pixelSize: 14
}
Slider {
id: skyboxRot
from: 0
to: 360
value: 180
stepSize: 1
}
}
ColumnLayout {
spacing: 4
Layout.alignment: Qt.AlignHCenter
Label {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Camera position: ")
}
Row {
Layout.alignment: Qt.AlignHCenter
spacing: 5
Label {
text: "x: " + root.camera.x.toFixed(2)
}
Label {
text: "y: " + root.camera.y.toFixed(2)
}
Label {
text: "z: " + root.camera.z.toFixed(2)
}
}
}
Button {
Layout.alignment: Qt.AlignHCenter
text: qsTr("Reset default settings")
onClicked: {
fov.value = Constants.defaultFov;
enableCamera.checked = false;
skyboxRot.value = Constants.defaultRotation;
root.camera.position = Constants.defaultCameraPosition
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
|