camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp
changeset 36 b12f3922a74f
parent 21 fa6d9f75d6a6
child 42 feebad15db8c
child 48 42ba2d16bf40
--- a/camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp	Fri Jun 11 13:26:48 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp	Wed Jun 23 17:59:54 2010 +0300
@@ -19,6 +19,7 @@
 #include <ecamadvsettings.h>
 #include <ecamimageprocessing.h>
 #include <ecam/ecamconstants.h>
+#include <ecamfacetrackingcustomapi.h>
 
 #include <QString>
 #include <QVariant>
@@ -59,6 +60,8 @@
 /*!
 * Handle new setting value.
 * New value is set to camera.
+* \param settingId The id of the updated setting
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::handleSettingValueChanged(const QString& settingId, QVariant newValue)
 {
@@ -79,6 +82,8 @@
         updateExposureModeSetting(newValue);
     } else if (settingId == CxeSettingIds::EV_COMPENSATION_VALUE) {
             updateExposureCompensationSetting(newValue);
+    } else if (settingId == CxeSettingIds::FACE_TRACKING) {
+            updateFaceTrackingSetting(newValue);
     } else {
         // do nothing
     }
@@ -93,7 +98,7 @@
 /*!
 * Handle new scene being set.
 * Scene settings are checked and new values are set to camera.
-* @param scene New scene containing scene specific settings.
+* \param scene New scene containing scene specific settings.
 */
 void CxeSettingsControlSymbian::handleSceneChanged(CxeScene& scene)
 {
@@ -104,12 +109,13 @@
     foreach (const QString& settingId, scene.keys()) {
         handleSettingValueChanged(settingId, scene[settingId]);
     }
+
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-
 /*!
-*
+* Update color tone setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateColorToneSetting(QVariant newValue)
 {
@@ -136,7 +142,8 @@
 }
 
 /*!
-*
+* Update white balance setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateWhiteBalanceSetting(QVariant newValue)
 {
@@ -155,7 +162,8 @@
 }
 
 /*!
-*
+* Update light sensitivity (ISO) setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateLightSensitivitySetting(QVariant newValue)
 {
@@ -180,7 +188,8 @@
 }
 
 /*!
-*
+* Update sharpness setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateSharpnessSetting(QVariant newValue)
 {
@@ -210,7 +219,8 @@
 }
 
 /*!
-*
+* Update contrast setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateContrastSetting(QVariant newValue)
 {
@@ -233,7 +243,8 @@
 }
 
 /*!
-*
+* Update brightness setting value to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateBrightnessSetting(QVariant newValue)
 {
@@ -256,7 +267,8 @@
 }
 
 /*!
-*
+* Update Exposure mode to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateExposureModeSetting(QVariant newValue)
 {
@@ -275,7 +287,8 @@
 }
 
 /*!
-*
+* Update Exposure Compensation mode to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateExposureCompensationSetting(QVariant newValue)
 {
@@ -297,7 +310,8 @@
 }
 
 /*!
-*
+* Update flash mode to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateFlashSetting(QVariant newValue)
 {
@@ -315,4 +329,18 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
+/*!
+* Update face tracking mode to the camera device
+* \param newValue A new value for the updated setting
+*/
+void CxeSettingsControlSymbian::updateFaceTrackingSetting(QVariant newValue)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    MCameraFaceTracking *faceTracking = mCameraDevice.faceTracking();
+    if(faceTracking) {
+        TRAP_IGNORE(faceTracking->SetFaceTrackingL(newValue.toInt()));
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
 // end of file