Use zoom keys to capture still images
authorMohammed Sameer <msameer@foolab.org>
Mon, 11 Mar 2013 22:55:41 +0000 (00:55 +0200)
committerMohammed Sameer <msameer@foolab.org>
Mon, 11 Mar 2013 22:55:41 +0000 (00:55 +0200)
qml/ImagePage.qml

index 632e6d9..43743be 100644 (file)
@@ -90,15 +90,21 @@ CameraPage {
                                 cam.autoFocus.stopAutoFocus();
                         }
                 }
+        }
 
-                Timer {
-                        interval: 200
-                        running: capture.pressed
-                        repeat: false
-                        onTriggered: {
-                                if (cam.autoFocus.cafStatus != AutoFocus.Success) {
-                                        cam.autoFocus.startAutoFocus();
-                                }
+        ZoomCaptureButton {
+                id: zoomCapture
+                page: page
+                onReleased: page.captureImage();
+        }
+
+        Timer {
+                interval: 200
+                running: capture.pressed || zoomCapture.zoomPressed
+                repeat: false
+                onTriggered: {
+                        if (cam.autoFocus.cafStatus != AutoFocus.Success) {
+                                cam.autoFocus.startAutoFocus();
                         }
                 }
         }