Rename ZoomCaptureCancel.qml to CaptureCancel.qml
authorMohammed Sameer <msameer@foolab.org>
Wed, 21 Aug 2013 20:06:18 +0000 (23:06 +0300)
committerMohammed Sameer <msameer@foolab.org>
Wed, 21 Aug 2013 20:06:18 +0000 (23:06 +0300)
API cleaned up a bit to make it a bit more generic

qml/CaptureCancel.qml [moved from qml/ZoomCaptureCancel.qml with 89% similarity]
qml/ImageOverlay.qml
qml/VideoOverlay.qml
qml/qml.qrc

similarity index 89%
rename from qml/ZoomCaptureCancel.qml
rename to qml/CaptureCancel.qml
index b17d1a5..cf13899 100644 (file)
@@ -24,18 +24,9 @@ import QtQuick 2.0
 import CameraPlus 1.0
 
 MouseArea {
-    id: zoomCancel
-    property Item zoomCapture
-
     signal canceled
 
     z: 100
-    enabled: zoomCapture.zoomPressed
-
-    onPressed: {
-        zoomCancel.zoomCapture.zoomPressed = false
-        zoomCancel.canceled()
-    }
 
     Rectangle {
         anchors.top: parent.top
index 77fb6b5..1a73e78 100644 (file)
@@ -104,10 +104,11 @@ Item {
         onReleased: parent.captureImage()
     }
 
-    ZoomCaptureCancel {
+    CaptureCancel {
         anchors.fill: parent
-        zoomCapture: zoomCapture
-        onCanceled: {
+        enabled: zoomCapture.zoomPressed
+        onPressed: {
+            zoomCapture.zoomPressed = false
             if (!autoFocusTimer.running) {
                 stopAutoFocus()
             }
index 24d44aa..df63c91 100644 (file)
@@ -69,9 +69,10 @@ Item {
         onReleased: overlay.toggleRecording()
     }
 
-    ZoomCaptureCancel {
+    CaptureCancel {
         anchors.fill: parent
-        zoomCapture: zoomCapture
+        enabled: zoomCapture.zoomPressed
+        onPressed: zoomCapture.zoomPressed = false
     }
 
     CaptureButton {
index b207a57..99858db 100644 (file)
@@ -45,7 +45,7 @@
        <file>VideoTorchButton.qml</file>
        <file>VideoWhiteBalanceButton.qml</file>
        <file>ZoomCaptureButton.qml</file>
-       <file>ZoomCaptureCancel.qml</file>
+       <file>CaptureCancel.qml</file>
        <file>ZoomSlider.qml</file>
     </qresource>
 </RCC>