camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp
changeset 28 3075d9b614e6
parent 19 d9aefe59d544
child 38 0f0b4c1d7744
child 43 0e652f8f1fbd
equal deleted inserted replaced
19:d9aefe59d544 28:3075d9b614e6
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    28 #include <hblistwidgetitem.h>
    28 #include <hblistwidgetitem.h>
    29 #include <hbtoolbarextension.h>
    29 #include <hbtoolbarextension.h>
    30 #include <hbtoolbutton.h>
    30 #include <hbtoolbutton.h>
    31 #include <hbdeviceprofile.h> // HbDeviceProfile
    31 #include <hbdeviceprofile.h> // HbDeviceProfile
    32 #include <hbmenu.h>
    32 #include <hbmenu.h>
       
    33 #include <hbicon.h>
    33 
    34 
    34 #include "cxuiselftimer.h"
    35 #include "cxuiselftimer.h"
    35 #include "cxeengine.h"
    36 #include "cxeengine.h"
    36 #include "cxeviewfindercontrol.h"
    37 #include "cxeviewfindercontrol.h"
    37 #include "cxecameradevicecontrol.h"
    38 #include "cxecameradevicecontrol.h"
    50 #endif
    51 #endif
    51 #include "cxuistillprecaptureview.h"
    52 #include "cxuistillprecaptureview.h"
    52 #include "cxuiserviceprovider.h"
    53 #include "cxuiserviceprovider.h"
    53 #include "cxuisettingdialog.h"
    54 #include "cxuisettingdialog.h"
    54 #include "cxuisettingradiobuttonlist.h"
    55 #include "cxuisettingradiobuttonlist.h"
       
    56 #include "cxuizoomslider.h"
    55 
    57 
    56 using namespace Cxe;
    58 using namespace Cxe;
    57 using namespace CxUiLayout;
    59 using namespace CxUiLayout;
    58 using namespace CxUiInternal;
    60 using namespace CxUiInternal;
    59 
    61 
    98             this, SLOT(handleStillCaptureStateChanged(CxeStillCaptureControl::State, CxeError::Id)));
   100             this, SLOT(handleStillCaptureStateChanged(CxeStillCaptureControl::State, CxeError::Id)));
    99     connect(&mEngine->viewfinderControl(), SIGNAL(stateChanged(CxeViewfinderControl::State, CxeError::Id)),
   101     connect(&mEngine->viewfinderControl(), SIGNAL(stateChanged(CxeViewfinderControl::State, CxeError::Id)),
   100             this, SLOT(handleViewfinderStateChanged(CxeViewfinderControl::State, CxeError::Id)));
   102             this, SLOT(handleViewfinderStateChanged(CxeViewfinderControl::State, CxeError::Id)));
   101     connect(&(mEngine->settings()), SIGNAL(sceneChanged(CxeScene&)),
   103     connect(&(mEngine->settings()), SIGNAL(sceneChanged(CxeScene&)),
   102             this, SLOT(handleSceneChanged(CxeScene&)));
   104             this, SLOT(handleSceneChanged(CxeScene&)));
       
   105     connect(&mEngine->stillCaptureControl(), SIGNAL(availableImagesChanged()),
       
   106             this, SLOT(updateImagesLeftLabel()));
   103 
   107 
   104     loadDefaultWidgets();
   108     loadDefaultWidgets();
   105     hideControls();
   109     hideControls();
   106 
   110 
   107     mSelfTimer = new CxuiSelfTimer(mEngine->settings());
   111     mSelfTimer = new CxuiSelfTimer(mEngine->settings());
   124 
   128 
   125     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON);
   129     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_QUALITY_ICON);
   126     mQualityIcon = qobject_cast<HbLabel *>(widget);
   130     mQualityIcon = qobject_cast<HbLabel *>(widget);
   127     CX_DEBUG_ASSERT(mQualityIcon);
   131     CX_DEBUG_ASSERT(mQualityIcon);
   128 
   132 
       
   133     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER);
       
   134     mIndicators = qobject_cast<HbWidget *>(widget);
       
   135     CX_DEBUG_ASSERT(mIndicators);
   129     // create background for indicator container
   136     // create background for indicator container
   130     HbWidget *container = NULL;
   137     createWidgetBackgroundGraphic(mIndicators, TRANSPARENT_BACKGROUND_GRAPHIC);
   131     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_INDICATOR_CONTAINER);
       
   132     container = qobject_cast<HbWidget *>(widget);
       
   133     CX_DEBUG_ASSERT(container);
       
   134     createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC);
       
   135     container->show();
       
   136 
   138 
   137     CX_DEBUG_EXIT_FUNCTION();
   139     CX_DEBUG_EXIT_FUNCTION();
   138 }
   140 }
   139 
   141 
   140 
   142 
   167     // get pointers to ui components from the layout data
   169     // get pointers to ui components from the layout data
   168     QGraphicsWidget *widget = NULL;
   170     QGraphicsWidget *widget = NULL;
   169     QObject *object = NULL;
   171     QObject *object = NULL;
   170 
   172 
   171     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_ZOOM_SLIDER);
   173     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_ZOOM_SLIDER);
   172     mSlider = qobject_cast<HbSlider *>(widget);
   174     mSlider = qobject_cast<CxuiZoomSlider *>(widget);
   173     CX_DEBUG_ASSERT(mSlider);
   175     CX_DEBUG_ASSERT(mSlider);
   174     addIncreaseDecreaseButtons(mSlider);
   176     addIncreaseDecreaseButtons(mSlider);
   175     createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC);
   177     createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC);
   176 
   178 
   177     if (mSelfTimer) {
   179     if (mSelfTimer) {
   185     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_CONTAINER);
   187     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_CONTAINER);
   186     container = qobject_cast<HbWidget *>(widget);
   188     container = qobject_cast<HbWidget *>(widget);
   187     CX_DEBUG_ASSERT(container);
   189     CX_DEBUG_ASSERT(container);
   188     createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC);
   190     createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC);
   189 
   191 
   190     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_BUTTON_CONTAINER);
       
   191     container = qobject_cast<HbWidget *>(widget);
       
   192     CX_DEBUG_ASSERT(container);
       
   193     createWidgetBackgroundGraphic(container, TRANSPARENT_BACKGROUND_GRAPHIC);
       
   194 
       
   195 
       
   196     // connect selftimer start button to hide controls
   192     // connect selftimer start button to hide controls
   197     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_START_BUTTON);
   193     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_SELFTIMER_START_BUTTON);
   198     HbPushButton *startButton = qobject_cast<HbPushButton *>(widget);
   194     HbPushButton *startButton = qobject_cast<HbPushButton *>(widget);
   199     CX_DEBUG_ASSERT(startButton);
   195     CX_DEBUG_ASSERT(startButton);
   200     connect(startButton, SIGNAL(released()), this, SLOT(hideControls()));
   196     connect(startButton, SIGNAL(released()), this, SLOT(hideControls()));
   237                 CX_DEBUG(("EMBEDDED: setting mode switch to disabled"));
   233                 CX_DEBUG(("EMBEDDED: setting mode switch to disabled"));
   238                 video->setEnabled(false);
   234                 video->setEnabled(false);
   239             }
   235             }
   240         }
   236         }
   241         if (!CxuiServiceProvider::instance()->allowCameraSwitching()) {
   237         if (!CxuiServiceProvider::instance()->allowCameraSwitching()) {
   242 
       
   243             CX_DEBUG(("EMBEDDED: don't allow camera switching"));
   238             CX_DEBUG(("EMBEDDED: don't allow camera switching"));
   244 
   239         }
   245             HbAction *goto_2nd_cam = qobject_cast<HbAction*> (mDocumentLoader->findObject(STILL_PRE_CAPTURE_GOTO_2ND_CAMERA_ACTION));
   240 
   246             if (goto_2nd_cam) {
   241     }
   247                 CX_DEBUG(("EMBEDDED: setting camera switch to disabled"));
   242 
   248                 goto_2nd_cam->setEnabled(false);
   243     // update toolbar flash icon
   249 
   244     int flash;
   250             }
   245     if (mEngine->settings().get(CxeSettingIds::FLASH_MODE, flash) == CxeError::None) {
   251         }
   246         handleSettingValueChanged(CxeSettingIds::FLASH_MODE, flash);
   252 
   247     }
       
   248 
       
   249     // update toolbar scene mode
       
   250     QString scene;
       
   251     if (mEngine->settings().get(CxeSettingIds::IMAGE_SCENE, scene) == CxeError::None) {
       
   252         handleSettingValueChanged(CxeSettingIds::IMAGE_SCENE, scene);
   253     }
   253     }
   254 
   254 
   255     hideControls();
   255     hideControls();
   256 
   256 
   257     mWidgetsLoaded = true;
   257     mWidgetsLoaded = true;
   303 }
   303 }
   304 
   304 
   305 void CxuiStillPrecaptureView::launchSceneModesPopup()
   305 void CxuiStillPrecaptureView::launchSceneModesPopup()
   306 {
   306 {
   307     CX_DEBUG_ENTER_FUNCTION();
   307     CX_DEBUG_ENTER_FUNCTION();
   308 
   308     hideControls();
   309     if(mSceneModePopup) {
   309     emit showScenesView();
   310         CX_DEBUG(("mSceneModePopup exists, showing.."));
       
   311         mSceneModePopup->show();
       
   312     } else {
       
   313         CX_DEBUG(("Loading scene mode popup DocML"));
       
   314         CxuiDocumentLoader* documentLoader = new CxuiDocumentLoader(mEngine);
       
   315         bool ok = false;
       
   316 
       
   317         // Use document loader to create popup
       
   318         documentLoader->load(SCENEMODE_SETTING_XML, &ok);
       
   319 
       
   320         CX_DEBUG(("load ok=%d", ok));
       
   321 
       
   322         mSceneModePopup = qobject_cast<HbDialog*>(documentLoader->findWidget("still_scenemode_popup"));
       
   323         CX_DEBUG_ASSERT(mSceneModePopup);
       
   324         mSceneModePopup->setTimeout(HbDialog::NoTimeout);
       
   325         mSceneModePopup->setBackgroundFaded(false);
       
   326 
       
   327         delete documentLoader;
       
   328         documentLoader = NULL;
       
   329     }
       
   330 
       
   331     connect(mKeyHandler, SIGNAL(autofocusKeyPressed()), mSceneModePopup, SLOT(close()));
       
   332 
       
   333     CX_DEBUG_EXIT_FUNCTION();
   310     CX_DEBUG_EXIT_FUNCTION();
   334 }
   311 }
   335 
   312 
   336 
   313 
   337 void CxuiStillPrecaptureView::handleSnapshot(CxeError::Id error)
   314 void CxuiStillPrecaptureView::handleSnapshot(CxeError::Id error)
   377     if (!mEngine->autoFocusControl().supported()) {
   354     if (!mEngine->autoFocusControl().supported()) {
   378         // autofocus is not supported, so start capturing straight away
   355         // autofocus is not supported, so start capturing straight away
   379         capture();
   356         capture();
   380     } else {
   357     } else {
   381         // start focusing
   358         // start focusing
   382         handleAutofocusKeyPressed();
   359         // Auto-focus can only work if viewfinder is running
       
   360         if (mEngine->viewfinderControl().state() == CxeViewfinderControl::Running) {
       
   361             mEngine->autoFocusControl().start(false);
       
   362         }
   383         setCapturePending();
   363         setCapturePending();
   384     }
   364     }
   385 
   365 
   386     CX_DEBUG_EXIT_FUNCTION();
   366     CX_DEBUG_EXIT_FUNCTION();
   387 }
   367 }
   391     CX_DEBUG_ENTER_FUNCTION();
   371     CX_DEBUG_ENTER_FUNCTION();
   392     mCapturePending = false;
   372     mCapturePending = false;
   393 
   373 
   394     if (mEngine->mode() == Cxe::ImageMode) {
   374     if (mEngine->mode() == Cxe::ImageMode) {
   395         // do not start capturing, if it is already ongoing
   375         // do not start capturing, if it is already ongoing
   396         // the user might be repeatly triggering capture key
   376         // the user might be repeatedly triggering capture key
   397         if (mEngine->stillCaptureControl().state() == CxeStillCaptureControl::Ready) {
   377         if (mEngine->stillCaptureControl().state() == CxeStillCaptureControl::Ready) {
   398             // If focusing in progress, cancel it now.
   378             // If focusing in progress, cancel it now.
   399             // Set capture pending and continue once focusing is cancelled.
   379             // Set capture pending and continue once focusing is cancelled.
   400             if(mEngine->autoFocusControl().state() == CxeAutoFocusControl::InProgress) {
   380             if(mEngine->autoFocusControl().state() == CxeAutoFocusControl::InProgress) {
   401                 mEngine->autoFocusControl().cancel();
   381                 mEngine->autoFocusControl().cancel();
   402                 setCapturePending();
   382                 setCapturePending();
   403             } else {
   383             } else {
   404                 mEngine->stillCaptureControl().reset();  //! @todo: Do not delete snapshots before images are really saved
   384                 // Engine uses disk space *estimate* for imagesLeft() so it
   405                 mEngine->stillCaptureControl().capture();
   385                 // should not cause significant delay / additional shutter lag.
       
   386                 if (mEngine->stillCaptureControl().imagesLeft()) {
       
   387                     mEngine->stillCaptureControl().reset();  //! @todo: Do not delete snapshots before images are really saved
       
   388                     mEngine->stillCaptureControl().capture();
       
   389                 } else {
       
   390                     launchDiskFullNotification();
       
   391                 }
   406             }
   392             }
   407         } else {
   393         } else {
   408             setCapturePending();
   394             setCapturePending();
   409         }
   395         }
   410     }
   396     }
   411 
   397 
   412     // after capturing check what is the new amount for images left
   398     // after capturing check what is the new amount for images left
   413     updateImagesLeftLabel();
   399     updateImagesLeftLabel();
   414 
       
   415     CX_DEBUG_EXIT_FUNCTION();
   400     CX_DEBUG_EXIT_FUNCTION();
   416 }
   401 }
   417 
   402 
   418 void CxuiStillPrecaptureView::setCapturePending()
   403 void CxuiStillPrecaptureView::setCapturePending()
   419 {
   404 {
   542         CX_DEBUG(("Autofocus not supported, ignoring key press"));
   527         CX_DEBUG(("Autofocus not supported, ignoring key press"));
   543         CX_DEBUG_EXIT_FUNCTION();
   528         CX_DEBUG_EXIT_FUNCTION();
   544         return;
   529         return;
   545     }
   530     }
   546 
   531 
       
   532     // in case of selftimer being enabled, autofocuskey does not start focusing
       
   533     if (mSelfTimer && mSelfTimer->isEnabled()){
       
   534         CX_DEBUG(("Selftimer enabled, ignoring autofocus key press"));
       
   535         CX_DEBUG_EXIT_FUNCTION();
       
   536         return;
       
   537     }
       
   538 
   547     // Auto-focus can only work if viewfinder is running
   539     // Auto-focus can only work if viewfinder is running
   548     if (mEngine->viewfinderControl().state() == CxeViewfinderControl::Running) {
   540     if (mEngine->viewfinderControl().state() == CxeViewfinderControl::Running) {
   549 
   541 
   550         mEngine->autoFocusControl().start();
   542         mEngine->autoFocusControl().start();
   551     }
   543     }
   554 }
   546 }
   555 
   547 
   556 void CxuiStillPrecaptureView::handleAutofocusKeyReleased()
   548 void CxuiStillPrecaptureView::handleAutofocusKeyReleased()
   557 {
   549 {
   558     CX_DEBUG_ENTER_FUNCTION();
   550     CX_DEBUG_ENTER_FUNCTION();
       
   551 
       
   552     // in case of selftimer being enabled, autofocuskey should not do anything
       
   553     if (mSelfTimer && mSelfTimer->isEnabled()){
       
   554         CX_DEBUG(("Selftimer enabled, ignoring autofocus key release"));
       
   555         CX_DEBUG_EXIT_FUNCTION();
       
   556         return;
       
   557     }
   559 
   558 
   560     if (mEngine->autoFocusControl().supported()) {
   559     if (mEngine->autoFocusControl().supported()) {
   561         // Check that capture is not in progress, or pending.
   560         // Check that capture is not in progress, or pending.
   562         // Otherwise wouldn't want to cancel the focus.
   561         // Otherwise wouldn't want to cancel the focus.
   563         CxeStillCaptureControl::State state(mEngine->stillCaptureControl().state());
   562         CxeStillCaptureControl::State state(mEngine->stillCaptureControl().state());
   636 
   635 
   637 void CxuiStillPrecaptureView::handleStillCaptureStateChanged(
   636 void CxuiStillPrecaptureView::handleStillCaptureStateChanged(
   638     CxeStillCaptureControl::State newState, CxeError::Id /*error*/)
   637     CxeStillCaptureControl::State newState, CxeError::Id /*error*/)
   639 {
   638 {
   640     if (newState == CxeStillCaptureControl::Ready) {
   639     if (newState == CxeStillCaptureControl::Ready) {
   641         OstTrace0(camerax_performance, CXUISTILLPRECAPTUREVIEW_SHOT_TO_SHOT_DUP2, "msg: e_CX_SHOT_TO_SHOT 0");
   640         OstTrace0(camerax_performance, DUP1_CXUISTILLPRECAPTUREVIEW_SHOT_TO_SHOT, "msg: e_CX_SHOT_TO_SHOT 0");
   642 
   641 
   643         if (mCapturePending) {
   642         if (mCapturePending) {
   644             CX_DEBUG(("mCapturePending is true, starting capture now"));
   643             CX_DEBUG(("mCapturePending is true, starting capture now"));
   645             capture();
   644             capture();
   646         }
   645         }
   663         CxuiPrecaptureView::showControls();
   662         CxuiPrecaptureView::showControls();
   664     }
   663     }
   665 
   664 
   666 }
   665 }
   667 
   666 
       
   667 /*!
       
   668 * Slot to handle application being sent to background.
       
   669 */
   668 void CxuiStillPrecaptureView::handleFocusLost()
   670 void CxuiStillPrecaptureView::handleFocusLost()
   669 {
   671 {
   670     CX_DEBUG_IN_FUNCTION();
   672     CX_DEBUG_ENTER_FUNCTION();
   671     bool captureInProgress = mEngine->stillCaptureControl().state() == CxeStillCaptureControl::Capturing;
   673 
   672     if (!captureInProgress) {
   674     if (mSelfTimer && mSelfTimer->isOngoing()) {
   673         if (mSelfTimer && mSelfTimer->isOngoing()) {
   675         // If self-timer is running, stop and reset the delay now.
   674             // If self-timer is running, stop and reset the delay now.
   676         mSelfTimer->reset();
   675             mSelfTimer->reset();
   677     }
   676         }
   678 
   677 
   679     // Release camera as we are going to background.
   678         // Release camera as we are going to background.
   680     // If taking image is just ongoing, it will be cancelled by engine.
   679         releaseCamera();
   681     releaseCamera();
   680     }
   682 
       
   683     CX_DEBUG_EXIT_FUNCTION();
   681 }
   684 }
   682 
   685 
   683 void CxuiStillPrecaptureView::handleFocusGained()
   686 void CxuiStillPrecaptureView::handleFocusGained()
   684 {
   687 {
   685     CX_DEBUG_ENTER_FUNCTION();
   688     CX_DEBUG_ENTER_FUNCTION();
   686     CxuiPrecaptureView::handleFocusGained();
   689     CxuiPrecaptureView::handleFocusGained();
   687     CX_DEBUG_EXIT_FUNCTION();
   690     CX_DEBUG_EXIT_FUNCTION();
   688 }
   691 }
   689 
   692 
       
   693 /*
       
   694     Slot for handling scene mode change
       
   695     \param scene QVariantMap containing settings related to the new scene mode
       
   696  */
   690 void CxuiStillPrecaptureView::handleSceneChanged(CxeScene &scene)
   697 void CxuiStillPrecaptureView::handleSceneChanged(CxeScene &scene)
   691 {
   698 {
   692     CX_DEBUG_ENTER_FUNCTION();
   699     CX_DEBUG_ENTER_FUNCTION();
   693     if (mEngine->mode() == Cxe::ImageMode) {
   700     if (mEngine->mode() == Cxe::ImageMode) {
       
   701 
       
   702         // update toolbar scene mode icon
       
   703         QString icon = getSettingItemIcon(CxeSettingIds::IMAGE_SCENE, scene[CxeSettingIds::SCENE_ID]);
       
   704         CX_DEBUG((("New scene mode icon: %s"), icon.toAscii().constData()));
       
   705         if (mDocumentLoader) {
       
   706             QObject *obj = mDocumentLoader->findObject(STILL_PRE_CAPTURE_SCENE_MODE_ACTION);
       
   707             CX_DEBUG_ASSERT(obj);
       
   708             qobject_cast<HbAction *>(obj)->setIcon(HbIcon(icon));
       
   709         }
       
   710 
   694         // for now, we are only interested in flashmode change
   711         // for now, we are only interested in flashmode change
   695         if (scene.contains(CxeSettingIds::FLASH_MODE)) {
   712         if (scene.contains(CxeSettingIds::FLASH_MODE)) {
   696             CX_DEBUG(("updating flash to: %d", scene[CxeSettingIds::FLASH_MODE].value<int>()));
   713             CX_DEBUG(("updating flash to: %d", scene[CxeSettingIds::FLASH_MODE].value<int>()));
   697             handleSettingValueChanged(CxeSettingIds::FLASH_MODE, scene[CxeSettingIds::FLASH_MODE]);
   714             handleSettingValueChanged(CxeSettingIds::FLASH_MODE, scene[CxeSettingIds::FLASH_MODE]);
   698         } else {
   715         } else {
   705     }
   722     }
   706 
   723 
   707     CX_DEBUG_EXIT_FUNCTION();
   724     CX_DEBUG_EXIT_FUNCTION();
   708 }
   725 }
   709 
   726 
       
   727 /*
       
   728     Slot for handling setting value changes. Notice that changing the scene mode
       
   729     does not emit settingValueChanged signal.
       
   730     \param key      CxSettingIds key defining the changed setting
       
   731     \param newValue QVariant containing the new setting value
       
   732 
       
   733     \sa CxuiStillPrecaptureView::handleSceneChanged(CxeScene &scene)
       
   734  */
   710 void CxuiStillPrecaptureView::handleSettingValueChanged(const QString& key, QVariant newValue)
   735 void CxuiStillPrecaptureView::handleSettingValueChanged(const QString& key, QVariant newValue)
   711 {
   736 {
   712     CX_DEBUG_ENTER_FUNCTION();
   737     CX_DEBUG_ENTER_FUNCTION();
   713 
   738 
   714     if (mEngine->mode() == Cxe::ImageMode) {
   739     if (mEngine->mode() == Cxe::ImageMode) {
       
   740 
       
   741         // update images left and image quality icons
   715         if (key == CxeSettingIds::IMAGE_QUALITY) {
   742         if (key == CxeSettingIds::IMAGE_QUALITY) {
   716 
       
   717             // update the quality indicator on screen
   743             // update the quality indicator on screen
   718             updateQualityIcon();
   744             updateQualityIcon();
   719 
       
   720             // update images left when quality values are changed
   745             // update images left when quality values are changed
   721             updateImagesLeftLabel();
   746             updateImagesLeftLabel();
   722         }
   747         }
   723 
   748 
       
   749         // update toolbar flash icon
   724         if (mFlashSetting && key == CxeSettingIds::FLASH_MODE) {
   750         if (mFlashSetting && key == CxeSettingIds::FLASH_MODE) {
   725             CX_DEBUG((("flash mode: %d"),newValue.toInt()))
   751             CX_DEBUG((("flash mode: %d"), newValue.toInt()));
   726             QString icon = getSettingItemIcon(key, newValue);
   752             QString icon = getSettingItemIcon(key, newValue);
       
   753             CX_DEBUG((("flash mode icon: %s"), icon.toAscii().constData()))
   727             mFlashSetting->setIcon(HbIcon(icon));
   754             mFlashSetting->setIcon(HbIcon(icon));
   728         }
   755         }
       
   756 
   729     }
   757     }
   730 
   758 
   731     CX_DEBUG_EXIT_FUNCTION();
   759     CX_DEBUG_EXIT_FUNCTION();
   732 }
   760 }
   733 
   761 
   792         } else {
   820         } else {
   793             mImagesLeftContainer->show();
   821             mImagesLeftContainer->show();
   794         }
   822         }
   795 
   823 
   796         CX_DEBUG(("Images left %d", images));
   824         CX_DEBUG(("Images left %d", images));
   797         mImagesLeft->setPlainText(hbTrId("%L1").arg(images));
   825         mImagesLeft->setPlainText(hbTrId("txt_cam_fullscreen_imagesleft").arg(images));
   798     }
   826     }
   799 
   827 
   800     CX_DEBUG_EXIT_FUNCTION();
   828     CX_DEBUG_EXIT_FUNCTION();
   801 }
   829 }
   802 
   830