camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp
changeset 38 0f0b4c1d7744
parent 28 3075d9b614e6
child 39 c5025ea871a1
--- a/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Thu May 13 21:30:19 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Thu Jul 15 01:44:30 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