camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp
changeset 29 699651f2666f
parent 24 2094593137f5
child 32 5c1e3c6aa4ef
--- a/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Fri May 14 15:40:46 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Thu May 27 12:43:29 2010 +0300
@@ -748,6 +748,8 @@
         return;
     }
 
+    hideControls();
+
     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
 
@@ -856,6 +858,8 @@
          return;
     }
 
+    hideControls();
+
     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
 
@@ -1138,4 +1142,41 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
+/*!
+* Update the scene mode icon.
+* @param sceneId The new scene id.
+*/
+void CxuiPrecaptureView::updateSceneIcon(const QString& sceneId)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    CX_DEBUG(("CxuiPrecaptureView - scene: %s", sceneId.toAscii().constData()));
+
+    // No need to update icon, if widgets are not even loaded yet.
+    // We'll update the icon once the widgets are loaded.
+    if (mWidgetsLoaded) {
+
+        QString key;
+        QString iconObjectName;
+        if (mEngine->mode() == Cxe::VideoMode) {
+            key = CxeSettingIds::VIDEO_SCENE;
+            iconObjectName = VIDEO_PRE_CAPTURE_SCENE_MODE_ACTION;
+        } else {
+            key = CxeSettingIds::IMAGE_SCENE;
+            iconObjectName = STILL_PRE_CAPTURE_SCENE_MODE_ACTION;
+        }
+
+        QString icon = getSettingItemIcon(key, sceneId);
+        CX_DEBUG(("CxuiPrecaptureView - icon: %s", icon.toAscii().constData()));
+
+        if (mDocumentLoader) {
+            QObject *obj = mDocumentLoader->findObject(iconObjectName);
+            CX_DEBUG_ASSERT(obj);
+            qobject_cast<HbAction *>(obj)->setIcon(HbIcon(icon));
+        }
+    } else {
+        CX_DEBUG(("CxuiPrecaptureView - widgets not loaded yet, ignored!"));
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
 // end of file