23
23
property bool isVideo
24
24
property string mediaPath
25
property Snapshot snapshot
27
function confirmExport(path) {
28
viewFinder.visible = false;
29
viewFinderOverlay.visible = false;
31
if (!isVideo) snapshot.visible = true;
36
viewFinder.visible = true;
37
viewFinderOverlay.visible = true;
39
snapshot.visible = false;
25
property bool waitingForPictureCapture: false
27
signal hideRequested()
28
signal showRequested()
29
property ViewFinderGeometry viewFinderGeometry
33
// For videos show immediately without waiting for the preview to load,
34
// since we will show a progress indicator instead of the preview
35
onMediaPathChanged: if (mediaPath && isVideo) showRequested()
37
function photoCaptureStarted() {
38
controls.item.lockPictureOrientation()
39
waitingForPictureCapture = true
46
44
anchors.fill: parent
48
46
sourceComponent: Component {
48
function lockPictureOrientation() { pictureReview.lockOrientation() }
52
52
anchors.fill: parent
53
53
bottomMargin: buttons.height
54
videoPath: isVideo ? mediaPath : ""
62
geometry: viewFinderGeometry
63
source: !isVideo ? mediaPath : ""
65
// Show export confirmation only when the snapshot is loaded to prevent the
66
// screen being black while the image loads
69
viewFinderExportConfirmation.showRequested()
70
waitingForPictureCapture = false
60
77
anchors.bottom: parent.bottom