Added NoTouchFocus quirk
authorMohammed Sameer <msameer@foolab.org>
Sun, 18 Aug 2013 19:18:30 +0000 (22:18 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 18 Aug 2013 19:18:30 +0000 (22:18 +0300)
Enable touch focus only if device doesn't have NoTouchFocus quirk

declarative/quirks.h
lib/qtcamquirks.h
qml/FocusReticle.qml

index 2b1c641..2d43dff 100644 (file)
@@ -42,6 +42,7 @@ public:
     NoAutoFocus = QtCamQuirks::NoAutoFocus,
     NoSceneModeChangeDuringRecording = QtCamQuirks::NoSceneModeChangeDuringRecording,
     NoRedEyeFlash = QtCamQuirks::NoRedEyeFlash,
+    NoTouchFocus = QtCamQuirks::NoTouchFocus,
   } QuirkType;
 
   Q_INVOKABLE bool hasQuirk(const QuirkType& type);
index c22ff10..23fc8eb 100644 (file)
@@ -41,6 +41,7 @@ public:
     NoAutoFocus = 0x8,
     NoSceneModeChangeDuringRecording = 0x10,
     NoRedEyeFlash = 0x20,
+    NoTouchFocus = 0x40,
   } QuirkType;
 
   Q_DECLARE_FLAGS(QuirkTypes, QuirkType);
index 39fba6b..f4f4c8c 100644 (file)
@@ -59,6 +59,8 @@ MouseArea {
     property variant allRoiRects
     property bool roiMode: allRoiRects != null && allRoiRects.length > 0 && !touchMode && !pressed
 
+    enabled: !cam.quirks.hasQuirk(Quirks.NoTouchFocus)
+
     property variant __initialPos
     onPressed: {