From: Mohammed Sameer Date: Sun, 18 Aug 2013 19:23:31 +0000 (+0300) Subject: Added NoFaceDetection quirk X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=84ebf0afd25ee836c1090ccd4502fe1049be2278;p=harmattan%2Fcameraplus Added NoFaceDetection quirk Enable face detection settings if NoFaceDetection quirk is not present --- diff --git a/declarative/quirks.h b/declarative/quirks.h index 2d43dff..af46f84 100644 --- a/declarative/quirks.h +++ b/declarative/quirks.h @@ -43,6 +43,7 @@ public: NoSceneModeChangeDuringRecording = QtCamQuirks::NoSceneModeChangeDuringRecording, NoRedEyeFlash = QtCamQuirks::NoRedEyeFlash, NoTouchFocus = QtCamQuirks::NoTouchFocus, + NoFaceDetection = QtCamQuirks::NoFaceDetection, } QuirkType; Q_INVOKABLE bool hasQuirk(const QuirkType& type); diff --git a/lib/qtcamquirks.h b/lib/qtcamquirks.h index 23fc8eb..5047868 100644 --- a/lib/qtcamquirks.h +++ b/lib/qtcamquirks.h @@ -42,6 +42,7 @@ public: NoSceneModeChangeDuringRecording = 0x10, NoRedEyeFlash = 0x20, NoTouchFocus = 0x40, + NoFaceDetection = 0x80, } QuirkType; Q_DECLARE_FLAGS(QuirkTypes, QuirkType); diff --git a/qml/ImageModeSettings.qml b/qml/ImageModeSettings.qml index 0cc8ff2..66bbf7d 100644 --- a/qml/ImageModeSettings.qml +++ b/qml/ImageModeSettings.qml @@ -53,6 +53,7 @@ Flickable { // loop for checked if we bind the checked property to the settings value. Component.onCompleted: checked = settings.faceDetectionEnabled onCheckedChanged: settings.faceDetectionEnabled = checked + visible: !camera.quirks.hasQuirk(Quirks.NoFaceDetection) } CameraSettings {