camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp
changeset 40 2922f70fca82
parent 39 c5025ea871a1
child 41 67457b2ffb33
equal deleted inserted replaced
39:c5025ea871a1 40:2922f70fca82
    49 * Constructor
    49 * Constructor
    50 */
    50 */
    51 CxuiSceneModeView::CxuiSceneModeView(QGraphicsItem *parent) :
    51 CxuiSceneModeView::CxuiSceneModeView(QGraphicsItem *parent) :
    52     CxuiView(parent),
    52     CxuiView(parent),
    53     mSettingsInfo(NULL),
    53     mSettingsInfo(NULL),
    54     mScenesBackground(NULL)
    54     mScenesBackground(NULL),
       
    55     mScenesHeading(NULL)
    55 {
    56 {
    56     CX_DEBUG_IN_FUNCTION();
    57     CX_DEBUG_IN_FUNCTION();
    57 }
    58 }
    58 
    59 
    59 /*!
    60 /*!
   102 
   103 
   103     QGraphicsWidget *widget = NULL;
   104     QGraphicsWidget *widget = NULL;
   104 
   105 
   105     widget = mDocumentLoader->findWidget(SCENE_VIEW_CONTAINER);
   106     widget = mDocumentLoader->findWidget(SCENE_VIEW_CONTAINER);
   106     mScenesContainer = qobject_cast<HbWidget *> (widget);
   107     mScenesContainer = qobject_cast<HbWidget *> (widget);
       
   108 
       
   109     mScenesHeading = qobject_cast<HbLabel *>(
       
   110         mDocumentLoader->findWidget(SCENE_VIEW_HEADING_WIDGET));
       
   111     CX_ASSERT_ALWAYS(mScenesHeading);
   107 
   112 
   108     //Now let's retreive the pointer to icon widget
   113     //Now let's retreive the pointer to icon widget
   109     widget = mDocumentLoader->findWidget(SCENE_VIEW_BG_IMAGE);
   114     widget = mDocumentLoader->findWidget(SCENE_VIEW_BG_IMAGE);
   110     mScenesBackground = qobject_cast<HbLabel *> (widget);
   115     mScenesBackground = qobject_cast<HbLabel *> (widget);
   111 
   116 
   154     } else {
   159     } else {
   155         mSettingsInfo->getSettingsContent(CxeSettingIds::VIDEO_SCENE, data);
   160         mSettingsInfo->getSettingsContent(CxeSettingIds::VIDEO_SCENE, data);
   156     }
   161     }
   157     mSettingPairList = data.mSettingPairList;
   162     mSettingPairList = data.mSettingPairList;
   158     mScenesList->init(&data);
   163     mScenesList->init(&data);
       
   164 
       
   165     if (mScenesHeading) {
       
   166         mScenesHeading->setPlainText(data.mHeading);
       
   167     }
   159 
   168 
   160     if (mScenesBackground) {
   169     if (mScenesBackground) {
   161         QString sceneId;
   170         QString sceneId;
   162         mEngine->settings().get(data.mSettingId, sceneId);
   171         mEngine->settings().get(data.mSettingId, sceneId);
   163         mScenesBackground->setIcon(HbIcon(backgroundForScene(sceneId)));
   172         mScenesBackground->setIcon(HbIcon(backgroundForScene(sceneId)));
   309 void CxuiSceneModeView::closeView()
   318 void CxuiSceneModeView::closeView()
   310 {
   319 {
   311     CX_DEBUG_ENTER_FUNCTION();
   320     CX_DEBUG_ENTER_FUNCTION();
   312     mScenesList->handleClose();
   321     mScenesList->handleClose();
   313     mScenesBackground->setIcon(HbIcon());
   322     mScenesBackground->setIcon(HbIcon());
       
   323     mScenesHeading = NULL;
   314     // Make sure engine prepares for new image/video if necessary
   324     // Make sure engine prepares for new image/video if necessary
   315     mEngine->initMode(mEngine->mode());
   325     mEngine->initMode(mEngine->mode());
   316     emit viewCloseEvent();
   326     emit viewCloseEvent();
   317     CX_DEBUG_EXIT_FUNCTION();
   327     CX_DEBUG_EXIT_FUNCTION();
   318 }
   328 }