camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp
changeset 28 3075d9b614e6
parent 19 d9aefe59d544
child 40 2922f70fca82
child 43 0e652f8f1fbd
--- a/camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp	Fri Apr 16 14:51:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp	Thu May 13 21:30:19 2010 +0300
@@ -178,7 +178,7 @@
 
     // If this is one of scene settings,
     // store it as modification of current scene.
-    CxeError::Id err = setSceneSettingValue(key, newValue.toInt());
+    CxeError::Id err = setSceneSettingValue(key, newValue);
     CX_DEBUG(( "status storing to scene data: %d", err));
 
     // If not scene specific, store the setting value.
@@ -240,14 +240,13 @@
 
     CxeError::Id err = CxeError::None;
 
-    mCurrentImgScene.clear();
-
     // load the scene setting default values for the new scene id = "newScene"
     CxeScene sceneSettings;
     err = imageScene(newScene, sceneSettings);
 
     // create of copy of the new scene as we use it for accessing the scene settings later.
     if (CxeError::None == err) {
+        mCurrentImgScene.clear();
         loadSceneData(mCurrentImgScene, sceneSettings);
     }
 
@@ -267,14 +266,13 @@
 
     CxeError::Id err = CxeError::None;
 
-    mCurrentVidScene.clear();
-
     // load the scene setting default values for the new scene id = "newScene"
     CxeScene sceneSettings;
     err = videoScene(newScene, sceneSettings);
 
     // create of copy of the new scene as we use it for accessing the scene settings later.
     if (CxeError::None == err) {
+        mCurrentVidScene.clear();
         loadSceneData(mCurrentVidScene, sceneSettings);
     }
 
@@ -380,7 +378,7 @@
 /*
 * set scene setting value associated with the key
 */
-CxeError::Id CxeSettingsModelImp::setSceneSettingValue(const QString &key, int newValue)
+CxeError::Id CxeSettingsModelImp::setSceneSettingValue(const QString &key, QVariant newValue)
 {
     CX_DEBUG_ENTER_FUNCTION();
 
@@ -416,7 +414,7 @@
     runtimeKeys.append(CxeRuntimeKeys::PRIMARY_CAMERA_CAPTURE_KEYS);
     runtimeKeys.append(CxeRuntimeKeys::PRIMARY_CAMERA_AUTOFOCUS_KEYS);
     runtimeKeys.append(CxeRuntimeKeys::SECONDARY_CAMERA_CAPTURE_KEYS);
-    runtimeKeys.append(CxeRuntimeKeys::CONTRAST_ITEMS);
+    runtimeKeys.append(CxeRuntimeKeys::FREE_MEMORY_LEVELS);
     runtimeKeys.append(CxeRuntimeKeys::STILL_MAX_ZOOM_LIMITS);
     runtimeKeys.append(CxeRuntimeKeys::VIDEO_MAX_ZOOM_LIMITS);
 
@@ -466,7 +464,7 @@
     vidSceneLowLight.insert(CxeSettingIds::SCENE_ID, CxeSettingIds::VIDEO_SCENE_LOWLIGHT);
     vidSceneLowLight.insert(CxeSettingIds::FOCAL_RANGE, CxeAutoFocusControl::Hyperfocal);
     vidSceneLowLight.insert(CxeSettingIds::WHITE_BALANCE, WhitebalanceAutomatic);
-    vidSceneLowLight.insert(CxeSettingIds::EXPOSURE_MODE, ExposureNight);
+    vidSceneLowLight.insert(CxeSettingIds::EXPOSURE_MODE, ExposureAuto);
     vidSceneLowLight.insert(CxeSettingIds::COLOR_TONE, ColortoneNormal);
     vidSceneLowLight.insert(CxeSettingIds::CONTRAST, 0);
     vidSceneLowLight.insert(CxeSettingIds::FRAME_RATE, 15); //fps