camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp
changeset 38 0f0b4c1d7744
parent 28 3075d9b614e6
child 39 c5025ea871a1
equal deleted inserted replaced
28:3075d9b614e6 38:0f0b4c1d7744
   746 
   746 
   747     if (!action) {
   747     if (!action) {
   748         return;
   748         return;
   749     }
   749     }
   750 
   750 
       
   751     hideControls();
       
   752 
   751     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
   753     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
   752     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
   754     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
   753 
   755 
   754     RadioButtonListParams data;
   756     RadioButtonListParams data;
   755 
   757 
   853 
   855 
   854     QObject *action = sender();
   856     QObject *action = sender();
   855     if (!action) {
   857     if (!action) {
   856          return;
   858          return;
   857     }
   859     }
       
   860 
       
   861     hideControls();
   858 
   862 
   859     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
   863     QString key = action->property(PROPERTY_KEY_SETTING_ID).toString();
   860     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
   864     CX_DEBUG(("settingsKey=%s", key.toAscii().constData()));
   861 
   865 
   862     SliderParams data;
   866     SliderParams data;
  1136     Q_UNUSED(key);
  1140     Q_UNUSED(key);
  1137     Q_UNUSED(newValue);
  1141     Q_UNUSED(newValue);
  1138     CX_DEBUG_EXIT_FUNCTION();
  1142     CX_DEBUG_EXIT_FUNCTION();
  1139 }
  1143 }
  1140 
  1144 
       
  1145 /*!
       
  1146 * Update the scene mode icon.
       
  1147 * @param sceneId The new scene id.
       
  1148 */
       
  1149 void CxuiPrecaptureView::updateSceneIcon(const QString& sceneId)
       
  1150 {
       
  1151     CX_DEBUG_ENTER_FUNCTION();
       
  1152     CX_DEBUG(("CxuiPrecaptureView - scene: %s", sceneId.toAscii().constData()));
       
  1153 
       
  1154     // No need to update icon, if widgets are not even loaded yet.
       
  1155     // We'll update the icon once the widgets are loaded.
       
  1156     if (mWidgetsLoaded) {
       
  1157 
       
  1158         QString key;
       
  1159         QString iconObjectName;
       
  1160         if (mEngine->mode() == Cxe::VideoMode) {
       
  1161             key = CxeSettingIds::VIDEO_SCENE;
       
  1162             iconObjectName = VIDEO_PRE_CAPTURE_SCENE_MODE_ACTION;
       
  1163         } else {
       
  1164             key = CxeSettingIds::IMAGE_SCENE;
       
  1165             iconObjectName = STILL_PRE_CAPTURE_SCENE_MODE_ACTION;
       
  1166         }
       
  1167 
       
  1168         QString icon = getSettingItemIcon(key, sceneId);
       
  1169         CX_DEBUG(("CxuiPrecaptureView - icon: %s", icon.toAscii().constData()));
       
  1170 
       
  1171         if (mDocumentLoader) {
       
  1172             QObject *obj = mDocumentLoader->findObject(iconObjectName);
       
  1173             CX_DEBUG_ASSERT(obj);
       
  1174             qobject_cast<HbAction *>(obj)->setIcon(HbIcon(icon));
       
  1175         }
       
  1176     } else {
       
  1177         CX_DEBUG(("CxuiPrecaptureView - widgets not loaded yet, ignored!"));
       
  1178     }
       
  1179     CX_DEBUG_EXIT_FUNCTION();
       
  1180 }
       
  1181 
  1141 // end of file
  1182 // end of file