camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp
changeset 43 0e652f8f1fbd
parent 28 3075d9b614e6
child 45 24fd82631616
--- a/camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp	Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxesettingscontrolsymbian.cpp	Thu Jul 15 01:55:05 2010 +0300
@@ -19,6 +19,7 @@
 #include <ecamadvsettings.h>
 #include <ecamimageprocessing.h>
 #include <ecam/ecamconstants.h>
+#include <ecamfacetrackingcustomapi.h>
 
 #include <QString>
 #include <QVariant>
@@ -30,6 +31,12 @@
 #include "cxesettingsmappersymbian.h"
 #include "cxesettingscontrolsymbian.h"
 
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cxesettingscontrolsymbianTraces.h"
+#endif
+
+
 /*!
 * Constructor
 */
@@ -59,6 +66,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 +88,8 @@
         updateExposureModeSetting(newValue);
     } else if (settingId == CxeSettingIds::EV_COMPENSATION_VALUE) {
             updateExposureCompensationSetting(newValue);
+    } else if (settingId == CxeSettingIds::FACE_TRACKING) {
+            updateFaceTrackingSetting(newValue);
     } else {
         // do nothing
     }
@@ -93,23 +104,27 @@
 /*!
 * 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)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    OstTrace0(camerax_performance, CXESETTINGSCONTROL_SCENE_1, "msg: e_CX_SCENE_SETTINGS_TO_CAMERA 1");
+
     CX_DEBUG(("CxeSettingsControlSymbian <> new scene [%s]",
               scene[CxeSettingIds::SCENE_ID].value<QString>().toAscii().constData()));
 
     foreach (const QString& settingId, scene.keys()) {
         handleSettingValueChanged(settingId, scene[settingId]);
     }
+
+    OstTrace0(camerax_performance, CXESETTINGSCONTROL_SCENE_2, "msg: e_CX_SCENE_SETTINGS_TO_CAMERA 0");
     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 +151,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 +171,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 +197,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 +228,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 +252,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 +276,8 @@
 }
 
 /*!
-*
+* Update Exposure mode to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateExposureModeSetting(QVariant newValue)
 {
@@ -275,7 +296,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 +319,8 @@
 }
 
 /*!
-*
+* Update flash mode to the camera device
+* \param newValue A new value for the updated setting
 */
 void CxeSettingsControlSymbian::updateFlashSetting(QVariant newValue)
 {
@@ -315,4 +338,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