-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSnapshotMenuForm.ui.qml
More file actions
100 lines (90 loc) · 2.44 KB
/
SnapshotMenuForm.ui.qml
File metadata and controls
100 lines (90 loc) · 2.44 KB
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
import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
import "content"
Item {
id: element
width: 640
height: 480
property alias failureText: failureText
property alias snapshotSettings: snapshotSettings
property alias exitButton: exitButton
property alias cameraRenderer: cameraRenderer
property alias shutterButton: shutterButton
property alias countdown: shutterButton.countDownTime
property bool hideSnapshotSettingsPane: false
property var libcamera
CameraRenderer {
id: cameraRenderer
anchors.fill: parent
libcamera: element.libcamera
Text {
id: failureText
x: 308
y: 233
text: qsTr("Please Try Again")
font.bold: true
visible: false
font.family: "DejaVu Serif"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 42
}
}
ShutterButton {
id: shutterButton
width: 150
height: 150
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
}
NavigationButton {
id: exitButton
text: qsTr("Cancel")
visible: false
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: parent.top
anchors.topMargin: 30
forward: false
}
SnapshotSettings {
id: snapshotSettings
opacity: 0.0
visible: opacity === 0.0 ? false : true
anchors.top: parent.top
anchors.topMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
}
states: [
State {
name: "deactivated"
PropertyChanges {
target: cameraRenderer
state: "idle"
}
},
State {
name: "activated"
PropertyChanges {
target: snapshotSettings
opacity: hideSnapshotSettingsPane ? 0.0 : 1.0
}
PropertyChanges {
target: exitButton
visible: true
}
PropertyChanges {
target: cameraRenderer
state: "preview"
}
},
State {
name: "snapshot"
}
]
}