201021_1
authorhgs
Thu, 15 Jul 2010 01:46:05 +0300
changeset 39 c5025ea871a1
parent 38 0f0b4c1d7744
child 40 2922f70fca82
201021_1
camerauis/cameraxui/cxengine/conf/CI_camerax.confml
camerauis/cameraxui/cxengine/conf/camerax.confml
camerauis/cameraxui/cxengine/conf/camerax_20027017.crml
camerauis/cameraxui/cxengine/cxengine.pro
camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h
camerauis/cameraxui/cxengine/inc/api/cxenamespace.h
camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h
camerauis/cameraxui/cxengine/inc/cxecenrepkeys.h
camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h
camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp
camerauis/cameraxui/cxengine/src/cxesettingscenrepstore.cpp
camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.cpp
camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.h
camerauis/cameraxui/cxui/cxui.pro
camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h
camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h
camerauis/cameraxui/cxui/inc/cxuiscenemodeview.h
camerauis/cameraxui/cxui/inc/cxuiselftimer.h
camerauis/cameraxui/cxui/inc/cxuisettingradiobuttonlist.h
camerauis/cameraxui/cxui/inc/cxuisettingsinfo.h
camerauis/cameraxui/cxui/inc/cxuistillprecaptureview.h
camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h
camerauis/cameraxui/cxui/inc/cxuiview.h
camerauis/cameraxui/cxui/inc/cxuizoomslider.h
camerauis/cameraxui/cxui/layouts/cxui.css
camerauis/cameraxui/cxui/layouts/image_setting.xml
camerauis/cameraxui/cxui/layouts/setting_scenemode.docml
camerauis/cameraxui/cxui/layouts/setting_slider.docml
camerauis/cameraxui/cxui/layouts/video_setting.xml
camerauis/cameraxui/cxui/layouts/view_postcapture.docml
camerauis/cameraxui/cxui/layouts/view_still_precapture.docml
camerauis/cameraxui/cxui/layouts/view_video_precapture.docml
camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp
camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp
camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp
camerauis/cameraxui/cxui/src/cxuiselftimer.cpp
camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlist.cpp
camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlistmodel.cpp
camerauis/cameraxui/cxui/src/cxuisettingsinfo.cpp
camerauis/cameraxui/cxui/src/cxuisettingxmlreader.cpp
camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp
camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp
camerauis/cameraxui/cxui/src/cxuiview.cpp
camerauis/cameraxui/cxui/src/cxuiviewmanager.cpp
camerauis/cameraxui/cxui/src/cxuizoomslider.cpp
camerauis/cameraxui/cxui/src/main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/conf/CI_camerax.confml	Thu Jul 15 01:46:05 2010 +0300
@@ -0,0 +1,44 @@
+<configuration xmlns="http://www.s60.com/xml/confml/1" name="camerax">
+  <feature ref="CxSettingsCrUid" name="CameraX Application Settings">
+    <desc>CameraX settings</desc>
+    
+    <setting ref="StillShowCapturedCr" name="Show Captured Image" type="selection">
+      <desc>StillShowCapturedCr defines setting in Image settings.
+            If disabled, post-capture view is not shown after capturing an image.
+      </desc>
+      <option name="On" value="-1"/>
+      <option name="2 seconds" value="2000"/>
+      <option name="10 seconds" value="10000"/>
+      <option name="Off" value="0"/>
+    </setting>
+    
+    <setting ref="VideoShowCapturedCr" name="Show Captured Video" type="selection">
+      <desc>VideoShowCapturedCr defines setting in Image settings.
+            If disabled, post-capture view is not shown after capturing an video.
+      </desc>
+      <option name="On" value="-1"/>
+      <option name="2 seconds" value="2000"/>
+      <option name="10 seconds" value="10000"/>
+      <option name="Off" value="0"/>
+    </setting>
+    
+    <setting ref="GeoTaggingCr" name="Store GPS Location Information" type="selection">
+      <desc> Store location information in metadata for captured images.</desc>
+      <option name="Disabled" value="0"/>
+      <option name="Enabled" value="1"/>
+    </setting>
+    
+    <setting ref="FacetrackingCr" name="Store facetracking state" type="selection">
+      <desc>The key defines if facetracking should be on or off.</desc>
+      <option name="Disabled" value="0"/>
+      <option name="Enabled" value="1"/>
+    </setting>
+    
+    <setting ref="CaptureSoundAlwaysOnCr" name="Capture sound always on" type="selection">
+      <desc>The key defines if the capture sound should always be played, regardless of profile sounds.</desc>
+      <option name="Disabled" value="0"/>
+      <option name="Enabled" value="1"/>
+    </setting>
+    
+  </feature>
+</configuration>
--- a/camerauis/cameraxui/cxengine/conf/camerax.confml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/conf/camerax.confml	Thu Jul 15 01:46:05 2010 +0300
@@ -27,26 +27,6 @@
       </desc>
     </setting>
 
-    <setting ref="StillShowCapturedCr" name="Show Captured Image" type="selection">
-      <desc>StillShowCapturedCr defines setting in Image settings.
-            If disabled, post-capture view is not shown after capturing an image.
-      </desc>
-      <option name="On" value="-1"/>
-      <option name="2 seconds" value="2000"/>
-      <option name="10 seconds" value="10000"/>
-      <option name="Off" value="0"/>
-    </setting>
-    
-    <setting ref="VideoShowCapturedCr" name="Show Captured Video" type="selection">
-      <desc>VideoShowCapturedCr defines setting in Image settings.
-            If disabled, post-capture view is not shown after capturing an video.
-      </desc>
-      <option name="On" value="-1"/>
-      <option name="2 seconds" value="2000"/>
-      <option name="10 seconds" value="10000"/>
-      <option name="Off" value="0"/>
-    </setting>
-
     <setting ref="ImageQualityCr" name="Image quality" type="int">
       <desc>ImageQualityCr defines the quality currently in use in still mode.
       </desc>
@@ -76,6 +56,9 @@
       <ImageQualityCr>1</ImageQualityCr>
       <VideoQualityCr>0</VideoQualityCr>
       <AudioMuteCr>0</AudioMuteCr>
+      <GeoTaggingCr>0</GeoTaggingCr>
+      <FacetrackingCr>1</FacetrackingCr>
+      <CaptureSoundAlwaysOnCr>0</CaptureSoundAlwaysOnCr>
     </CxSettingsCrUid>
   </data>
 
@@ -88,6 +71,9 @@
       <StillShowCapturedCr>true</StillShowCapturedCr>
       <VideoShowCapturedCr>true</VideoShowCapturedCr>
       <AudioMuteCr>true</AudioMuteCr>
+      <GeoTaggingCr>true</GeoTaggingCr>
+      <FacetrackingCr>true</FacetrackingCr>
+      <CaptureSoundAlwaysOnCr>true</CaptureSoundAlwaysOnCr>
     </CxSettingsCrUid>
   </rfs>
 
Binary file camerauis/cameraxui/cxengine/conf/camerax_20027017.crml has changed
--- a/camerauis/cameraxui/cxengine/cxengine.pro	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/cxengine.pro	Thu Jul 15 01:46:05 2010 +0300
@@ -91,6 +91,7 @@
 symbian {
     CXENGINE_DIR = $$section(PWD,":",1)
     BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
+    BLD_INF_RULES.prj_exports += "$$CXENGINE_DIR/conf/CI_camerax.confml                 APP_LAYER_CONFML(CI_camerax.confml)
     BLD_INF_RULES.prj_exports += "$$CXENGINE_DIR/conf/camerax.confml                    APP_LAYER_CONFML(camerax.confml)
     BLD_INF_RULES.prj_exports += "$$CXENGINE_DIR/conf/camerax_20027017.crml             APP_LAYER_CRML(camerax_20027017.crml)
     BLD_INF_RULES.prj_exports += "$$CXENGINE_DIR/conf/cameraxvariation.confml           APP_LAYER_CONFML(cameraxvariation.confml)
--- a/camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -34,7 +34,7 @@
     {
     Q_OBJECT
 public:
-    
+
     /*
      * Autofocus control states.
      */
@@ -42,71 +42,76 @@
         {
         //! focusing
         InProgress = 0x01,
-        
+
         //! Autofocus Failed
         Failed     = 0x02,
-        
+
         //! Focused
         Ready      = 0x04,
-        
+
         //! State after successfully canceling AF or during startup
         Unknown    = 0x08,
-        
+
         //! Starting to cancel any pending AF requests
         Canceling  = 0x10     // Starting to Cancel any pending AF requests
         };
-    
+
     // TODO: Check if we have to get all the supported modes from adaptation.
     enum Mode
         {
         //! AF mode: Auto
         Auto,
-        
+
         //! AF mode: Hyperfocal
         Hyperfocal,
-        
+
         //! AF mode: Macro
         Macro,
-        
+
         //! AF mode: Infinity
         Infinity,
-        
+
         //! AF mode: Portrait
         Portrait
         };
-    
+
     /**
      * Starts Autofocus.
      * \param soundEnabled indicates if the auto focus sound should be played
      */
     virtual CxeError::Id start(bool soundEnabled = true) = 0;
-    
+
     /**
      * Cancels Autofocus.
      */
     virtual void cancel() = 0;                // cancels active start operation
-    
+
 
     /**
      * Setting Autofocus Mode.
      */
     virtual void setMode( Mode newMode ) = 0; // sets default value for current view/mode
-    
+
     /**
      * Get current Autofocus mode.
      */
     virtual Mode mode() const = 0;
-    
+
+    /**
+     * Is the mode a fixed focus mode.
+     */
+    virtual bool isFixedFocusMode(Mode mode) const = 0;
+
     /**
      * Get current Autofocus state.
      */
     virtual State state() const = 0;                // returns current AF state, one of AutoFocusState
-    
+
     /**
      * Check if Autofocus is Supported or Not.
      */
     virtual bool supported() const = 0;             // true when AF is supported
-    
+
     /**
     * Check if auto focus sound is enabled
     */
--- a/camerauis/cameraxui/cxengine/inc/api/cxenamespace.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/api/cxenamespace.h	Thu Jul 15 01:46:05 2010 +0300
@@ -147,7 +147,9 @@
     static const char* VIDEO_QUALITY                           = "videoQuality";
     static const char* SECONDARY_CAMERA                        = "2ndCamera";
     static const char* SELF_TIMER                              = "selfTimer";
-
+    static const char* FACE_TRACKING                           = "face_tracking";
+    static const char* GEOTAGGING                              = "geotagging";
+    static const char* CAPTURE_SOUND_ALWAYS_ON                    = "capture_sound_always_on";
 
     // file name/path related key values
     static const char*  FNAME_FOLDER_SUFFIX                    = "folder_suffix";
--- a/camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -48,6 +48,7 @@
     void cancel();
     void setMode( CxeAutoFocusControl::Mode newMode );
     CxeAutoFocusControl::Mode mode() const;
+    bool isFixedFocusMode(CxeAutoFocusControl::Mode mode) const;
 
     CxeAutoFocusControl::State state() const;
     bool supported() const;
--- a/camerauis/cameraxui/cxengine/inc/cxecenrepkeys.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/cxecenrepkeys.h	Thu Jul 15 01:46:05 2010 +0300
@@ -28,6 +28,9 @@
 const unsigned long int  ImageQualityCr                 = 0x7;
 const unsigned long int  VideoQualityCr                 = 0x8;
 const unsigned long int  AudioMuteCr                    = 0x9;
+const unsigned long int  GeoTaggingCr                   = 0xA;
+const unsigned long int  FacetrackingCr                 = 0xB;
+const unsigned long int  CaptureSoundAlwaysOnCr         = 0xC;
 
 const unsigned long int  CxRuntimeFeaturesCrUid         =  {0x20027018};
 
--- a/camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h	Thu Jul 15 01:46:05 2010 +0300
@@ -125,6 +125,7 @@
     void generateFilename();
     void handlePrepareFailed();
     void handleComposeFailed(int error);
+    void emulateNormalStopping();
 
 protected: // protected data
     //! Video Recorder
--- a/camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -91,25 +91,28 @@
 */
 CxeError::Id CxeAutoFocusControlSymbian::start(bool soundEnabled)
 {
-    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <> state: %d, sound enabled: %d",
-               state(), soundEnabled ) );
-    mSoundEnabled = soundEnabled;
-    int err = KErrNone;
-
     CX_ASSERT_ALWAYS(mAdvancedSettings);
 
-    if ( state() != CxeAutoFocusControl::InProgress && state() != CxeAutoFocusControl::Canceling  ) {
-        CX_DEBUG(("CxeAutoFocusControlSymbian::start() calling SetAutoFocusType"));
-        mCancelled = false;
-        setState(InProgress);
-        setFocusRange(mAFRange);
-        setFocusType(CCamera::CCameraAdvancedSettings::EAutoFocusTypeSingle);
-    } else { // AF was started earlier, can't start until it completes
-        err = KErrInUse;
+    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <> state: %d, sound enabled: %d",
+               state(), soundEnabled ) );
+
+    mSoundEnabled = soundEnabled;
+    CxeError::Id error = CxeError::None;
+
+    if (!isFixedFocusMode(mode())) {
+        if ( state() != CxeAutoFocusControl::InProgress && state() != CxeAutoFocusControl::Canceling  ) {
+            CX_DEBUG(("CxeAutoFocusControlSymbian::start() calling SetAutoFocusType"));
+            mCancelled = false;
+            setState(InProgress);
+            setFocusRange(mAFRange);
+            setFocusType(CCamera::CCameraAdvancedSettings::EAutoFocusTypeSingle);
+        } else { // AF was started earlier, can't start until it completes
+            error = CxeError::InUse;
+        }
     }
 
-    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <= err : %d", err ) );
-    return CxeErrorHandlingSymbian::map(err);
+    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <= error: %d", error ) );
+    return error;
 }
 
 
@@ -123,7 +126,7 @@
 
     CX_DEBUG_ASSERT(mAdvancedSettings);
 
-    if (!mCancelled) {
+    if (!mCancelled && !isFixedFocusMode(mode())) {
         if (state() == CxeAutoFocusControl::InProgress) {
             // Need to stop current AF first. Wait for AF event to proceed.
             setState(CxeAutoFocusControl::Canceling);
@@ -171,6 +174,14 @@
     return mAfMode;
 }
 
+/**
+* Is the given mode a fixed focus mode?
+*/
+bool CxeAutoFocusControlSymbian::isFixedFocusMode(CxeAutoFocusControl::Mode mode) const
+{
+    return (mode == CxeAutoFocusControl::Hyperfocal
+         || mode == CxeAutoFocusControl::Infinity);
+}
 
 /*
 * To check if Autofocus is supported
@@ -389,7 +400,15 @@
 
     // we are interested only in the AF range.
     if(scene.contains(CxeSettingIds::FOCAL_RANGE) && supported() ) {
+
         setMode(static_cast<CxeAutoFocusControl::Mode>(scene[CxeSettingIds::FOCAL_RANGE].toInt()));
+
+        if (isFixedFocusMode(mode())) {
+            // Focus now if a fixed focus mode is used.
+            setFocusType(CCamera::CCameraAdvancedSettings::EAutoFocusTypeSingle);
+            // Set state to InProgress, so we know to set it ready in ECAM callback.
+            setState(CxeAutoFocusControl::InProgress);
+        }
     }
 
     CX_DEBUG_EXIT_FUNCTION();
--- a/camerauis/cameraxui/cxengine/src/cxesettingscenrepstore.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxesettingscenrepstore.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -314,6 +314,18 @@
     addKeyMapping(CxeSettingIds::VIDEO_MUTE_SETTING,
                   AudioMuteCr,
                   XQSettingsManager::TypeInt);
+    
+    addKeyMapping(CxeSettingIds::GEOTAGGING,
+                  GeoTaggingCr,
+                  XQSettingsManager::TypeInt);
+
+    addKeyMapping(CxeSettingIds::FACE_TRACKING,
+                  FacetrackingCr,
+                  XQSettingsManager::TypeInt);
+
+    addKeyMapping(CxeSettingIds::CAPTURE_SOUND_ALWAYS_ON,
+                  CaptureSoundAlwaysOnCr,
+                  XQSettingsManager::TypeInt);
 
     // mapping run-time keys
     addKeyMapping(CxeRuntimeKeys::PRIMARY_CAMERA_CAPTURE_KEYS,
--- a/camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -804,8 +804,7 @@
 
     // if focused and in correct mode, play sound
     if  (newState == CxeAutoFocusControl::Ready &&
-         mode != CxeAutoFocusControl::Hyperfocal &&
-         mode != CxeAutoFocusControl::Infinity &&
+         !mAutoFocusControl.isFixedFocusMode(mode) &&
          mAutoFocusControl.isSoundEnabled()) {
         mAutoFocusSoundPlayer->play();
     }
--- a/camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -181,14 +181,20 @@
         // stop video-recording in-case if its ongoing.
         stop();
 
+        // Check if state is stopping, in which case we have to inform the
+        // file harvester that a file is to be completed. We would not
+        // call harvestFile otherwise in this case.
+        // Otherwise the video will not be found from videos app.
+        if (state() == Stopping) {
+            emit videoComposed(CxeError::None, mCurrentFilename);
+        }
+
         mSnapshotControl.stop();
 
         if (mVideoRecorder) {
             mVideoRecorder->close();
         }
 
-        mCurrentFilename = QString("");
-
         setState(Idle);
 
         OstTrace0( camerax_performance, DUP1_CXEVIDEOCAPTURECONTROLSYMBIAN_DEINIT, "msg: e_CX_VIDEO_CAPCONT_DEINIT 0" );
@@ -453,10 +459,8 @@
             CX_DEBUG(("CxeVideoCaptureControlSymbian - async stop failed, try sync.."));
             try {
                 mVideoRecorder->stop(false);
-                 // stop operation went fine, set back the state to Initialized.
-                setState(Initialized);
-                // must increment counter now since no callback is coming in sync stop
-                mFilenameGenerator.raiseCounterValue();
+                // stopping went ok
+                emulateNormalStopping();
             } catch (const std::exception &e) {
                 // Even synchronous stopping failed -> release resources.
                 CX_DEBUG(("CxeVideoCaptureControlSymbian - sync stop failed, too!"));
@@ -523,9 +527,7 @@
         // KErrCompletion is received when video recording stops
         // because of maximum clip size is reached. Emulate
         // normal stopping.
-        setState(Stopping);
-        MvruoEvent(TMMFEvent(KCamCControllerCCVideoRecordStopped, KErrNone));
-        MvruoEvent(TMMFEvent(KCamCControllerCCVideoFileComposed, KErrNone));
+        emulateNormalStopping();
     }
     else {
         // error during recording, report to client
@@ -630,22 +632,10 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    // Save the state and filename before releasing.
-    QString filenameCopy(filename());
-    CxeVideoCaptureControl::State stateCopy(state());
-
     // first de-init videocapture control
     deinit();
     reset();
 
-    // Check if state is stopping, in which case we have to inform the
-    // file harvester that a file is to be completed. We would not
-    // call harvestFile otherwise in this case.
-    // Otherwise the video will not be found from videos app.
-    if (stateCopy == CxeVideoCaptureControl::Stopping) {
-        emit videoComposed(CxeError::None, filenameCopy);
-    }
-
     delete mVideoRecorder;
     mVideoRecorder = NULL;
 
@@ -935,4 +925,18 @@
     deinit();
     CX_DEBUG_EXIT_FUNCTION();
 }
+
+/*!
+ * Helper method to emulate video stopping events.
+ */
+void CxeVideoCaptureControlSymbian::emulateNormalStopping()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    setState(Stopping);
+    MvruoEvent(TMMFEvent(KCamCControllerCCVideoRecordStopped, KErrNone));
+    MvruoEvent(TMMFEvent(KCamCControllerCCVideoFileComposed, KErrNone));
+
+    CX_DEBUG_EXIT_FUNCTION();
+}
 // End of file
--- a/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -59,6 +59,12 @@
     return mAfMode;
 }
 
+bool CxeFakeAutoFocusControl::isFixedFocusMode(Mode mode) const
+{
+    return (mode == CxeAutoFocusControl::Hyperfocal
+         || mode == CxeAutoFocusControl::Infinity);
+}
+
 bool CxeFakeAutoFocusControl::supported() const
 {
     return true;
--- a/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -36,6 +36,7 @@
     void cancel();
     void setMode(CxeAutoFocusControl::Mode newMode);
     CxeAutoFocusControl::Mode mode() const;
+    bool isFixedFocusMode(Mode mode) const;
     CxeAutoFocusControl::State state() const;
     bool supported() const;
     bool isSoundEnabled() const;
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -108,6 +108,15 @@
     QVERIFY(mAutoFocusControl->mode() == CxeAutoFocusControl::Portrait);
 }
 
+void UnitTestCxeAutoFocusControlSymbian::testIsFixedFocusMode()
+{
+    QVERIFY(mAutoFocusControl->isFixedFocusMode(CxeAutoFocusControl::Auto) == false);
+    QVERIFY(mAutoFocusControl->isFixedFocusMode(CxeAutoFocusControl::Hyperfocal) == true);
+    QVERIFY(mAutoFocusControl->isFixedFocusMode(CxeAutoFocusControl::Macro) == false);
+    QVERIFY(mAutoFocusControl->isFixedFocusMode(CxeAutoFocusControl::Infinity) == true);
+    QVERIFY(mAutoFocusControl->isFixedFocusMode(CxeAutoFocusControl::Portrait) == false);
+}
+
 void UnitTestCxeAutoFocusControlSymbian::testSupported()
 {
     bool supported = mAutoFocusControl->supported();
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeautofocuscontrolsymbian/unittest_cxeautofocuscontrolsymbian.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -40,6 +40,7 @@
     void testStart();
     void testCancel();
     void testMode();
+    void testIsFixedFocusMode();
 
     void testSupported();
 
--- a/camerauis/cameraxui/cxui/cxui.pro	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/cxui.pro	Thu Jul 15 01:46:05 2010 +0300
@@ -73,6 +73,7 @@
 HEADERS += cxuiapplication.h \
     cxuiapplicationframeworkmonitor.h \
     cxuiapplicationframeworkmonitorprivate.h \
+    cxuiview.h \
     cxuiprecaptureview.h \
     cxuistillprecaptureview.h \
     cxuivideoprecaptureview.h \
@@ -101,6 +102,7 @@
     cxuiapplication.cpp \
     cxuiapplicationframeworkmonitor.cpp \
     cxuiapplicationframeworkmonitorprivate.cpp \
+    cxuiview.cpp \
     cxuiprecaptureview.cpp \
     cxuivideoprecaptureview.cpp \
     cxuistillprecaptureview.cpp \
--- a/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -20,8 +20,8 @@
 #include <QObject>
 #include <QList>
 #include <QTimer>
-#include <hbview.h>
 #include <xqappmgr.h>
+#include "cxuiview.h"
 
 class QGraphicsRectItem;
 class HbMainWindow;
@@ -35,7 +35,7 @@
 /**
  * Post-capture view
  */
-class CxuiPostcaptureView : public HbView
+class CxuiPostcaptureView : public CxuiView
 {
     Q_OBJECT
 
@@ -66,43 +66,35 @@
 protected slots:
     void goToPrecaptureView();
     void stopViewfinder();
-    void releaseCamera();
 
-    // Control visibility
-    void hideControls();
-    void showControls();
-    void toggleControls();
+    void hideToolbar();
 
     // toolbar actions
-    void launchPhotosApp();
     void select();
     void launchShare();
     void playVideo();
     void showDeleteNote();
-    void launchVideosApp();
 
     void handleDeleteDialogClosed(HbAction *action);
 
 private:
-    void launchNotSupportedNotification();
     QString getCurrentFilename();
 
+    void startTimers();
+    void startPostcaptureTimer();
+    void startReleaseTimers();
+
 private slots:
-    void startTimers();
+    void handleFocusGained();
     void handleFocusLost();
 
 private: // data
-    HbMainWindow *mMainWindow; // not own
-    CxeEngine *mEngine; // not own
-    CxuiDocumentLoader *mDocumentLoader; // not own
     HbToolBar *mStillToolbar;
     HbToolBar *mVideoToolbar;
     HbToolBar *mEmbeddedToolbar;
     QGraphicsRectItem *mBackgroundItem;
     HbLabel *mImageLabel;
 
-    QTimer mHideControlsTimeout;
-
     /**
      * Timer used to stop viewfinder after a delay if the user remains in
      * post-capture view. Viewfinder is not stopped immediately when
@@ -125,12 +117,12 @@
     */
     QTimer mPostcaptureTimer;
 
-    bool mControlsVisible;
+    bool mTimersStarted;
 
-    bool mTimersStarted;
-    
     XQApplicationManager mAppManager;
 
+    bool mDeleteNoteOpen;
+
 };
 
 #endif // CXUIPOSTCAPTUREVIEW_H
--- a/camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -27,6 +27,7 @@
 #include "cxezoomcontrol.h"
 #include "cxeviewfindercontrol.h"
 #include "cxuidisplaypropertyhandler.h"
+#include "cxuiview.h"
 
 
 class HbAction;
@@ -50,7 +51,7 @@
 /**
  * Pre-capture view
  */
-class CxuiPrecaptureView : public HbView
+class CxuiPrecaptureView : public CxuiView
 {
     Q_OBJECT
 
@@ -61,13 +62,6 @@
 
 public:
 
-    /**
-     * Construct-method handles initialisation tasks for this class.
-     * @param mainwindow
-     * @param engine
-     * @param documentLoader
-     * @param keyHandler
-     */
     virtual void construct(HbMainWindow *mainWindow, CxeEngine *engine,
                            CxuiDocumentLoader *documentLoader,
                            CxuiCaptureKeyHandler *keyHandler);
@@ -78,11 +72,9 @@
      */
     virtual void loadWidgets() = 0;
     void prepareWindow();
-    virtual void updateOrientation(Qt::Orientation orient) = 0;
 
 public slots:
 
-    void releaseCamera();
     void initCamera();
     void requestCameraSwitch();
 
@@ -104,21 +96,11 @@
     // UI: Zoom slider change notification
     void zoomTo(int value);
 
-    // Control visibility of all UI items at the same time: toolbar, zoom and titlepane items
-    virtual void hideControls();
-    virtual void showControls();
-    void toggleControls();
-
     void disableControlsTimeout();
 
     void toggleZoom();
-    void hideToolbar();
-
-    void launchPhotosApp();
-    void launchVideosApp();
 
     // Settings related
-    void launchNotSupportedNotification();
     void launchDiskFullNotification();
     void showSettingsGrid();
     void hideSettingsGrid();
@@ -127,17 +109,11 @@
     void prepareToCloseDialog(HbAction *action);
 
 protected:
-
-   virtual void initializeSettingsGrid() = 0;
-
-    void hideZoom();
-    void showZoom();
-    void hideIndicators();
-    void showIndicators();
+    void toggleControls();
+    virtual void initializeSettingsGrid() = 0;
     void showEvent(QShowEvent *event);
     void hideEvent(QHideEvent *event);
     void mousePressEvent(QGraphicsSceneMouseEvent *event);
-    virtual void showToolbar();
     bool eventFilter(QObject *object, QEvent *event);
     void launchSettingsDialog(QObject *action);
     bool isPostcaptureOn() const;
@@ -145,10 +121,7 @@
     QString getSettingItemIcon(const QString &key, QVariant value);
     void updateQualityIcon();
     void updateSceneIcon(const QString& sceneId);
-    void createWidgetBackgroundGraphic(HbWidget *widget,
-                                       const QString &graphicName,
-                                       HbFrameDrawer::FrameType frameType =
-                                       HbFrameDrawer::NinePieces);
+
 
 signals:
 
@@ -165,26 +138,15 @@
 
     // signal to report error to ErrorManager for further actions.
     void reportError(CxeError::Id errorId);
-    void showScenesView();
 
 protected:
-    CxeEngine *mEngine; // not own
     HbTransparentWindow *mViewfinder; // not own, owned by the graphics scene
-    HbMainWindow *mMainWindow; // not own
-    CxuiDocumentLoader *mDocumentLoader; // not own
     CxuiDisplayPropertyHandler *mDisplayHandler;
-    bool   mControlsVisible;
-    QTimer mHideControlsTimeout;
-    CxuiZoomSlider *mSlider; // zoom slider, not own, owned by the graphics scene
-    HbToolBar *mToolBar; // not own, owned by the graphics scene
     HbToolBarExtension *mSettingsGrid;
-    bool mZoomVisible;
     bool mWidgetsLoaded;
     CxuiSettingDialog *mSettingsDialog;
     CxuiSettingRadioButtonList *mSettingsDialogList;
-    CxuiCaptureKeyHandler *mKeyHandler;
     HbLabel *mQualityIcon;
-    HbWidget *mIndicators;
 
 private:
     CxuiSettingDialog* createSettingsDialog();
--- a/camerauis/cameraxui/cxui/inc/cxuiscenemodeview.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuiscenemodeview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -31,6 +31,7 @@
 #include "cxuisettingsinfo.h"
 #include "cxuienums.h"
 #include "cxeengine.h"
+#include "cxuiview.h"
 
 class CxuiCaptureKeyHandler;
 class CxuiDocumentLoader;
@@ -45,7 +46,7 @@
  */
 
 
-class CxuiSceneModeView : public HbView
+class CxuiSceneModeView : public CxuiView
 {
     Q_OBJECT
 
@@ -76,28 +77,20 @@
     void finishScenesTransition();
     void handleOkButtonPress();
     void handleCancelButtonPress();
-    void releaseCameraHw();
 
 protected:
     void showEvent(QShowEvent *event);
+    bool allowShowControls() const;
 
 private:
     QString backgroundForScene(const QString& sceneId);
     void startBackgroundTransition();
-    void createWidgetBackgroundGraphic(HbWidget *widget,
-                           const QString &graphicName,
-                           HbFrameDrawer::FrameType frameType =
-                           HbFrameDrawer::NinePieces);
 
     void connectSignals();
     void closeView();
 
 private:
-    HbMainWindow *mMainWindow; //not own
     CxuiSettingsInfo *mSettingsInfo;
-    CxeEngine *mEngine; //not own
-    CxuiDocumentLoader *mDocumentLoader; //not own
-    CxuiCaptureKeyHandler *mCaptureKeyHandler;
 
     HbLabel* mScenesBackground;
     HbLabel* mScenesBackground2;
--- a/camerauis/cameraxui/cxui/inc/cxuiselftimer.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuiselftimer.h	Thu Jul 15 01:46:05 2010 +0300
@@ -39,6 +39,7 @@
     bool isEnabled();
     bool isOngoing();
 
+    int getTimeout() const;
 signals:
     void timerFinished();
     void cancelled();
--- a/camerauis/cameraxui/cxui/inc/cxuisettingradiobuttonlist.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuisettingradiobuttonlist.h	Thu Jul 15 01:46:05 2010 +0300
@@ -43,7 +43,7 @@
     explicit CxuiSettingRadioButtonList(QGraphicsItem *parent, CxeEngine *engine);
     void init(CxUiSettings::RadioButtonListParams *data);
 
-
+    void setOriginalSelectedItemByValue(const QVariant &value);
 signals:
     void valueSelected(int value);
     void selectionCommitted();
@@ -56,7 +56,6 @@
     void handleItemSelected(int index);
 
 protected:
-   void showEvent(QShowEvent *event); // From QGraphicsWidget
     virtual void initOriginalSelectedItem();
 
 private:
--- a/camerauis/cameraxui/cxui/inc/cxuisettingsinfo.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuisettingsinfo.h	Thu Jul 15 01:46:05 2010 +0300
@@ -18,6 +18,11 @@
 #ifndef CXUISETTINGSINFO_H
 #define CXUISETTINGSINFO_H
 
+/*!
+* @file
+* @brief CxUi settings related classes and constants.
+*/
+
 #include <QObject>
 #include <QMap>
 #include <QPair>
@@ -31,12 +36,23 @@
 class CxeEngine;
 class CxuiSettingXmlReader;
 
+/*!
+* @namespace CxUiSettings
+* @brief Namespace for UI settings related constants and classes.
+*/
 namespace CxUiSettings
 {
-    // Setting mappings
+    /*! Image setting definitions. */
     static const char *IMAGE_SETTING_MAPPING_FILE = ":/xml/image_setting.xml";
+    /*! Video setting definitions. */
     static const char *VIDEO_SETTING_MAPPING_FILE = ":/xml/video_setting.xml";
 
+    /*!
+    * Character used to separate lines within a single string.
+    * E.g. SettingItem::mItem can be split with this character to get multi-line item.
+    */
+    static const char NEW_LINE_CHAR = '\n';
+
     struct SettingItem
     {
         QString mItem;
--- a/camerauis/cameraxui/cxui/inc/cxuistillprecaptureview.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuistillprecaptureview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -75,12 +75,10 @@
      */
     virtual void loadWidgets();
 
-    void updateOrientation(Qt::Orientation orientation);
-
 protected:
 
     void showEvent(QShowEvent *event);
-    virtual void showToolbar();
+    virtual bool allowShowControls() const;
 
 public slots:
 
@@ -97,7 +95,6 @@
     void setCapturePending();
     void goToVideo();
 
-    void launchSceneModesPopup();
 
     // Key events
     void handleCaptureKeyPressed();
@@ -117,14 +114,11 @@
      */
     void resetCapturePendingFlag();
 
-    void showControls();
-
     /**
      * Application focus slots are called if focus state is changed.
      * Camera is released or reserved according to new state.
      */
     void handleFocusLost();
-    void handleFocusGained();
     void launchSetting();
     void updateImagesLeftLabel();
 
--- a/camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -67,8 +67,6 @@
      */
     virtual void loadWidgets();
 
-    void updateOrientation(Qt::Orientation orientation);
-
 public slots:
 
     // from CxuiPrecaptureView
@@ -114,6 +112,7 @@
     void setVideoTime(HbLabel* label, int time);
     bool getElapsedTime();
     void getRemainingTime();
+    virtual bool allowShowControls() const;
     virtual void showToolbar();
     void disableFeedback();
     void enableFeedback();
@@ -133,9 +132,9 @@
     HbLabel *mRemainingTimeText; // not own
     HbLabel *mRecordingIcon; // not own
     HbAction *mGoToStillAction; // not own
-    HbToolBar *mToolBarIdle; // not own
-    HbToolBar *mToolBarRec; // not own
-    HbToolBar *mToolBarPaused; // not own
+    HbToolBar *mToolbarIdle; // not own
+    HbToolBar *mToolbarRec; // not own
+    HbToolBar *mToolbarPaused; // not own
     HbDialog *mVideoScenePopup;
     CxeVideoCaptureControl *mVideoCaptureControl;
     HbMenu *mMenu;    // own
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/inc/cxuiview.h	Thu Jul 15 01:46:05 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This is a header file for a CxuiView class
+*
+*/
+
+#ifndef CXUIVIEW_H
+#define CXUIVIEW_H
+
+#include <QObject>
+#include <QTimer>
+#include <hbview.h>
+#include <hbmainwindow.h>
+#include <hbframedrawer.h>
+
+class CxuiDocumentLoader;
+class CxuiCaptureKeyHandler;
+class CxuiZoomSlider;
+class CxuiCaptureKeyHandler;
+class CxeEngine;
+class HbWidget;
+
+// CONSTANTS
+const int CXUI_HIDE_CONTROLS_TIMEOUT     = 6000; // 6 seconds
+
+/**
+ * A base class for all views in the Camera UI
+ * The class is for deriving only
+ */
+class CxuiView : public HbView
+{
+    Q_OBJECT
+
+public:
+    CxuiView(QGraphicsItem *parent = 0);
+    virtual ~CxuiView();
+
+protected:
+    virtual void construct(HbMainWindow *mainWindow, CxeEngine *engine,
+                           CxuiDocumentLoader *documentLoader,
+                           CxuiCaptureKeyHandler * keyHandler);
+
+public:
+    virtual void updateOrientation(Qt::Orientation orientation);
+
+protected:
+    virtual bool allowShowControls() const;
+    virtual void toggleControls();
+    virtual void showToolbar();
+    virtual void hideZoom();
+    virtual void showZoom();
+    virtual void hideIndicators();
+    virtual void showIndicators();
+    virtual void createWidgetBackgroundGraphic(HbWidget *widget,
+                                       const QString &graphicName,
+                                       HbFrameDrawer::FrameType frameType =
+                                       HbFrameDrawer::NinePieces);
+
+protected slots:
+    virtual void launchNotSupportedNotification();
+    virtual void launchPhotosApp();
+    virtual void launchVideosApp();
+    virtual void releaseCamera();
+
+    virtual void launchScenesView();
+
+    // Control visibility of all UI items at the same time: toolbar, zoom and titlepane items
+    virtual void hideControls();
+    virtual void showControls();
+
+    virtual void hideToolbar();
+
+
+signals:
+    void viewCloseEvent();
+    void showScenesView();
+
+protected: //common data
+    HbMainWindow *mMainWindow; // not own
+    CxeEngine *mEngine; // not own
+    CxuiDocumentLoader *mDocumentLoader; // not own
+    CxuiCaptureKeyHandler* mCaptureKeyHandler;
+
+    CxuiZoomSlider *mSlider; // zoom slider, not own, owned by the graphics scene
+    HbToolBar *mToolbar; // not own, owned by the graphics scene
+    HbWidget *mIndicators;
+
+    bool   mControlsVisible;
+    bool   mZoomVisible;
+    QTimer mHideControlsTimeout;
+
+};
+
+#endif // CXUIVIEW_H
--- a/camerauis/cameraxui/cxui/inc/cxuizoomslider.h	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuizoomslider.h	Thu Jul 15 01:46:05 2010 +0300
@@ -30,6 +30,9 @@
     explicit CxuiZoomSlider(QGraphicsItem *parentItem = NULL);
     ~CxuiZoomSlider();
 
+public:
+    void addZoomButtons();
+
 protected:
     void mousePressEvent(QGraphicsSceneMouseEvent *event);
 
--- a/camerauis/cameraxui/cxui/layouts/cxui.css	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/cxui.css	Thu Jul 15 01:46:05 2010 +0300
@@ -55,6 +55,10 @@
 {
 color: var(qtc_popup_trans_normal);
 }
+HbWidget#video_indicator_container_bottom > HbLabel::icon
+{
+color: var(qtc_popup_trans_normal);
+}
 /* 
 Zoom sliders
 Decrement and increase icons both 
--- a/camerauis/cameraxui/cxui/layouts/image_setting.xml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/image_setting.xml	Thu Jul 15 01:46:05 2010 +0300
@@ -19,8 +19,8 @@
                       setting_icon="">
             <item string="txt_cam_list_automatic_flash" value="0" icon="qtg_mono_autoflash" />
             <item string="txt_cam_list_reduce_red_eye"  value="1" icon="qtg_mono_redeye" />
-            <item string="txt_cam_list_on_flash"        value="2" icon="qtg_mono_flash" />
-            <item string="txt_cam_list_off_flash"       value="3" icon="qtg_mono_flash_off" />
+            <item string="txt_cam_list_flash_on"        value="2" icon="qtg_mono_flash" />
+            <item string="txt_cam_list_flash_off"       value="3" icon="qtg_mono_flash_off" />
         </setting_list>
 
         <!-- Still Show post-capture (setting list) -->
@@ -32,7 +32,7 @@
             <lnItem string="txt_cam_list_ln_sec" lnValue="2"  value="2000" icon="" />
             <lnItem string="txt_cam_list_ln_sec" lnValue="10" value="10000" icon="" />
             <item   string="txt_cam_list_continuous" value="-1" icon="" />
-            <item   string="txt_cam_list_not"        value="0"  icon="" />
+            <item   string="txt_cam_list_never"        value="0"  icon="" />
         </setting_list>
 
         <!-- self timer (setting list) -->
@@ -41,7 +41,7 @@
                       preview="0"
                       type="SingleLineListBox"
                       setting_icon="">
-            <item string="txt_cam_list_off_timer" value="0" icon="" />
+            <item string="txt_cam_list_off_timer" value="-1" icon="" />
             <lnItem string="txt_cam_list_ln_seconds" lnValue="2"  value="2" icon="" />
             <lnItem string="txt_cam_list_ln_seconds" lnValue="10" value="10" icon="" />
             <lnItem string="txt_cam_list_ln_seconds" lnValue="20" value="20" icon="" />
@@ -80,25 +80,25 @@
                       type="SingleLineListBox"
                       setting_icon="">
             <item string="txt_cam_list_automatic_lightsens" value="0" icon="" />
-            <lnItem string="txt_cam_list_iso_l1" lnValue="100"  value="100" icon="" />
-            <lnItem string="txt_cam_list_iso_l1" lnValue="200"  value="200" icon="" />
-            <lnItem string="txt_cam_list_iso_l1" lnValue="400"  value="400" icon="" />
-            <lnItem string="txt_cam_list_iso_l1" lnValue="800"  value="800" icon="" />
+            <l1Item string="txt_cam_list_iso_l1" l1Value="100"  value="100" icon="" />
+            <l1Item string="txt_cam_list_iso_l1" l1Value="200"  value="200" icon="" />
+            <l1Item string="txt_cam_list_iso_l1" l1Value="400"  value="400" icon="" />
+            <l1Item string="txt_cam_list_iso_l1" l1Value="800"  value="800" icon="" />
         </setting_list>
 
         <!-- Exposure compensation (setting slider) -->
         <setting_slider id="ev_compensation_value" heading="txt_cam_title_exposure_compensation" setting_icon="">
-            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" lnValue="2" minorStep="0.5" majorStep="1"/>
+            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" l1Value="2" minorStep="0.5" majorStep="1"/>
         </setting_slider>
 
         <!-- Contrast (setting slider) -->
         <setting_slider id="contrast" heading="txt_cam_title_contrast" setting_icon="">
-            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" lnValue="2" minorStep="0.5" majorStep="1"/>
+            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" l1Value="2" minorStep="0.5" majorStep="1"/>
         </setting_slider>
 
         <!-- Sharpness (setting slider) -->
         <setting_slider id="sharpness" heading="txt_cam_title_sharpness" setting_icon="">
-            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" lnValue="2" minorStep="0.5" majorStep="1"/>
+            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" l1Value="2" minorStep="0.5" majorStep="1"/>
         </setting_slider>
 
         <!-- Still scene modes -->
--- a/camerauis/cameraxui/cxui/layouts/setting_scenemode.docml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/setting_scenemode.docml	Thu Jul 15 01:46:05 2010 +0300
@@ -64,7 +64,6 @@
         <string name="title" value="Scene modes"/>
         <bool name="contentFullScreen" value="TRUE"/>
         <enums name="focusDelegation" value="FocusDelegationNone"/>
-        <enums name="titleBarFlags" value="TitleBarMinimized|TitleBarHidden"/>
     </widget>
     <connect receiver="settings_scenes_view" sender="scene_ok_button" signal="released()" slot="handleOkButtonPress()"/>
     <connect receiver="settings_scenes_view" sender="scene_cancel_button" signal="released()" slot="handleCancelButtonPress()"/>
--- a/camerauis/cameraxui/cxui/layouts/setting_slider.docml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/setting_slider.docml	Thu Jul 15 01:46:05 2010 +0300
@@ -6,7 +6,7 @@
     </object>
     <object name="action_cancel" type="HbAction">
         <string name="role" value="HbDialog:secondaryAction"/>
-        <string locid="txt_common_button_ok" name="text" value="Cancel"/>
+        <string locid="txt_common_button_cancel" name="text" value="Cancel"/>
     </object>
     <widget name="slider_settings_dialog" type="HbDialog">
         <widget name="slider_settings_dialog_heading" role="HbDialog:headingWidget" type="HbLabel">
--- a/camerauis/cameraxui/cxui/layouts/video_setting.xml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/video_setting.xml	Thu Jul 15 01:46:05 2010 +0300
@@ -8,10 +8,10 @@
         <!-- Video Show post-capture (setting list) -->
         <setting_list id="video_showcaptured" heading="txt_cam_title_show_captured_video"
                                  preview="0" type="SingleLineListBox" setting_icon="">
-            <lnItem string="txt_cam_list_ln_sec" lnValue="2"  value="2000" icon="" />
-            <lnItem string="txt_cam_list_ln_sec" lnValue="10" value="10000" icon="" />
-            <item string="txt_cam_list_continuous" value="-1" icon="" />
-            <item string="txt_cam_list_not" value="0" icon="" />
+            <lnItem string="txt_cam_list_ln_sec_video" lnValue="2"  value="2000" icon="" />
+            <lnItem string="txt_cam_list_ln_sec_video" lnValue="10" value="10000" icon="" />
+            <item string="txt_cam_list_continuous_video" value="-1" icon="" />
+            <item string="txt_cam_list_not_video" value="0" icon="" />
         </setting_list>
 
         <!-- White balance (setting list) -->
@@ -42,18 +42,18 @@
 
         <!-- Video scene modes -->
         <setting_list id="video_scene_modes"
-                      heading="txt_cam_title_scene_mode"
+                      heading="txt_cam_title_scene_mode_video"
                       preview="0"
                       type="SingleLineListBox">
 
-            <item string="txt_cam_list_automatic_scene" value="video_scene_auto"           icon="qtg_mono_automatic" />
+            <item string="txt_cam_list_automatic_scene_video" value="video_scene_auto"           icon="qtg_mono_automatic" />
             <item string="txt_cam_list_low_light"         value="video_scene_low_light"          icon="qtg_mono_low_light" />
-            <item string="txt_cam_list_night"       value="video_scene_night"        icon="qtg_mono_night" />
+            <item string="txt_cam_list_night_video"       value="video_scene_night"        icon="qtg_mono_night" />
         </setting_list>
         
         <!-- Exposure compensation (setting slider) -->
         <setting_slider id="ev_compensation_value" heading="txt_cam_title_exposure_compensation" setting_icon="">
-            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" lnValue="2" minorStep="0.5" majorStep="1"/>
+            <setup min="txt_cam_slidervalue_l1_minus" max="txt_cam_slidervalue_l1_plus" l1Value="2" minorStep="0.5" majorStep="1"/>
         </setting_slider>
 
     </settings>
--- a/camerauis/cameraxui/cxui/layouts/view_postcapture.docml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/view_postcapture.docml	Thu Jul 15 01:46:05 2010 +0300
@@ -77,7 +77,6 @@
         <string locid="txt_cam_title_camera" name="title" value="Camera"/>
         <bool name="contentFullScreen" value="TRUE"/>
         <bool name="visible" value="TRUE"/>
-        <enums name="titleBarFlags" value="TitleBarHidden|TitleBarTransparent"/>
     </widget>
     <connect receiver="postcapture_view" sender="cxui_action_post_delete" signal="triggered(bool)" slot="showDeleteNote()"/>
     <connect receiver="postcapture_view" sender="cxui_action_post_play" signal="triggered(bool)" slot="playVideo()"/>
--- a/camerauis/cameraxui/cxui/layouts/view_still_precapture.docml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/view_still_precapture.docml	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="CxuiStillPrecaptureView" version="1.0">
+<hbdocument context="CxuiStillPrecaptureView" version="1.1">
     <object name="cxui_action_goto_2_camera" type="HbAction">
         <string name="text" value="Go to 2nd camera"/>
     </object>
@@ -81,7 +81,6 @@
         </widget>
         <string name="title" value="Camera"/>
         <bool name="contentFullScreen" value="TRUE"/>
-        <enums name="titleBarFlags" value="TitleBarHidden|TitleBarTransparent"/>
     </widget>
     <section name="still_capture_with_widgets">
         <widget name="still_capture_view" type="HbView">
@@ -93,14 +92,14 @@
                     <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
                     <enums name="orientation" value="Vertical"/>
                     <bool name="visible" value="TRUE"/>
-                    <ref object="cxui_action_capture" role="HbToolBar:addAction"/>
-                    <ref object="cxui_action_flash" role="HbToolBar:addAction"/>
-                    <ref object="cxui_action_scenemodes" role="HbToolBar:addAction"/>
-                    <ref object="cxui_action_goto_video" role="HbToolBar:addAction"/>
+                    <ref object="cxui_action_capture" role="HbWidget:addAction"/>
+                    <ref object="cxui_action_flash" role="HbWidget:addAction"/>
+                    <ref object="cxui_action_scenemodes" role="HbWidget:addAction"/>
+                    <ref object="cxui_action_goto_video" role="HbWidget:addAction"/>
                 </widget>
                 <widget name="zoom" type="HbSlider">
                     <real name="z" value="2"/>
-                    <sizehint height="40un" type="PREFERRED"/>
+                    <sizehint height="40un" type="PREFERRED" width="9un"/>
                     <enums name="orientation" value="Vertical"/>
                     <bool name="visible" value="FALSE"/>
                 </widget>
@@ -121,6 +120,8 @@
                     <widget name="selftimer_button_container" type="HbWidget">
                         <widget name="still_selftimer_start_button" type="HbPushButton">
                             <real name="z" value="5"/>
+                            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0"/>
+                            <sizehint type="FIXED" width="20un"/>
                             <string locid="txt_cam_button_start" name="text" value="Start"/>
                             <bool name="visible" value="TRUE"/>
                             <string name="state" value="normal"/>
@@ -128,6 +129,8 @@
                         </widget>
                         <widget name="still_selftimer_cancel_button" type="HbPushButton">
                             <real name="z" value="4"/>
+                            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0"/>
+                            <sizehint type="FIXED" width="20un"/>
                             <string locid="txt_cam_button_cancel" name="text" value="Cancel"/>
                             <bool name="visible" value="TRUE"/>
                             <string name="state" value="normal"/>
@@ -192,7 +195,6 @@
                     <anchoritem dst="still_precapture_selftimer_container" dstEdge="CENTERV" spacing="0" src="" srcEdge="CENTERV"/>
                 </layout>
             </widget>
-            <enums name="titleBarFlags" value="TitleBarFloating|TitleBarTransparent"/>
         </widget>
         <connect receiver="still_capture_view" sender="cxui_action_setdefaultscenemode" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
         <connect receiver="still_capture_view" sender="cxui_action_image_quality" signal="triggered(bool)" slot="launchSetting()"/>
@@ -208,32 +210,32 @@
         <connect receiver="still_capture_view" sender="cxui_action_goto_video" signal="triggered(bool)" slot="goToVideo()"/>
         <connect receiver="still_capture_view" sender="cxui_action_goto_video" signal="triggered(bool)" slot="hideControls()"/>
         <connect receiver="still_capture_view" sender="cxui_action_flash" signal="triggered(bool)" slot="launchSetting()"/>
-        <connect receiver="still_capture_view" sender="cxui_action_scenemodes" signal="triggered(bool)" slot="launchSceneModesPopup()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_scenemodes" signal="triggered(bool)" slot="launchScenesView()"/>
     </section>
     <section name="still_standalone_mode">
         <widget name="still_view_menu" role="HbView:menu" type="HbMenu">
-            <ref object="cxui_action_goto_photos" role="HbMenu:addAction"/>
-            <ref object="cxui_action_self_timer" role="HbMenu:addAction"/>
-            <ref object="cxui_action_settings" role="HbMenu:addAction"/>
+            <ref object="cxui_action_goto_photos" role="HbWidget:addAction"/>
+            <ref object="cxui_action_self_timer" role="HbWidget:addAction"/>
+            <ref object="cxui_action_settings" role="HbWidget:addAction"/>
             <widget name="still_submenu_general" role="HbMenu:menu" type="HbMenu">
                 <string locid="txt_cam_opt_general_settings" name="title" value="General settings"/>
-                <ref object="cxui_action_stillpostcapture" role="HbMenu:addAction"/>
-                <ref object="cxui_action_image_quality" role="HbMenu:addAction"/>
+                <ref object="cxui_action_stillpostcapture" role="HbWidget:addAction"/>
+                <ref object="cxui_action_image_quality" role="HbWidget:addAction"/>
             </widget>
-            <ref object="cxui_action_setdefaultscenemode" role="HbMenu:addAction"/>
+            <ref object="cxui_action_setdefaultscenemode" role="HbWidget:addAction"/>
         </widget>
     </section>
     <section name="still_embedded_mode">
         <widget name="still_view_menu" role="HbView:menu" type="HbMenu">
-            <ref object="cxui_action_self_timer" role="HbMenu:addAction"/>
-            <ref object="cxui_action_settings" role="HbMenu:addAction"/>
+            <ref object="cxui_action_self_timer" role="HbWidget:addAction"/>
+            <ref object="cxui_action_settings" role="HbWidget:addAction"/>
             <widget name="still_submenu_general" role="HbMenu:menu" type="HbMenu">
                 <string locid="txt_cam_opt_general_settings" name="title" value="General settings"/>
                 <ref object="cxui_action_image_quality" role="HbMenu:addAction"/>
             </widget>
         </widget>
     </section>
-    <metadata activeUIState="still_standalone_mode" display="NHD landscape" unit="un">
+    <metadata activeUIState="still_standalone_mode" display="NHD-3.2-inch_landscape" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="still_capture_with_widgets" sections="#common still_capture_with_widgets"/>
         <uistate name="still_standalone_mode" sections="#common still_capture_with_widgets still_standalone_mode"/>
--- a/camerauis/cameraxui/cxui/layouts/view_video_precapture.docml	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/layouts/view_video_precapture.docml	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
+<hbdocument version="1.1">
     <object name="cxui_video_action_record" type="HbAction">
         <icon iconName="qtg_small_record" name="icon"/>
     </object>
@@ -48,7 +48,7 @@
         <string locid="txt_cam_opt_go_to_videos" name="text" value="Go to Videos"/>
     </object>
     <widget name="video_capture_view" type="HbView">
-    	<widget name="video_view_menu" role="HbView:menu" type="HbMenu"/>
+        <widget name="video_view_menu" role="HbView:menu" type="HbMenu"/>
         <widget name="video_container" role="HbView:widget" type="HbWidget">
             <widget name="video_viewfinder_widget" type="HbTransparentWindow">
                 <real name="z" value="0"/>
@@ -100,7 +100,6 @@
         </widget>
         <string locid="txt_cam_title_camera" name="title" value="Camera"/>
         <bool name="contentFullScreen" value="TRUE"/>
-        <enums name="titleBarFlags" value="TitleBarHidden"/>
     </widget>
     <section name="video_capture_with_widgets">
         <widget name="video_capture_view" type="HbView">
@@ -112,23 +111,23 @@
                     <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
                     <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
                     <enums name="orientation" value="Vertical"/>
-                    <ref object="cxui_video_action_record" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_light" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_scene" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_gotostill" role="HbToolBar:addAction"/>
+                    <ref object="cxui_video_action_record" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_light" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_scene" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_gotostill" role="HbWidget:addAction"/>
                 </widget>
                 <widget name="video_toolbar_recording" type="HbToolBar">
                     <enums name="layoutDirection" value="RightToLeft"/>
                     <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
                     <enums name="orientation" value="Vertical"/>
                     <bool name="visible" value="FALSE"/>
-                    <ref object="cxui_video_action_pause" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_light" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_stop" role="HbToolBar:addAction"/>
+                    <ref object="cxui_video_action_pause" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_light" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_stop" role="HbWidget:addAction"/>
                 </widget>
                 <widget name="video_zoom" type="HbSlider">
                     <real name="z" value="8"/>
-                    <sizehint height="40un" type="PREFERRED"/>
+                    <sizehint height="40un" type="PREFERRED" width="9un"/>
                     <enums name="orientation" value="Vertical"/>
                 </widget>
                 <widget name="video_toolbar_paused" type="HbToolBar">
@@ -136,9 +135,9 @@
                     <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
                     <enums name="orientation" value="Vertical"/>
                     <bool name="visible" value="FALSE"/>
-                    <ref object="cxui_video_action_resume" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_light" role="HbToolBar:addAction"/>
-                    <ref object="cxui_video_action_stop" role="HbToolBar:addAction"/>
+                    <ref object="cxui_video_action_resume" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_light" role="HbWidget:addAction"/>
+                    <ref object="cxui_video_action_stop" role="HbWidget:addAction"/>
                 </widget>
                 <widget name="video_indicator_container_bottom" type="HbWidget">
                     <widget name="video_recording_icon" type="HbLabel">
@@ -196,7 +195,6 @@
                     <anchoritem dst="video_viewfinder_widget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
                 </layout>
             </widget>
-            <enums name="titleBarFlags" value="TitleBarTransparent"/>
         </widget>
         <connect receiver="video_capture_view" sender="video_view_menu" signal="aboutToShow()" slot="disableControlsTimeout()"/>
         <connect receiver="video_capture_view" sender="video_view_menu" signal="aboutToHide()" slot="hideControls()"/>
@@ -216,25 +214,28 @@
     </section>
     <section name="video_standalone_mode">
         <widget name="video_view_menu" role="HbView:menu" type="HbMenu">
-            <ref object="cxui_video_action_gotovideos" role="HbMenu:addAction"/>
-            <ref object="cxui_video_action_settings" role="HbMenu:addAction"/>
+            <ref object="cxui_video_action_gotovideos" role="HbWidget:addAction"/>
+            <ref object="cxui_video_action_settings" role="HbWidget:addAction"/>
             <widget name="video_submenu_general" role="HbMenu:menu" type="HbMenu">
                 <string locid="txt_cam_opt_general_settings" name="title" value="General settings"/>
-                <ref object="cxui_video_action_showcapturedvideo" role="HbMenu:addAction"/>
-                <ref object="cxui_video_action_quality" role="HbMenu:addAction"/>
+                <ref object="cxui_video_action_showcapturedvideo" role="HbWidget:addAction"/>
+                <ref object="cxui_video_action_quality" role="HbWidget:addAction"/>
             </widget>
         </widget>
     </section>
     <section name="video_embedded_mode">
         <widget name="video_view_menu" role="HbView:menu" type="HbMenu">
-            <ref object="cxui_video_action_settings" role="HbMenu:addAction"/>
+            <ref object="cxui_video_action_settings" role="HbWidget:addAction"/>
             <widget name="video_submenu_general" role="HbMenu:menu" type="HbMenu">
                 <string locid="txt_cam_opt_general_settings" name="title" value="General settings"/>
-                <ref object="cxui_video_action_quality" role="HbMenu:addAction"/>
+                <ref object="cxui_video_action_quality" role="HbWidget:addAction"/>
             </widget>
         </widget>
     </section>
     <section name="video_idle">
+        <widget name="video_elapsed_time" type="HbLabel">
+            <bool name="visible" value="FALSE"/>
+        </widget>
         <widget name="video_recording_icon" type="HbLabel">
             <bool name="visible" value="FALSE"/>
         </widget>
@@ -245,12 +246,34 @@
                 <linearitem itemname="video_remaining_time"/>
             </layout>
         </widget>
+    </section>
+    <section name="video_recording">
         <widget name="video_elapsed_time" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
+            <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="video_remaining_time" type="HbLabel">
+            <bool name="visible" value="TRUE"/>
+        </widget>
+        <widget name="video_recording_icon" type="HbLabel">
+            <bool name="visible" value="TRUE"/>
+            <icon iconName="qtg_small_record" name="icon"/>
+        </widget>
+        <widget name="video_indicator_container_bottom" type="HbWidget">
+            <bool name="visible" value="TRUE"/>
+            <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
+                <contentsmargins bottom="var(hb-param-margin-gene-middle-vertical)" left="var(hb-param-margin-gene-middle-horizontal)" right="var(hb-param-margin-gene-middle-horizontal)" top="var(hb-param-margin-gene-middle-vertical)"/>
+                <linearitem itemname="video_recording_icon"/>
+                <linearitem itemname="video_elapsed_time"/>
+                <linearitem itemname="video_remaining_time"/>
+            </layout>
         </widget>
     </section>
-    <section name="video_recording">
+    <section name="video_paused">
+        <widget name="video_elapsed_time" type="HbLabel">
+            <bool name="visible" value="TRUE"/>
+        </widget>
         <widget name="video_recording_icon" type="HbLabel">
+            <icon iconName="qtg_mono_pause" name="icon"/>
             <bool name="visible" value="TRUE"/>
         </widget>
         <widget name="video_indicator_container_bottom" type="HbWidget">
@@ -262,31 +285,8 @@
                 <linearitem itemname="video_remaining_time"/>
             </layout>
         </widget>
-        <widget name="video_elapsed_time" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="video_remaining_time" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
     </section>
-    <section name="video_paused">
-        <widget name="video_recording_icon" type="HbLabel">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="video_indicator_container_bottom" type="HbWidget">
-            <bool name="visible" value="TRUE"/>
-            <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
-                <contentsmargins bottom="var(hb-param-margin-gene-middle-vertical)" left="var(hb-param-margin-gene-middle-horizontal)" right="var(hb-param-margin-gene-middle-horizontal)" top="var(hb-param-margin-gene-middle-vertical)"/>
-                <linearitem itemname="video_recording_icon"/>
-                <linearitem itemname="video_elapsed_time"/>
-                <linearitem itemname="video_remaining_time"/>
-            </layout>
-        </widget>
-        <widget name="video_elapsed_time" type="HbLabel">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <metadata activeUIState="Recording" display="NHD landscape" unit="un">
+    <metadata activeUIState="Paused" display="NHD-3.2-inch_landscape" unit="un">
         <uistate name="Common ui state" sections="#common"/>
         <uistate name="All widgets" sections="#common video_capture_with_widgets"/>
         <uistate name="video_standalone_mode" sections="#common video_capture_with_widgets video_standalone_mode"/>
--- a/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -59,10 +59,6 @@
 using namespace CxUiLayout;
 using namespace Cxe;
 
-// CONSTANTS
-const int CXUI_HIDE_CONTROLS_TIMEOUT = 6000; // 6 seconds
-const QString PhotosAppExe = "photos.exe";
-const QString VideosAppExe = "videoplayer.exe";
 
 //!@todo Temporarily disabled.
 //const int CXUI_STOP_VIEWFINDER_TIMEOUT = 5000; // 5 seconds
@@ -74,19 +70,17 @@
 // ---------------------------------------------------------------------------
 //
 CxuiPostcaptureView::CxuiPostcaptureView(QGraphicsItem *parent) :
-    HbView(parent),
-    mMainWindow(NULL),
-    mEngine(NULL),
+    CxuiView(parent),
     mStillToolbar(NULL),
     mVideoToolbar(NULL),
     mEmbeddedToolbar(NULL),
     mBackgroundItem(NULL),
     mImageLabel(NULL),
-    mHideControlsTimeout(this),
     mStopViewfinderTimer(this),
     mReleaseCameraTimer(this),
     mPostcaptureTimer(this),
-    mTimersStarted(false)
+    mTimersStarted(false),
+    mDeleteNoteOpen(false)
 {
     CX_DEBUG_IN_FUNCTION();
 
@@ -116,9 +110,7 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    mMainWindow = mainwindow;
-    mEngine = engine;
-    mDocumentLoader = documentLoader;
+    CxuiView::construct(mainwindow, engine, documentLoader, NULL);
 
     // set back action to go back to pre-capture
     HbAction *backAction = new HbAction(Hb::BackNaviAction, this);
@@ -186,7 +178,9 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    goToPrecaptureView();
+    if (!mDeleteNoteOpen) {
+        goToPrecaptureView();
+    }
 
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -200,7 +194,9 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    goToPrecaptureView();
+    if (!mDeleteNoteOpen) {
+        goToPrecaptureView();
+    }
 
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -238,6 +234,7 @@
                                SLOT(handleDeleteDialogClosed(HbAction*)));
     }
 
+    mDeleteNoteOpen = true;
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -251,6 +248,7 @@
     CX_DEBUG_ENTER_FUNCTION();
 
     hideControls();
+    mDeleteNoteOpen = false;
 
     HbMessageBox *dlg = qobject_cast<HbMessageBox*>(sender());
 
@@ -344,32 +342,12 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-// ---------------------------------------------------------------------------
-// CxuiPostcaptureView::releaseCamera
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPostcaptureView::releaseCamera()
+/*!
+* Hides toolbar.
+*/
+void CxuiPostcaptureView::hideToolbar()
 {
     CX_DEBUG_ENTER_FUNCTION();
-
-    if (mMainWindow->currentView() == this) {
-        mEngine->cameraDeviceControl().release();
-    }
-    mReleaseCameraTimer.stop();
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPostcaptureView::hideControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPostcaptureView::hideControls()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
     if (mStillToolbar) {
         mStillToolbar->hide();
     }
@@ -379,56 +357,6 @@
     if (mEmbeddedToolbar) {
         mEmbeddedToolbar->hide();
     }
-
-    hideItems(Hb::AllItems);
-
-    mControlsVisible = false;
-
-    // stop hiding control timer
-    mHideControlsTimeout.stop();
-
-
-    // give the keyboard focus back to the view
-    // for the view to receive key events
-    setFocus();
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPostcaptureView::showControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPostcaptureView::showControls()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    showToolbar();
-
-    showItems(Hb::AllItems);
-
-    mHideControlsTimeout.start(CXUI_HIDE_CONTROLS_TIMEOUT);
-    mControlsVisible = true;
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPostcaptureView::toggleControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPostcaptureView::toggleControls()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    if (mControlsVisible) {
-        hideControls();
-    } else {
-        showControls();
-    }
-
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -609,16 +537,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-/*!
-    Launches "Not supported yet" notification.
- */
-void CxuiPostcaptureView::launchNotSupportedNotification()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    HbNotificationDialog::launchDialog("Notification", "Not supported yet");
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 /* !
  * gets the filename of the current file
  */
@@ -645,14 +563,6 @@
 }
 
 /*!
-    Launches the Photos applications as a separate process
-*/
-void CxuiPostcaptureView::launchPhotosApp()
-{
-    QProcess::startDetached(PhotosAppExe);
-}
-
-/*!
     Sends current capture to client app and closes camera
 */
 void CxuiPostcaptureView::select()
@@ -667,14 +577,16 @@
 }
 
 /*!
-    Launches the Videos applications as a separate process
+    Handle cases when we gain focus
 */
-void CxuiPostcaptureView::launchVideosApp()
+void CxuiPostcaptureView::handleFocusGained()
 {
-    //Releasing cameda device in order to free
-    //graphical memory
-    releaseCamera();
-    QProcess::startDetached(VideosAppExe);
+    CX_DEBUG_ENTER_FUNCTION();
+
+    //Note: We should not start timers until we receive the ShowEvent
+    showControls();
+
+    CX_DEBUG_EXIT_FUNCTION();
 }
 
 /*!
@@ -692,46 +604,63 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-
+/*!
+    Start the timers
+*/
 void CxuiPostcaptureView::startTimers()
 {
     CX_DEBUG_ENTER_FUNCTION();
 
     // we start timers only once in a given postcapture view session
-    if (!mTimersStarted) {
-        int postCaptureTimeout = 0;
-        QString settingId;
-
-        if (mEngine->mode() == ImageMode) {
-            settingId = CxeSettingIds::STILL_SHOWCAPTURED;
-        } else {
-            settingId = CxeSettingIds::VIDEO_SHOWCAPTURED;
-        }
-
-        if (!CxuiServiceProvider::isCameraEmbedded()) {
-            CxeError::Id err = mEngine->settings().get(settingId, postCaptureTimeout);
-
-            if (postCaptureTimeout > 0 && err == CxeError::None) {
-                mPostcaptureTimer.start(postCaptureTimeout);
-            } else {
-                // do nothing
-            }
-        }
-
-        // start the hide control timer.
-        mHideControlsTimeout.start(CXUI_HIDE_CONTROLS_TIMEOUT);
-
-        //! @todo Temporarily disabling release timer because of
-        // graphics memory problems related to releasing and reserving again.
-        // mReleaseCameraTimer.start(CXUI_RELEASE_CAMERA_TIMEOUT);
-        // mStopViewfinderTimer.start(CXUI_STOP_VIEWFINDER_TIMEOUT);
-
-        // we make sure that timers are started only once in a given postcaptureview session
+    if(!mTimersStarted) {
+        startPostcaptureTimer();
+        startReleaseTimers();
         mTimersStarted = true;
     }
 
-    // show controls when we get back focus
-    showControls();
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+    Start the timer to return to pre-capture view
+*/
+void CxuiPostcaptureView::startPostcaptureTimer()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    int postCaptureTimeout = 0;
+    QString settingId;
+
+    if (mEngine->mode() == ImageMode) {
+        settingId = CxeSettingIds::STILL_SHOWCAPTURED;
+    } else {
+        settingId = CxeSettingIds::VIDEO_SHOWCAPTURED;
+    }
+
+    if (!CxuiServiceProvider::isCameraEmbedded()) {
+        CxeError::Id err = mEngine->settings().get(settingId, postCaptureTimeout);
+
+        if (postCaptureTimeout > 0 && err == CxeError::None) {
+            mPostcaptureTimer.start(postCaptureTimeout);
+        } else {
+            // do nothing
+        }
+    }
+
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+    Start the timers to stop viewfinder and release the camera
+*/
+void CxuiPostcaptureView::startReleaseTimers()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    // Todo Note: Temporarily disabling release timer because of
+    // graphics memory problems related to releasing and reserving again.
+    // mReleaseCameraTimer.start(CXUI_RELEASE_CAMERA_TIMEOUT);
+    // mStopViewfinderTimer.start(CXUI_STOP_VIEWFINDER_TIMEOUT);
 
     CX_DEBUG_EXIT_FUNCTION();
 }
--- a/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -61,12 +61,6 @@
 #include "cxuiserviceprovider.h"
 #include "cxuizoomslider.h"
 
-
-// CONSTANTS
-const int CXUI_HIDE_CONTROLS_TIMEOUT     = 6000; // 6 seconds
-const QString PhotosAppExe = "photos.exe";
-const QString VideosAppExe = "videoplayer.exe";
-
 using namespace CxUiLayout;
 using namespace CxUiSettings;
 using namespace CxUiInternal;
@@ -79,24 +73,14 @@
 // ---------------------------------------------------------------------------
 //
 CxuiPrecaptureView::CxuiPrecaptureView(QGraphicsItem *parent) :
-    HbView(parent),
-    mEngine(0),
+    CxuiView(parent),
     mViewfinder(0),
-    mMainWindow(0),
-    mDocumentLoader(0),
     mDisplayHandler(0),
-    mControlsVisible(false),
-    mHideControlsTimeout(this),
-    mSlider(0),
-    mToolBar(0),
     mSettingsGrid(0),
-    mZoomVisible(false),
     mWidgetsLoaded(false),
     mSettingsDialog(NULL),
     mSettingsDialogList(NULL),
-    mKeyHandler(NULL),
     mQualityIcon(NULL),
-    mIndicators(NULL),
     mSettingsDialogHeading(NULL),
     mSliderSettingsDialog(NULL),
     mSliderSettingsDialogHeading(NULL),
@@ -118,7 +102,14 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-
+/**
+ * CxuiPrecaptureView::construct
+ * Construct-method handles initialisation tasks for this class.
+ * @param mainwindow
+ * @param engine
+ * @param documentLoader
+ * @param keyHandler
+ */
 void CxuiPrecaptureView::construct(HbMainWindow *mainWindow, CxeEngine *engine,
                                    CxuiDocumentLoader *documentLoader,
                                    CxuiCaptureKeyHandler * keyHandler)
@@ -126,14 +117,7 @@
     CX_DEBUG_ENTER_FUNCTION();
     OstTrace0( camerax_performance, CXUIPRECAPTUREVIEW_CONSTRUCT, "msg: e_CX_PRECAPVIEW_CONST 1" );
 
-    CX_ASSERT_ALWAYS(mainWindow);
-    CX_ASSERT_ALWAYS(engine);
-    CX_ASSERT_ALWAYS(documentLoader);
-
-    mMainWindow = mainWindow;
-    mEngine = engine;
-    mDocumentLoader = documentLoader;
-    mKeyHandler = keyHandler;
+    CxuiView::construct(mainWindow, engine, documentLoader, keyHandler);
 
     mSettingsInfo = new CxuiSettingsInfo(engine);
     CX_DEBUG_ASSERT(mSettingsInfo);
@@ -240,93 +224,6 @@
 }
 
 // ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideControls()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    hideItems(Hb::AllItems);
-    hideZoom();
-    mControlsVisible = false;
-    if (mHideControlsTimeout.isActive()) {
-        mHideControlsTimeout.stop();
-    }
-    hideToolbar();
-
-    // show indicators when controls are hidden
-    showIndicators();
-
-    // give the keyboard focus back to the view
-    // for the view to receive key events
-    setFocus();
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideToolbar
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideToolbar()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    if (mToolBar) {
-        mToolBar->hide();
-    }
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideZoom
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideZoom()
-{
-    if (mSlider) {
-        mSlider->hide();
-    }
-    mZoomVisible = false;
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showZoom
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showZoom()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    if (mSlider) {
-
-        // if maxVal has not been set yet, ask for new parameters from engine
-        if (mSlider->maximum() <= 0) {
-
-            // get the zoom range
-            int min = mEngine->zoomControl().min();
-            int max = mEngine->zoomControl().max();
-
-            // only change values if they are acceptable and have changed
-            if ((max - min > 0) && ((mSlider->maximum() != max) || (mSlider->minimum() != min))) {
-                mSlider->setRange(min, max);
-            }
-        }
-
-        // show zoom only if the slider has acceptable value
-        if (mSlider->maximum() > 0) {
-            mSlider->show();
-        }
-    }
-
-    mZoomVisible = true;
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-// ---------------------------------------------------------------------------
 // CxuiPrecaptureView::toggleZoom
 //
 // ---------------------------------------------------------------------------
@@ -340,77 +237,6 @@
     }
 }
 
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::hideIndicators
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::hideIndicators()
-{
-    if (mIndicators) {
-        mIndicators->hide();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showIndicators
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showIndicators()
-{
-    if (mIndicators) {
-        mIndicators->show();
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showControls
-//
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showControls()
-{
-    if (mEngine) {
-        bool videoCases = (mEngine->videoCaptureControl().state() == CxeVideoCaptureControl::Recording ||
-                           mEngine->videoCaptureControl().state() == CxeVideoCaptureControl::Paused);
-
-        if (mEngine->isEngineReady() || videoCases) {
-            // show toolbar
-            showToolbar();
-            // show zoom
-            showZoom();
-            // show titlepane
-            showItems(Hb::AllItems);
-
-            // hide indicators when controls are shown
-            hideIndicators();
-
-            mHideControlsTimeout.start();
-            mControlsVisible = true;
-        }
-    }
-}
-
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::showToolbar
-// shows toolbar
-// ---------------------------------------------------------------------------
-//
-void CxuiPrecaptureView::showToolbar()
-{
-
-    CX_DEBUG_ENTER_FUNCTION();
-
-    // toolbar pointer is missing if widgets for the view have not been loaded
-    // from the DocML
-    if (mToolBar) {
-        mToolBar->show();
-    }
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 
 /*
  *  Event filter which filters tool bar mouse events and
@@ -453,11 +279,7 @@
         loadWidgets();
     }
 
-    if (mControlsVisible) {
-        hideControls();
-    } else {
-        showControls();
-    }
+    CxuiView::toggleControls();
 }
 
 
@@ -582,16 +404,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-// ---------------------------------------------------------------------------
-// CxuiPrecaptureView::releaseCamera
-// ---------------------------------------------------------------------------
-void CxuiPrecaptureView::releaseCamera()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    mEngine->cameraDeviceControl().release();
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 
 // ---------------------------------------------------------------------------
 // CxuiPrecaptureView::initCamera
@@ -689,6 +501,16 @@
     if (mSliderSettingsDialog) {
         mSliderSettingsDialog->setStarterAction(NULL);
     }
+
+    // Dialog will be deleted automatically when closed
+    // The pointers may become invalid at any time
+    mSettingsDialog = NULL;
+    mSettingsDialogList = NULL;
+    mSettingsDialogHeading = NULL;
+
+    mSliderSettingsDialog = NULL;
+    mSliderSettingsDialogHeading = NULL;
+    mSettingsSlider = NULL;
 }
 
 
@@ -796,7 +618,9 @@
 
             // Adjust position and show the dialog.
             mSettingsDialog->setPreferredPos(getDialogPosition(), HbPopup::BottomRightCorner);
+            mSettingsDialog->setAttribute(Qt::WA_DeleteOnClose, true);
             mSettingsDialog->show();
+
         }
     } else {
         launchNotSupportedNotification();
@@ -907,7 +731,9 @@
             // Adjust position and show the dialog.
             mSliderSettingsDialog->setFrameType(HbPopup::Weak);
             mSliderSettingsDialog->setPreferredPos(getDialogPosition(), HbPopup::BottomRightCorner);
+            mSliderSettingsDialog->setAttribute(Qt::WA_DeleteOnClose, true);
             mSliderSettingsDialog->show();
+
         }
     } else {
         launchNotSupportedNotification();
@@ -916,32 +742,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-void CxuiPrecaptureView::launchPhotosApp()
-{
-    QProcess::startDetached(PhotosAppExe);
-}
-
-/*!
- * Launching Videos application as a separate process
- */
-void CxuiPrecaptureView::launchVideosApp()
-{
-    //Releasing cameda device in order to free
-    //graphical memory
-    releaseCamera();
-    QProcess::startDetached(VideosAppExe);
-}
-
-/*!
-* Show "not supported" notification.
-*/
-void CxuiPrecaptureView::launchNotSupportedNotification()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    HbNotificationDialog::launchDialog("Notification", "Not supported yet");
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 /*!
 * Show "Disk full" notification.
 */
@@ -1015,50 +815,6 @@
 }
 
 /*!
-* Adding zoom buttons to the slider
-* \param slider Pointer to the slider object, where the buttons will be added
-*/
-void CxuiPrecaptureView::addIncreaseDecreaseButtons(CxuiZoomSlider *slider)
-{
-    // get current slider elements
-    QList<QVariant> elements = slider->sliderElements();
-
-    // add increase and decrease elements to the slider
-    elements << HbSlider::IncreaseElement << HbSlider::DecreaseElement;
-    slider->setSliderElements(elements);
-
-    // set icons for the increase and decrease element
-    slider->setElementIcon(HbSlider::DecreaseElement , HbIcon("qtg_mono_minus"));
-    slider->setElementIcon(HbSlider::IncreaseElement , HbIcon("qtg_mono_plus"));
-}
-
-
-/*!
-* Function can be used to create a graphics item and setting it as a background
-* item for HbWidget. graphicName refers to system wide graphic name. Given graphic
-* can consist of one, three or nine pieces. Nine piece graphics are used by default.
-* See HbFrameDrawer documentation for graphic naming.
-*/
-void CxuiPrecaptureView::createWidgetBackgroundGraphic(HbWidget *widget,
-                                                       const QString &graphicName,
-                                                       HbFrameDrawer::FrameType frameType)
-{
-    if (widget) {
-        HbFrameDrawer *drawer = new HbFrameDrawer(graphicName, frameType);
-
-        if (drawer) {
-            HbFrameItem *backgroundItem = new HbFrameItem(drawer, widget);
-            if (backgroundItem) {
-                // set item to fill the whole widget
-                backgroundItem->setGeometry(QRectF(QPointF(0, 0), widget->size()));
-                backgroundItem->setZValue(0);
-                widget->setBackgroundItem(backgroundItem);
-            }
-        }
-    }
-}
-
-/*!
 * Returns dialogs bottom right corner
 */
 QPointF CxuiPrecaptureView::getDialogPosition()
--- a/camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -49,13 +49,9 @@
 * Constructor
 */
 CxuiSceneModeView::CxuiSceneModeView(QGraphicsItem *parent) :
-    HbView(parent),
-    mMainWindow(NULL),
+    CxuiView(parent),
     mSettingsInfo(NULL),
-    mEngine(NULL),
-    mDocumentLoader(NULL),
-    mCaptureKeyHandler(NULL),
-	mScenesBackground(NULL)
+    mScenesBackground(NULL)
 {
     CX_DEBUG_IN_FUNCTION();
 }
@@ -83,17 +79,15 @@
                                CxuiCaptureKeyHandler *keyHandler)
 {
     CX_DEBUG_ENTER_FUNCTION();
+    CxuiView::construct(mainwindow, engine, documentLoader, keyHandler);
 
-    mMainWindow = mainwindow;
-    mDocumentLoader = documentLoader;
-    mCaptureKeyHandler = keyHandler;
-    mEngine = engine;
     mSettingsInfo = new CxuiSettingsInfo(mEngine);
     setContentFullScreen(true);
     loadDefaultWidgets();
 
-    mCameraReleaseTimer.setInterval(CXUI_SCENES_CAMERA_TIMEOUT);    
-    connect(&mCameraReleaseTimer, SIGNAL(timeout()), this, SLOT(releaseCameraHw()), Qt::UniqueConnection);
+    mCameraReleaseTimer.setInterval(CXUI_SCENES_CAMERA_TIMEOUT);
+    mCameraReleaseTimer.setSingleShot(true);
+    connect(&mCameraReleaseTimer, SIGNAL(timeout()), this, SLOT(releaseCamera()), Qt::UniqueConnection);
 
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -130,6 +124,10 @@
 
     createWidgetBackgroundGraphic(mScenesContainer, TRANSPARENT_BACKGROUND_GRAPHIC);
 
+    //!@todo: View flags property is missing from HbView,
+    //        so can't properly hide title bar / status bar there.
+    hideControls();
+
     connectSignals();
 
     CX_DEBUG_EXIT_FUNCTION();
@@ -145,31 +143,6 @@
 }
 
 /*!
-* Function can be used to create a graphics item and setting it as a background
-* item for HbWidget. graphicName refers to system wide graphic name. Given graphic
-* can consist of one, three or nine pieces. Nine piece graphics are used by default.
-* See HbFrameDrawer documentation for graphic naming.
-*/
-void CxuiSceneModeView::createWidgetBackgroundGraphic(HbWidget *widget,
-                                                       const QString &graphicName,
-                                                       HbFrameDrawer::FrameType frameType)
-{
-    if (widget) {
-        HbFrameDrawer *drawer = new HbFrameDrawer(graphicName, frameType);
-
-        if (drawer) {
-            HbFrameItem *backgroundItem = new HbFrameItem(drawer, widget);
-            if (backgroundItem) {
-                // set item to fill the whole widget
-                backgroundItem->setGeometry(QRectF(QPointF(0, 0), widget->size()));
-                backgroundItem->setZValue(0);
-                widget->setBackgroundItem(backgroundItem);
-            }
-        }
-    }
-}
-
-/*!
 * This public method assumes that the view is already properly constructed
 */
 void CxuiSceneModeView::loadBackgroundImages()
@@ -302,6 +275,15 @@
 }
 
 /*!
+* Allow showing UI controls?
+* Title bar and other UI chrome is never shown in scene mode view.
+*/
+bool CxuiSceneModeView::allowShowControls() const
+{
+    return false;
+}
+
+/*!
 * Slot to handle capture key full press.
 */
 void CxuiSceneModeView::handleCaptureKeyPressed()
@@ -335,16 +317,5 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-/*!
-* Slot to handle camera hw release timeout
-*/
-void CxuiSceneModeView::releaseCameraHw()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    mCameraReleaseTimer.stop();
-    mEngine->cameraDeviceControl().release();
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 // end of file
 
--- a/camerauis/cameraxui/cxui/src/cxuiselftimer.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiselftimer.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -128,6 +128,14 @@
     return mTimer.isActive();
 }
 
+/*!
+   Returns current timeout value of selftimer.
+ */
+int CxuiSelfTimer::getTimeout() const
+{
+    return mDelay;
+}
+
 /*! Slot for canceling the selftimer.
     Disables selftimer, sets back the postcapturetimeout if it
     has been changed by selftimer and emits signal to notify interested
--- a/camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlist.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlist.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -67,10 +67,35 @@
 
         setSettingId(data->mSettingId);
         setListBoxType(data->mListboxType);
+
+        initOriginalSelectedItem();
+        // ensure that currently selected item is visible
+        scrollTo(currentIndex());
     }
 
 }
 
+/*!
+ * Sets the original selection of list by value. Can be used to override value read from
+ * CxeSettings or used to remember previously selected value in case of setting that is
+ * not read from CxeSettings (e.g. selftimer)
+ */
+void CxuiSettingRadioButtonList::setOriginalSelectedItemByValue(const QVariant &value)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    int index = mSettingValues.indexOf(QVariant(value));
+    if (index >= 0) {
+        mOriginalIndex = index;
+        setSelected(index);
+        // ensure that currently selected item is visible
+        scrollTo(currentIndex());
+    } else {
+        CX_DEBUG(("Value %s not found", value.toString().toAscii().data()));
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
 void CxuiSettingRadioButtonList::setItems(const QStringList &values)
 {
     mListModel->setItems(values);
@@ -102,19 +127,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-void CxuiSettingRadioButtonList::showEvent(QShowEvent *event)
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    initOriginalSelectedItem();
-    // ensure that currently selected item is visible
-    scrollTo(currentIndex());
-    QGraphicsWidget::showEvent(event);
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
-
 /*!
 *  Get the value currently active in settings.
 */
--- a/camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlistmodel.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuisettingradiobuttonlistmodel.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -19,6 +19,7 @@
 
 #include "cxutils.h" // debug
 #include "cxuienums.h"
+#include "cxuisettingsinfo.h"
 #include "cxuisettingradiobuttonlist.h"
 #include "cxuisettingradiobuttonlistmodel.h"
 
@@ -79,10 +80,12 @@
             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is TwoLineListBox"));
             // two line list box
             // get the two strings
-            QStringList lines = setting.split(",");
-            QString first = lines[0];
-            QString second = lines[1];
-            list << first << second ;
+            QStringList lines = setting.split(CxUiSettings::NEW_LINE_CHAR);
+            // Split returns always atleast a single element list.
+            list << lines[0];
+            if (lines.size() > 1) {
+                list << lines[1];
+            }
         } else {
             CX_DEBUG(("CxuiSettingRadioButtonListModel: Listbox type is SingleLine"));
             list << setting;
--- a/camerauis/cameraxui/cxui/src/cxuisettingsinfo.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuisettingsinfo.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -18,6 +18,7 @@
 #include <QSize>
 #include <QMetaType>
 #include <QVariant>
+#include <hbparameterlengthlimiter.h>
 
 #include "cxutils.h"
 #include "cxuienums.h"
@@ -206,30 +207,31 @@
     int index = 0;
 
     // get the localized possible strings for each image quality setting
-    QString vga = hbTrId("txt_cam_dblist_vga");
-    QString normal = hbTrId("txt_cam_dblist_ln_mpix");
-    QString imagesLeft = hbTrId("txt_cam_dblist_hd_720p_val_ln_images_left");
-    QString widescreen = hbTrId("txt_cam_dblist_ln_mpix_widescreen");
+    QString vga = "txt_cam_dblist_vga";
+    QString normal = "txt_cam_dblist_l1_mpix";
+    QString imagesLeft = "txt_cam_dblist_hd_720p_val_ln_images_left";
+    QString widescreen = "txt_cam_dblist_l1_mpix_widescreen";
 
     foreach(CxeImageDetails quality, list) {
         // mapping the right value for each quality
 
         QString settingString;
         QString qualityIcon = "";
+        qreal pxCount = quality.mMpxCount.toDouble();
 
         if (quality.mWidth == KResVGA.width() && quality.mHeight == KResVGA.height()) {
-            settingString.append(vga);
+            settingString.append(hbTrId(vga.toAscii().constData()));
             settingString.append(" ");
         }
 
         if (quality.mAspectRatio == Cxe::AspectRatio16to9) {
-            settingString.append(widescreen.arg(quality.mMpxCount));
+             settingString.append(hbTrId(widescreen.toAscii().constData()).arg(pxCount,0,'g',3));
         } else {
-            settingString.append(normal.arg(quality.mMpxCount));
+            settingString.append(hbTrId(normal.toAscii().constData()).arg(pxCount,0,'g',3));
         }
 
-        settingString.append(",");
-        settingString.append(imagesLeft.arg(quality.mPossibleImages));
+        settingString.append(NEW_LINE_CHAR);
+        settingString.append(HbParameterLengthLimiter(imagesLeft.toAscii().constData(), quality.mPossibleImages));
         CX_DEBUG(( "Image quality setting string: %s", settingString.toAscii().constData()));
 
         if (quality.mMpxCount == "12") {
@@ -304,7 +306,7 @@
             qualityIcon = "qtg_mono_vga_wide";
         }
 
-        settingString.append(",");
+        settingString.append(NEW_LINE_CHAR);
         time.sprintf("%02d:%02d", quality.mRemainingTime / 60, quality.mRemainingTime % 60);
         settingString.append(timeleft.arg(time));
 
--- a/camerauis/cameraxui/cxui/src/cxuisettingxmlreader.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuisettingxmlreader.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -18,6 +18,7 @@
 #include <QPair>
 #include <QtXml>
 #include <QFile>
+#include <hbparameterlengthlimiter.h>
 
 
 #include "cxutils.h"
@@ -34,7 +35,8 @@
     static const char *TAG_SETTING_LIST                   = "setting_list";
     static const char *TAG_SETTING_SLIDER                 = "setting_slider";
     static const char *TAG_ITEM                           = "item";
-    static const char *TAG_ITEM_VARIANT                   = "lnItem";
+    static const char *TAG_ITEM_VARIANT_LN                = "lnItem";
+    static const char *TAG_ITEM_VARIANT_L1                = "l1Item";
     static const char *TAG_SETUP                          = "setup";
 
     static const char *ATTRIBUTE_ID                       = "id";
@@ -47,6 +49,7 @@
     static const char *ATTRIBUTE_VALUE                    = "value";
     static const char *ATTRIBUTE_LOCALIZATION_ID          = "string";
     static const char *ATTRIBUTE_LOCALIZATION_ID_LN_VALUE = "lnValue";
+    static const char *ATTRIBUTE_LOCALIZATION_ID_L1_VALUE = "l1Value";
 
     static const char *ATTRIBUTE_SLIDER_MIN               = "min";
     static const char *ATTRIBUTE_SLIDER_MAX               = "max";
@@ -310,18 +313,26 @@
             value.setValue(string);
         }
 
-
         // get the string text id from the xml, and format based on type.
         string = e.attribute(ATTRIBUTE_LOCALIZATION_ID);
         if (e.tagName() == TAG_ITEM) {
-            // get the localizable string from the hbtrid
+            // string without parameters: get localised string
             string = hbTrId(string.toAscii().constData());
-        } else if (e.tagName() == TAG_ITEM_VARIANT) {
+            CX_DEBUG(("tag name <%s>", e.tagName().toAscii().constData()));
+        } else if (e.tagName() == TAG_ITEM_VARIANT_L1) {
+            // string with numeric parameter: get localised string and add numeric parameter
+            QString l1Value = e.attribute(ATTRIBUTE_LOCALIZATION_ID_L1_VALUE);
+            string = hbTrId(string.toAscii().constData()).arg(l1Value.toInt());
+            CX_DEBUG(("tag name <%s>", e.tagName().toAscii().constData()));
+            CX_DEBUG(("attribute [%s] value[%s]", ATTRIBUTE_LOCALIZATION_ID_L1_VALUE,
+                     string.toAscii().constData()));
+        } else if (e.tagName() == TAG_ITEM_VARIANT_LN) {
             QString lnValue = e.attribute(ATTRIBUTE_LOCALIZATION_ID_LN_VALUE);
-            // format the setting string
-            string = hbTrId(string.toAscii().constData(), lnValue.toInt());
+            // string with count parameter: get localised string and add plural form numeric parameter
+            string = HbParameterLengthLimiter(string.toAscii().constData(), lnValue.toInt());
+            CX_DEBUG(("tag name <%s>", e.tagName().toAscii().constData()));
+            CX_DEBUG(("attribute [%s] value[%s]", ATTRIBUTE_LOCALIZATION_ID_LN_VALUE, string.toAscii().constData()));
         }
-        CX_DEBUG(("attribute [%s] value[%s]", ATTRIBUTE_LOCALIZATION_ID, string.toAscii().constData()));
 
         if (!string.isNull()) {
             CxUiSettings::SettingItem setting;
@@ -382,14 +393,14 @@
         stepString = e.attribute(ATTRIBUTE_SLIDER_MAJOR_STEP);
         p->mMajorStep = stepString.toReal();
 
-        // get the ln value from xml to generate strings for slider
-        QString lnValue = e.attribute(ATTRIBUTE_LOCALIZATION_ID_LN_VALUE);
+        // get the l1 value from xml to generate strings for slider
+        QString l1Value = e.attribute(ATTRIBUTE_LOCALIZATION_ID_L1_VALUE);
 
         // Don't create labels for slider if no strings are defined in settinsg xml
         // Create labels only for major ticks
         if (!minString.isEmpty() && !maxString.isEmpty()) {
             qreal step = p->mMajorStep;
-            qreal value = lnValue.toDouble();
+            qreal value = l1Value.toDouble();
             // generating all negative valued strings for slider setting
             while (value > 0) {
                 // format the setting string
@@ -401,7 +412,7 @@
             // generating all non-negative valued strings for slider setting
             step = p->mMajorStep;
             value = 0;
-            while(value <= lnValue.toInt()) {
+            while(value <= l1Value.toInt()) {
                 // format the setting string
                 QString str = hbTrId(maxString.toAscii().constData()).arg(value,0,'f',1);
                 p->mSettingStrings.append(str);
@@ -409,8 +420,8 @@
             }
         }
 
-        int min = -lnValue.toInt();
-        int max = lnValue.toInt();
+        int min = -l1Value.toInt();
+        int max = l1Value.toInt();
 
         p->mRange = qMakePair(min, max);
     }
--- a/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -173,7 +173,7 @@
     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_ZOOM_SLIDER);
     mSlider = qobject_cast<CxuiZoomSlider *>(widget);
     CX_DEBUG_ASSERT(mSlider);
-    addIncreaseDecreaseButtons(mSlider);
+    mSlider->addZoomButtons();
     createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC);
 
     if (mSelfTimer) {
@@ -196,8 +196,8 @@
     connect(startButton, SIGNAL(released()), this, SLOT(hideControls()));
 
     widget = mDocumentLoader->findWidget(STILL_PRE_CAPTURE_TOOLBAR);
-    mToolBar = qobject_cast<HbToolBar *>(widget);
-    CX_DEBUG_ASSERT(mToolBar);
+    mToolbar = qobject_cast<HbToolBar *>(widget);
+    CX_DEBUG_ASSERT(mToolbar);
 
     object = mDocumentLoader->findObject(STILL_PRE_CAPTURE_FLASH_ACTION);
     mFlashSetting = qobject_cast<HbAction *>(object);
@@ -299,18 +299,10 @@
         mSettingsGrid->addAction(HbIcon("qtg_mono_face_tracking"), hbTrId("txt_cam_button_face_tracking"), this, SLOT(launchNotSupportedNotification()));
         action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE);
 
-        connect(mKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close()));
+        connect(mCaptureKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close()));
     }
 }
 
-void CxuiStillPrecaptureView::launchSceneModesPopup()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    hideControls();
-    emit showScenesView();
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 
 void CxuiStillPrecaptureView::handleSnapshot(CxeError::Id error)
 {
@@ -462,24 +454,6 @@
 }
 
 
-void CxuiStillPrecaptureView::updateOrientation(Qt::Orientation orientation)
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    hideControls();
-    mMainWindow->setOrientation(orientation);
-
-    if (orientation == Qt::Horizontal) {
-        CX_DEBUG(("New screen orientation is horizontal"));
-        mToolBar->setOrientation(Qt::Vertical);
-    } else {
-        CX_DEBUG(("New screen orientation is vertical"));
-        mToolBar->setOrientation(Qt::Horizontal);
-    }
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 /*!
 * Handle capture key full press.
 */
@@ -593,21 +567,30 @@
     // in post-capture view, we need to start auto-focusing when entering
     // the still precapture view.
     if (event->type() == QEvent::Show &&
-            mKeyHandler && mKeyHandler->isAutofocusKeyPressed()) {
+            mCaptureKeyHandler && mCaptureKeyHandler->isAutofocusKeyPressed()) {
 
         CX_DEBUG(("Still pre-capture coming visible and auto-focus key pressed -> starting AF"));
         handleAutofocusKeyPressed();
     }
 }
 
-void CxuiStillPrecaptureView::showToolbar()
+/*!
+* Allow showing UI controls?
+*/
+bool CxuiStillPrecaptureView::allowShowControls() const
 {
-    if (mEngine && mEngine->isEngineReady()) {
-        CxuiPrecaptureView::showToolbar();
-    }
+    // show controls when selftimer counter is not active
+    // and when autofocus key is not being pressed
+    bool engineOk(mEngine && mEngine->isEngineReady());
+    bool selfTimerOk(!mSelfTimer || !mSelfTimer->isOngoing());
+    bool keysOk(!mCaptureKeyHandler || !mCaptureKeyHandler->isAutofocusKeyPressed());
+
+    return engineOk && selfTimerOk && keysOk;
 }
 
-
+/*!
+* Handle change in viewfinder state.
+*/
 void CxuiStillPrecaptureView::handleViewfinderStateChanged(
     CxeViewfinderControl::State newState, CxeError::Id /*error*/)
 {
@@ -622,7 +605,7 @@
         }
 
         if(mMainWindow->currentView() == this &&
-            mKeyHandler->isAutofocusKeyPressed()) {
+            mCaptureKeyHandler->isAutofocusKeyPressed()) {
             // Viewfinder just started and the user is pressing the auto-focus key.
             // Start focusing.
 
@@ -654,17 +637,6 @@
     mCapturePending = false;
 }
 
-void CxuiStillPrecaptureView::showControls()
-{
-    // show controls when selftimer counter is not active
-    // and when autofocus key is not being pressed
-    if ( !(mSelfTimer && mSelfTimer->isOngoing())  &&
-         (!mKeyHandler || !mKeyHandler->isAutofocusKeyPressed()) ) {
-        CxuiPrecaptureView::showControls();
-    }
-
-}
-
 /*!
 * Slot to handle application being sent to background.
 */
@@ -684,13 +656,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-void CxuiStillPrecaptureView::handleFocusGained()
-{
-    CX_DEBUG_ENTER_FUNCTION();
-    CxuiPrecaptureView::handleFocusGained();
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 /*
     Slot for handling scene mode change
     \param scene QVariantMap containing settings related to the new scene mode
@@ -792,6 +757,10 @@
         launchSettingsDialog(action);
         // special case to get value changed event to the selftimer class
         if (settingsKey == CxeSettingIds::SELF_TIMER) {
+            // if selftimer is active remember the previously selected value
+            if (mSelfTimer->isEnabled()) {
+                mSettingsDialogList->setOriginalSelectedItemByValue(mSelfTimer->getTimeout());
+            }
             connect(mSettingsDialogList, SIGNAL(valueSelected(int)),
                     mSelfTimer, SLOT(changeTimeOut(int)));
         }
--- a/camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -75,9 +75,9 @@
     mRemainingTimeText(NULL),
     mRecordingIcon(NULL),
     mGoToStillAction(NULL),
-    mToolBarIdle(NULL),
-    mToolBarRec(NULL),
-    mToolBarPaused(NULL),
+    mToolbarIdle(NULL),
+    mToolbarRec(NULL),
+    mToolbarPaused(NULL),
     mVideoScenePopup(NULL),
     mVideoCaptureControl(NULL),
     mMenu(NULL),
@@ -101,7 +101,7 @@
     CX_DEBUG_ENTER_FUNCTION();
 
     CxuiPrecaptureView::construct(mainwindow, engine, documentLoader, keyHandler);
-    mKeyHandler = keyHandler;
+    mCaptureKeyHandler = keyHandler;
 
     mVideoCaptureControl = &(engine->videoCaptureControl());
 
@@ -187,21 +187,21 @@
     CX_DEBUG_ASSERT(mSlider);
 
     //Let's add a plus and minus buttons to the slider
-    addIncreaseDecreaseButtons(mSlider);
+    mSlider->addZoomButtons();
     createWidgetBackgroundGraphic(mSlider, TRANSPARENT_BACKGROUND_GRAPHIC);
 
     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_TOOLBAR);
-    mToolBarIdle = qobject_cast<HbToolBar *> (widget);
+    mToolbarIdle = qobject_cast<HbToolBar *> (widget);
     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_TOOLBAR_REC);
-    mToolBarRec = qobject_cast<HbToolBar *> (widget);
+    mToolbarRec = qobject_cast<HbToolBar *> (widget);
     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_TOOLBAR_PAUSED);
-    mToolBarPaused = qobject_cast<HbToolBar *> (widget);
+    mToolbarPaused = qobject_cast<HbToolBar *> (widget);
 
-    mToolBar = mToolBarIdle;
+    mToolbar = mToolbarIdle;
 
-    CX_DEBUG_ASSERT(mToolBarIdle);
-    CX_DEBUG_ASSERT(mToolBarRec);
-    CX_DEBUG_ASSERT(mToolBarPaused);
+    CX_DEBUG_ASSERT(mToolbarIdle);
+    CX_DEBUG_ASSERT(mToolbarRec);
+    CX_DEBUG_ASSERT(mToolbarPaused);
 
     hideControls();
 
@@ -300,7 +300,7 @@
         action->setProperty(PROPERTY_KEY_SETTING_ID, CxeSettingIds::WHITE_BALANCE);
         action->setProperty(PROPERTY_KEY_SETTING_GRID, PROPERTY_KEY_TRUE);
 
-        connect(mKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close()));
+        connect(mCaptureKeyHandler, SIGNAL(autofocusKeyPressed()), mSettingsGrid, SLOT(close()));
     }
 }
 
@@ -356,6 +356,23 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
+
+/*!
+* Allow showing UI controls?
+*/
+bool CxuiVideoPrecaptureView::allowShowControls() const
+{
+    bool show(false);
+    if (mEngine) {
+        CxeVideoCaptureControl::State state(mEngine->videoCaptureControl().state());
+
+        show = (mEngine->isEngineReady()
+             || state == CxeVideoCaptureControl::Recording
+             || state == CxeVideoCaptureControl::Paused);
+    }
+    return show;
+}
+
 // CxuiPrecaptureView::showToolbar()
 // Shows toolbar. Calls the base class implementation if not recording
 // since toolbar is not shown during recording
@@ -363,19 +380,19 @@
 {
     CxeVideoCaptureControl::State state = mVideoCaptureControl->state();
     if (state == CxeVideoCaptureControl::Recording) {
-        if (mToolBar != mToolBarRec) {
-            mToolBar->hide();
-            mToolBar = mToolBarRec;
+        if (mToolbar != mToolbarRec) {
+            mToolbar->hide();
+            mToolbar = mToolbarRec;
         }
     } else if (state ==CxeVideoCaptureControl::Ready) {
-        if (mToolBar != mToolBarIdle) {
-            mToolBar->hide();
-            mToolBar = mToolBarIdle;
+        if (mToolbar != mToolbarIdle) {
+            mToolbar->hide();
+            mToolbar = mToolbarIdle;
         }
     } else if (state == CxeVideoCaptureControl::Paused) {
-        if (mToolBar != mToolBarPaused) {
-            mToolBar->hide();
-            mToolBar = mToolBarPaused;
+        if (mToolbar != mToolbarPaused) {
+            mToolbar->hide();
+            mToolbar = mToolbarPaused;
         }
     }
 
@@ -564,14 +581,9 @@
         break;
     case CxeVideoCaptureControl::Paused:
         mElapsedTimer.stop();
-
         if (mDocumentLoader){
             mDocumentLoader->load(VIDEO_1ST_XML, VIDEO_PRE_CAPTURE_PAUSED);
         }
-
-        if (mRecordingAnimation && mRecordingIcon) {
-            mRecordingAnimation->stop();
-        }
         showControls();
         enableFeedback();
         mPauseTimer.start();
@@ -603,6 +615,9 @@
                     this, SLOT(prepareNewVideo(CxeError::Id)));
         }
         break;
+    case CxeVideoCaptureControl::PlayingStartSound:
+        // don't change anything
+        break;
     default:
         // in any other state, just hide the controls
         setRecordingItemsVisibility(false);
@@ -612,24 +627,6 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
-void CxuiVideoPrecaptureView::updateOrientation(Qt::Orientation orientation)
-{
-    CX_DEBUG_ENTER_FUNCTION();
-
-    hideControls();
-    mMainWindow->setOrientation(orientation);
-
-    if (mToolBar) {
-        if (orientation == Qt::Horizontal) {
-            mToolBar->setOrientation(Qt::Vertical);
-        } else {
-            mToolBar->setOrientation(Qt::Horizontal);
-        }
-    }
-
-    CX_DEBUG_EXIT_FUNCTION();
-}
-
 void CxuiVideoPrecaptureView::handleCaptureKeyPressed()
 {
     CX_DEBUG_ENTER_FUNCTION();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/src/cxuiview.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -0,0 +1,360 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QGraphicsItem>
+#include <QProcess>
+#include <hbtoolbar.h>
+#include <hbnotificationdialog.h>
+#include <hbframeitem.h>
+#include "cxuiview.h"
+#include "cxutils.h"
+#include "cxeengine.h"
+#include "cxuidocumentloader.h"
+#include "cxuicapturekeyhandler.h"
+#include "cxecameradevicecontrol.h"
+#include "cxevideocapturecontrol.h"
+#include "cxuizoomslider.h"
+#include "cxezoomcontrol.h"
+
+// CONSTANTS
+const QString PhotosAppExe = "photos.exe";
+const QString VideosAppExe = "videoplayer.exe";
+
+/*!
+* Constructor
+*/
+CxuiView::CxuiView(QGraphicsItem *parent) :
+        HbView(parent),
+        mMainWindow(NULL),
+        mEngine(NULL),
+        mDocumentLoader(NULL),
+        mSlider(NULL),
+        mToolbar(NULL),
+        mIndicators(NULL),
+        mHideControlsTimeout(this)
+{
+    CX_DEBUG_IN_FUNCTION();
+}
+
+/*!
+* Destructor
+*/
+CxuiView::~CxuiView()
+{
+    CX_DEBUG_IN_FUNCTION();
+}
+
+/*!
+* CxuiView::construct
+*/
+void CxuiView::construct(HbMainWindow *mainWindow, CxeEngine *engine,
+                         CxuiDocumentLoader *documentLoader,
+                         CxuiCaptureKeyHandler * keyHandler)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    //Minimum requirements to construct the view
+    CX_ASSERT_ALWAYS(mainWindow);
+    CX_ASSERT_ALWAYS(engine);
+    CX_ASSERT_ALWAYS(documentLoader);
+
+    mMainWindow = mainWindow;
+    mDocumentLoader = documentLoader;
+    mCaptureKeyHandler = keyHandler;
+    mEngine = engine;
+
+    // adjust the timer, and connect it to correct slot
+    connect(&mHideControlsTimeout, SIGNAL(timeout()), this, SLOT(hideControls()));
+    mHideControlsTimeout.setSingleShot(true);
+    mHideControlsTimeout.setInterval(CXUI_HIDE_CONTROLS_TIMEOUT);
+}
+
+/*!
+* CxuiView::updateOrientation
+*/
+void CxuiView::updateOrientation(Qt::Orientation orientation)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    hideControls();
+    mMainWindow->setOrientation(orientation);
+
+    if (mToolbar) {
+        if (orientation == Qt::Horizontal) {
+            mToolbar->setOrientation(Qt::Vertical);
+        } else {
+            mToolbar->setOrientation(Qt::Horizontal);
+        }
+    }
+
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+* Allow showing UI controls?
+* Default behaviour is that controls can be shown at any time.
+*/
+bool CxuiView::allowShowControls() const
+{
+    return true;
+}
+
+/*!
+* Toggle visibility of UI controls.
+*/
+void CxuiView::toggleControls()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    if (mControlsVisible) {
+        hideControls();
+    } else {
+        showControls();
+    }
+
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+* CxuiView::launchNotSupportedNotification
+* Show "not supported" notification.
+*/
+void CxuiView::launchNotSupportedNotification()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    HbNotificationDialog::launchDialog("Notification", "Not supported yet");
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::launchScenesView
+ */
+void CxuiView::launchScenesView()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    hideControls();
+    emit showScenesView();
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::launchPhotosApp
+ */
+void CxuiView::launchPhotosApp()
+{
+    QProcess::startDetached(PhotosAppExe);
+}
+
+/*!
+ * CxuiView::launchVideosApp
+ * Launching Videos application as a separate process
+ */
+void CxuiView::launchVideosApp()
+{
+    //Releasing cameda device in order to free
+    //graphical memory
+    releaseCamera();
+    QProcess::startDetached(VideosAppExe);
+}
+
+/*!
+ * Releasing camera hw
+ */
+void CxuiView::releaseCamera()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    mEngine->cameraDeviceControl().release();
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::hideControls
+ */
+void CxuiView::hideControls()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    if (mHideControlsTimeout.isActive()) {
+        mHideControlsTimeout.stop();
+    }
+
+    // Hide title bar and status bar.
+    //!@todo: View flags property is missing from HbView, so can't set these in DocML.
+    HbView::HbViewFlags flags(HbView::ViewTitleBarTransparent
+                            | HbView::ViewTitleBarFloating
+                            | HbView::ViewTitleBarHidden
+                            | HbView::ViewStatusBarTransparent
+                            | HbView::ViewStatusBarFloating
+                            | HbView::ViewStatusBarHidden);
+    setViewFlags(flags);
+    //!@todo: Once the flags are defined in DocML, we can just use these convenience functions
+    //        to hide the title bar and status bar here.
+    //setTitleBarVisible(false);
+    //setStatusBarVisible(false);
+
+    hideZoom();
+
+    hideToolbar();
+
+    // show indicators when controls are hidden
+    showIndicators();
+
+    mControlsVisible = false;
+
+    // give the keyboard focus back to the view
+    // for the view to receive key events
+    setFocus();
+
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::showControls
+ */
+void CxuiView::showControls()
+{
+    if (allowShowControls()) {
+        // show toolbar
+        showToolbar();
+
+        // show zoom
+        showZoom();
+
+        // show title bar and status bar
+        setTitleBarVisible(true);
+        setStatusBarVisible(true);
+
+        // hide indicators when controls are shown
+        hideIndicators();
+
+        mHideControlsTimeout.start();
+        mControlsVisible = true;
+    }
+}
+
+/*!
+ * CxuiView::hideToolbar
+ */
+void CxuiView::hideToolbar()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    if (mToolbar) {
+        mToolbar->hide();
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::showToolbar
+ */
+void CxuiView::showToolbar()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    if (mToolbar) {
+        mToolbar->show();
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+ * CxuiView::hideIndicators
+ */
+void CxuiView::hideIndicators()
+{
+    if (mIndicators) {
+        mIndicators->hide();
+    }
+}
+
+/*!
+ * CxuiView::showIndicators
+ */
+void CxuiView::showIndicators()
+{
+    if (mIndicators) {
+        mIndicators->show();
+    }
+}
+
+/*!
+ * CxuiView::hideZoom
+ */
+void CxuiView::hideZoom()
+{
+    if (mSlider) {
+        mSlider->hide();
+    }
+    mZoomVisible = false;
+}
+
+/*!
+ * CxuiView::showZoom
+ */
+void CxuiView::showZoom()
+{
+    CX_DEBUG_ENTER_FUNCTION();
+    if (mSlider) {
+
+        // if maxVal has not been set yet, ask for new parameters from engine
+        if (mSlider->maximum() <= 0) {
+
+            // get the zoom range
+            int min = mEngine->zoomControl().min();
+            int max = mEngine->zoomControl().max();
+
+            // only change values if they are acceptable and have changed
+            if ((max - min > 0) && ((mSlider->maximum() != max) || (mSlider->minimum() != min))) {
+                mSlider->setRange(min, max);
+            }
+        }
+
+        // show zoom only if the slider has acceptable value
+        if (mSlider->maximum() > 0) {
+            mSlider->show();
+        }
+    }
+
+    mZoomVisible = true;
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
+* Function can be used to create a graphics item and setting it as a background
+* item for HbWidget. graphicName refers to system wide graphic name. Given graphic
+* can consist of one, three or nine pieces. Nine piece graphics are used by default.
+* See HbFrameDrawer documentation for graphic naming.
+*/
+void CxuiView::createWidgetBackgroundGraphic(HbWidget *widget,
+                                                       const QString &graphicName,
+                                                       HbFrameDrawer::FrameType frameType)
+{
+    if (widget) {
+        HbFrameDrawer *drawer = new HbFrameDrawer(graphicName, frameType);
+
+        if (drawer) {
+            HbFrameItem *backgroundItem = new HbFrameItem(drawer, widget);
+            if (backgroundItem) {
+                // set item to fill the whole widget
+                backgroundItem->setGeometry(QRectF(QPointF(0, 0), widget->size()));
+                backgroundItem->setZValue(0);
+                widget->setBackgroundItem(backgroundItem);
+            }
+        }
+    }
+}
+
+// End of file
--- a/camerauis/cameraxui/cxui/src/cxuiviewmanager.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiviewmanager.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -587,7 +587,7 @@
     QObject *currentView = mMainWindow.currentView();
     if (currentView == mPostcaptureView) {
         // connecting view manager focus events to pre-capture views
-        connect(this, SIGNAL(focusGained()),  currentView, SLOT(startTimers()), Qt::UniqueConnection);
+        connect(this, SIGNAL(focusGained()),  currentView, SLOT(handleFocusGained()), Qt::UniqueConnection);
         connect(this, SIGNAL(focusLost()),    currentView, SLOT(handleFocusLost()), Qt::UniqueConnection);
         connect(currentView, SIGNAL(changeToPrecaptureView()), mStandbyHandler, SLOT(startTimer()), Qt::UniqueConnection);
 
--- a/camerauis/cameraxui/cxui/src/cxuizoomslider.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuizoomslider.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -55,3 +55,22 @@
     // underneath this slider
     event->accept();
 }
+
+/*!
+* Adding zoom buttons to the slider
+*/
+void CxuiZoomSlider::addZoomButtons()
+{
+    // get current slider elements
+    QList<QVariant> elements = sliderElements();
+
+    // add increase and decrease elements to the slider
+    elements << HbSlider::IncreaseElement << HbSlider::DecreaseElement;
+    setSliderElements(elements);
+
+    // set icons for the increase and decrease element
+    setElementIcon(HbSlider::DecreaseElement , HbIcon("qtg_mono_minus"));
+    setElementIcon(HbSlider::IncreaseElement , HbIcon("qtg_mono_plus"));
+}
+
+//End of file
--- a/camerauis/cameraxui/cxui/src/main.cpp	Thu Jul 15 01:44:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/main.cpp	Thu Jul 15 01:46:05 2010 +0300
@@ -51,6 +51,11 @@
 
     Q_INIT_RESOURCE(cxui);
 
+    // Use software rendering / raster graphics system to save GPU memory.
+    CX_DEBUG(("CxUI: Take raster graphics system into use.."));
+    QApplication::setGraphicsSystem("raster");
+    CX_DEBUG(("CxUI: ..raster graphics system in use"));
+
     OstTrace0( camerax_performance, DUP1__MAIN, "msg: e_CX_HBAPP_CREATION 1" );
     CxuiApplication app(argc, argv);
     OstTrace0( camerax_performance, DUP2__MAIN, "msg: e_CX_HBAPP_CREATION 0" );