-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcamera.qml
More file actions
67 lines (53 loc) · 1.56 KB
/
Copy pathcamera.qml
File metadata and controls
67 lines (53 loc) · 1.56 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
// SPDX-FileCopyrightText: 2013 - 2024 Jolla Ltd.
// SPDX-FileCopyrightText: 2020 - 2021 Open Mobile Platform LLC.
// SPDX-FileCopyrightText: 2025 Jolla Mobile Ltd
//
// SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.1
import QtMultimedia 5.0
import Amber.QrFilter 1.0
import Sailfish.Silica 1.0
import com.jolla.camera 1.0
import "pages"
ApplicationWindow {
id: window
property var captureModel: null
property bool galleryActive
property bool galleryVisible
property int galleryIndex
allowedOrientations: defaultAllowedOrientations
_defaultPageOrientations: Orientation.All
_defaultLabelFormat: Text.PlainText
cover: Qt.resolvedUrl("cover/CameraCover.qml")
initialPage: Component {
MainCameraPage {
viewfinder: videoOutput
}
}
// viewfinder background
Rectangle {
parent: window
anchors.fill: parent
z: -1
color: "black"
visible: (pageStack.depth < 2 && !pageStack.busy) || !galleryActive
}
VideoOutput {
id: videoOutput
z: -1
width: window.width
height: window.height
Behavior on y {
enabled: !galleryVisible
NumberAnimation { duration: 150; easing.type: Easing.InOutQuad }
}
filters: [ qrFilter ]
}
QrFilter {
id: qrFilter
active: Settings.global.qrFilterEnabled
&& Settings.global.captureMode === "image"
&& Settings.global.position === Camera.BackFace
onActiveChanged: qrFilter.clearResult()
}
}