Revision: 201017
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 15:40:46 +0300
changeset 24 2094593137f5
parent 21 fa6d9f75d6a6
child 26 651a2e6ebfc3
child 29 699651f2666f
Revision: 201017 Kit: 201019
camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h
camerauis/cameraxui/cxengine/inc/api/cxenamespace.h
camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h
camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h
camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp
camerauis/cameraxui/cxengine/src/cxeenginesymbian.cpp
camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp
camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/tsrc/unit/cxeunitrunner/cxetestrunner.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.pro
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxesettingscenrepstore/unittest_cxesettingscenrepstore.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.h
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.pro
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.h
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.cpp
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.h
camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.pro
camerauis/cameraxui/cxui/inc/cxuienums.h
camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h
camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h
camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h
camerauis/cameraxui/cxui/layouts/errornote_popup.docml
camerauis/cameraxui/cxui/layouts/setting.docml
camerauis/cameraxui/cxui/layouts/setting_scenemode.docml
camerauis/cameraxui/cxui/layouts/setting_slider.docml
camerauis/cameraxui/cxui/layouts/standbymode_popup.docml
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/cxuistillprecaptureview.cpp
camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp
camerauis/cameraxui/cxui/src/main.cpp
--- a/camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/api/cxeautofocuscontrol.h	Fri May 14 15:40:46 2010 +0300
@@ -77,8 +77,9 @@
     
     /**
      * Starts Autofocus.
+     * \param soundEnabled indicates if the auto focus sound should be played
      */
-    virtual CxeError::Id start() = 0;
+    virtual CxeError::Id start(bool soundEnabled = true) = 0;
     
     /**
      * Cancels Autofocus.
@@ -105,6 +106,11 @@
      * Check if Autofocus is Supported or Not.
      */
     virtual bool supported() const = 0;             // true when AF is supported
+    
+    /**
+    * Check if auto focus sound is enabled
+    */
+    virtual bool isSoundEnabled() const = 0;
 
 signals:
     void stateChanged( CxeAutoFocusControl::State newState, CxeError::Id error );
--- a/camerauis/cameraxui/cxengine/inc/api/cxenamespace.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/api/cxenamespace.h	Fri May 14 15:40:46 2010 +0300
@@ -84,9 +84,9 @@
 
     enum Sharpness
     {
-        SharpnessHard = 100,
+        SharpnessHard = 2,
         SharpnessNormal = 0,
-        SharpnessSoft = -100
+        SharpnessSoft = -2
     };
 
     enum LightSensitivity
--- a/camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/cxeautofocuscontrolsymbian.h	Fri May 14 15:40:46 2010 +0300
@@ -44,7 +44,7 @@
     CxeAutoFocusControlSymbian( CxeCameraDevice &cameraDevice );
     virtual ~CxeAutoFocusControlSymbian();
 
-    CxeError::Id  start();
+    CxeError::Id  start(bool soundEnabled = true);
     void cancel();
     void setMode( CxeAutoFocusControl::Mode newMode );
     CxeAutoFocusControl::Mode mode() const;
@@ -52,6 +52,8 @@
     CxeAutoFocusControl::State state() const;
     bool supported() const;
 
+    bool isSoundEnabled() const;
+
 protected: // from CxeStateMachine
     void handleStateChanged( int newStateId, CxeError::Id error );
 
@@ -91,6 +93,7 @@
     CxeAutoFocusControl::Mode mAfMode;
     CCamera::CCameraAdvancedSettings::TFocusRange mAFRange;
     bool mCancelled;
+    bool mSoundEnabled;
     };
 
 #endif // CXEAUTOFOCUSCONTROLSYMBIAN_H
--- a/camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/inc/cxevideocapturecontrolsymbian.h	Fri May 14 15:40:46 2010 +0300
@@ -108,6 +108,8 @@
     void handleCameraEvent(int eventUid, int error);
     // settings call back
     void handleSettingValueChanged(const QString& settingId,QVariant newValue);
+    // scene mode change
+    void handleSceneChanged(CxeScene& scene);
     // Disk space change
     void handleDiskSpaceChanged();
 
--- a/camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxeautofocuscontrolsymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -86,11 +86,14 @@
 
 /*
 * Start Autofocus
+* \param soundEnabled False if the auto focus sound don't need to be played
+* Default value for soundEnabled is true
 */
-CxeError::Id CxeAutoFocusControlSymbian::start()
+CxeError::Id CxeAutoFocusControlSymbian::start(bool soundEnabled)
 {
-    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <> state: %d", state() ) );
-
+    CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <> state: %d, sound enabled: %d",
+               state(), soundEnabled ) );
+    mSoundEnabled = soundEnabled;
     int err = KErrNone;
 
     CX_ASSERT_ALWAYS(mAdvancedSettings);
@@ -106,7 +109,6 @@
     }
 
     CX_DEBUG( ("CxeAutoFocusControlSymbian::start() <= err : %d", err ) );
-
     return CxeErrorHandlingSymbian::map(err);
 }
 
@@ -446,4 +448,13 @@
     CX_DEBUG_EXIT_FUNCTION();
 }
 
+/*!
+  * Public method for checking if auto focus sound is enabled
+  * \return true if enabled
+  */
+bool CxeAutoFocusControlSymbian::isSoundEnabled() const
+{
+    return mSoundEnabled;
+}
+
 // end of file
--- a/camerauis/cameraxui/cxengine/src/cxeenginesymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxeenginesymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -67,7 +67,9 @@
     CX_DEBUG_ENTER_FUNCTION();
 
     // Do secondary construction during reserve call.
-    connect(this, SIGNAL(reserveStarted()), this, SLOT(construct()));
+    //! @todo temporarily commented as part of a hack to change the startup sequence
+    // to avoid GOOM issues
+   // connect(this, SIGNAL(reserveStarted()), this, SLOT(construct()));
 
     CxeCameraDeviceControlSymbian *deviceControl = new CxeCameraDeviceControlSymbian();
     mCameraDeviceControl = deviceControl;
@@ -76,7 +78,10 @@
     CX_ASSERT_ALWAYS(mCameraDevice);
 
     mCameraDeviceControl->init();
-
+    //! @todo calling construct here is a hack to change the startup sequence
+    // to avoid GOOM issues
+    construct();
+    
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -119,6 +124,11 @@
         CX_DEBUG_ASSERT(mSettingsModel);
 
         mSettings = new CxeSettingsImp(*mSettingsModel);
+        
+        //! @todo a temporary hack to change the startup sequence to avoid GOOM problems
+        static_cast<CxeSettingsImp*>(mSettings)->loadSettings(mode());
+        
+        
         // Connect P&S key updates to settings signal.
         connect(settingsStore, SIGNAL(settingValueChanged(long int, unsigned long int, QVariant)),
                 mSettings, SIGNAL(settingValueChanged(long int, unsigned long int, QVariant)));
--- a/camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxesettingsmodelimp.cpp	Fri May 14 15:40:46 2010 +0300
@@ -464,7 +464,7 @@
     vidSceneLowLight.insert(CxeSettingIds::SCENE_ID, CxeSettingIds::VIDEO_SCENE_LOWLIGHT);
     vidSceneLowLight.insert(CxeSettingIds::FOCAL_RANGE, CxeAutoFocusControl::Hyperfocal);
     vidSceneLowLight.insert(CxeSettingIds::WHITE_BALANCE, WhitebalanceAutomatic);
-    vidSceneLowLight.insert(CxeSettingIds::EXPOSURE_MODE, ExposureNight);
+    vidSceneLowLight.insert(CxeSettingIds::EXPOSURE_MODE, ExposureAuto);
     vidSceneLowLight.insert(CxeSettingIds::COLOR_TONE, ColortoneNormal);
     vidSceneLowLight.insert(CxeSettingIds::CONTRAST, 0);
     vidSceneLowLight.insert(CxeSettingIds::FRAME_RATE, 15); //fps
--- a/camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxestillcapturecontrolsymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -907,19 +907,23 @@
 
 /*!
 * Slot to handle Autofocus events.
+* \param newState Indicates current state of the auto focus
+* \param error Contains possible error code
 */
 void CxeStillCaptureControlSymbian::handleAutofocusStateChanged(
                                          CxeAutoFocusControl::State newState,
-                                         CxeError::Id /*error*/ )
+                                         CxeError::Id error )
 {
     CX_DEBUG_ENTER_FUNCTION();
+    Q_UNUSED(error);
     mAfState = newState;
     CxeAutoFocusControl::Mode mode = mAutoFocusControl.mode();
 
     // if focused and in correct mode, play sound
     if  (newState == CxeAutoFocusControl::Ready &&
          mode != CxeAutoFocusControl::Hyperfocal &&
-         mode != CxeAutoFocusControl::Infinity) {
+         mode != CxeAutoFocusControl::Infinity &&
+         mAutoFocusControl.isSoundEnabled()) {
         mAutoFocusSoundPlayer->play();
     }
     CX_DEBUG_EXIT_FUNCTION();
--- a/camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/src/cxevideocapturecontrolsymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -126,6 +126,8 @@
     connect(&mSettings, SIGNAL(settingValueChanged(const QString&,QVariant)),
             this, SLOT(handleSettingValueChanged(const QString&,QVariant)));
 
+    connect(&mSettings, SIGNAL(sceneChanged(CxeScene&)), this, SLOT(handleSceneChanged(CxeScene&)));
+
     OstTrace0(camerax_performance, CXEVIDEOCAPTURECONTROLSYMBIAN_CREATE_M2, "msg: e_CX_ENGINE_CONNECT_SIGNALS 0");
 
     OstTrace0(camerax_performance, CXEVIDEOCAPTURECONTROLSYMBIAN_CREATE_OUT, "msg: e_CX_VIDEOCAPTURECONTROL_NEW 0");
@@ -372,7 +374,6 @@
     CX_DEBUG(("Video resoulution (%d,%d)", mCurrentVideoDetails.mWidth,
                                            mCurrentVideoDetails.mHeight));
     CX_DEBUG(("Video bitrate = %d)", mCurrentVideoDetails.mVideoBitRate));
-    CX_DEBUG(("Video frame rate = %f)", mCurrentVideoDetails.mVideoFrameRate));
 
     OstTrace0(camerax_performance, CXEVIDEOCAPTURECONTROLSYMBIAN_PREPARE, "msg: e_CX_VIDCAPCONT_PREPARE 1");
     TSize frameSize;
@@ -381,10 +382,20 @@
     int muteSetting = 0; // audio enabled
     mSettings.get(CxeSettingIds::VIDEO_MUTE_SETTING, muteSetting);
 
+    // Check if scene defines frame rate.
+    // Use generic frame rate defined in video details, if no value is set in scene.
+    int frameRate = 0;
+    mSettings.get(CxeSettingIds::FRAME_RATE, frameRate);
+    if (frameRate <= 0) {
+        frameRate = mCurrentVideoDetails.mVideoFrameRate;
+    }
+
+    CX_DEBUG(("Video frame rate = %d)", frameRate));
+
     TRAPD(err,
               {
               mVideoRecorder->SetVideoFrameSizeL(frameSize);
-              mVideoRecorder->SetVideoFrameRateL(mCurrentVideoDetails.mVideoFrameRate);
+              mVideoRecorder->SetVideoFrameRateL(frameRate);
               mVideoRecorder->SetVideoBitRateL(mCurrentVideoDetails.mVideoBitRate);
               mVideoRecorder->SetAudioEnabledL(muteSetting == 0);
               // "No limit" value is handled in video recorder wrapper.
@@ -665,6 +676,8 @@
 
     setState(CxeVideoCaptureControl::Paused);
     TRAPD(pauseErr, mVideoRecorder->PauseL());
+    // play the sound, but not changing the state
+    mVideoStopSoundPlayer->play();
     if (pauseErr) {
         CX_DEBUG(("[WARNING] Error %d pausing!", pauseErr));
         //pause operation failed, report it
@@ -1078,7 +1091,8 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    if (state() == CxeVideoCaptureControl::Recording) {
+    if (state() == CxeVideoCaptureControl::Recording ||
+        state() == CxeVideoCaptureControl::Paused) {
         TTimeIntervalMicroSeconds remaining = 0;
         remaining = mVideoRecorder->RecordTimeAvailable();
         time = remaining.Int64() * 1.0 / KOneSecond;
@@ -1175,7 +1189,8 @@
 
     TTimeIntervalMicroSeconds timeElapsed = 0;
     bool ok = false;
-    if (state() == CxeVideoCaptureControl::Recording) {
+    if (state() == CxeVideoCaptureControl::Recording ||
+        state() == CxeVideoCaptureControl::Paused) {
         TRAPD( err, timeElapsed = mVideoRecorder->DurationL() );
         if (!err) {
             time = timeElapsed.Int64() * 1.0 / KOneSecond;
@@ -1232,6 +1247,13 @@
             // mute setting changed, apply the new setting and re-prepare.
             setState(Preparing);
             prepare();
+        } else if (settingId == CxeSettingIds::FRAME_RATE){
+            // Frame rate setting changed. Need to re-prepare if we are prepared already.
+            // Otherwise can wait for next init call.
+            if (state() == Ready) {
+                setState(Preparing);
+                prepare();
+            }
         } else {
             // Setting not relevant to video mode
         }
@@ -1241,6 +1263,26 @@
 }
 
 /*!
+ * Scene mode changed. We need to know about it because frame rate
+ * might have changed.
+ */
+void CxeVideoCaptureControlSymbian::handleSceneChanged(CxeScene& scene)
+{
+    CX_DEBUG_ENTER_FUNCTION();
+
+    // make sure we are in video mode
+    if (mCameraDeviceControl.mode() == Cxe::VideoMode) {
+        // Frame rate setting might have changed so re-prepare.
+        if (state() == Ready) {
+            setState(Preparing);
+            prepare();
+        }
+
+    }
+    CX_DEBUG_EXIT_FUNCTION();
+}
+
+/*!
 * Disk space changed.
 * Emit remaining time changed signal, if space change affects it.
 */
--- a/camerauis/cameraxui/cxengine/tsrc/unit/cxeunitrunner/cxetestrunner.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/cxeunitrunner/cxetestrunner.cpp	Fri May 14 15:40:46 2010 +0300
@@ -62,11 +62,11 @@
           << "unittest_cxezoomcontrolsymbian"
           << "unittest_cxestillcapturecontrolsymbian"
           << "unittest_cxefeaturemanagerimp"
-          << "unittest_cxeenginesymbian"
           << "unittest_cxesettingsimp"
           << "unittest_cxethumbnailmanagersymbian"
           << "unittest_cxeharvestercontrolsymbian"
-          << "unittest_cxesettingscontrolsymbian";
+          << "unittest_cxesettingscontrolsymbian"
+          << "unittest_cxeenginesymbian";
 
     QDir dir;
     dir.mkpath(logFileFolder);
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -42,7 +42,7 @@
     delete mEngine;
     mEngine = NULL;
     mEngine = new CxeEngineSymbianUnit();
-    mEngine->construct();
+    mEngine->initMode(Cxe::ImageMode);
 
     mCameraDeviceControl = qobject_cast<CxeFakeCameraDeviceControl*>(
             &mEngine->cameraDeviceControl());
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.pro	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxeenginesymbian/unittest_cxeenginesymbian.pro	Fri May 14 15:40:46 2010 +0300
@@ -44,6 +44,7 @@
 LIBS *= -lalfclient
 LIBS *= -lalfdecoderserverclient
 LIBS *= -lxqserviceutil
+LIBS *= -loommonitor
 
 
 SOURCES *= unittest_cxeenginesymbian.cpp \
@@ -98,6 +99,10 @@
            sensor/xqaccsensor_p.cpp \
            cxefakequalitypresets.cpp \
            cxequalitypresetssymbian.cpp \
+           cxediskmonitor.cpp \
+           cxediskmonitorprivate.cpp \
+           cxememorymonitor.cpp \
+           cxememorymonitorprivate.cpp
 
 
 
@@ -165,4 +170,8 @@
            sensor/xqaccsensor_p.h \
            cxequalitypresets.h \
            cxefakequalitypresets.h \
-           cxequalitypresetssymbian.h
+           cxequalitypresetssymbian.h \
+           cxediskmonitor.h \
+           cxediskmonitorprivate.h \
+           cxememorymonitor.h \
+           cxememorymonitorprivate.h
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxesettingscenrepstore/unittest_cxesettingscenrepstore.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxesettingscenrepstore/unittest_cxesettingscenrepstore.cpp	Fri May 14 15:40:46 2010 +0300
@@ -127,7 +127,7 @@
     keys.append(CxeRuntimeKeys::PRIMARY_CAMERA_CAPTURE_KEYS);
     keys.append(CxeRuntimeKeys::PRIMARY_CAMERA_AUTOFOCUS_KEYS);
     keys.append(CxeRuntimeKeys::SECONDARY_CAMERA_CAPTURE_KEYS);
-    keys.append(CxeRuntimeKeys::CONTRAST_ITEMS);
+    keys.append(CxeRuntimeKeys::FREE_MEMORY_LEVELS);
     QHash<QString, QVariantList> runtimesettings =  mSettingsCenrepStore->loadRuntimeSettings(keys);
     
     foreach(QString runtimekey, keys) {
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -36,6 +36,7 @@
 #include "cxefakesettings.h"
 #include "cxefakequalitypresets.h"
 #include "cxefakefilesavethread.h"
+#include "cxediskmonitor.h"
 
 UnitTestCxeStillCaptureControlSymbian::UnitTestCxeStillCaptureControlSymbian()
     : mFakeCameraDeviceControl(0)
@@ -70,6 +71,9 @@
     mFakeAutoFocusControl = new CxeFakeAutoFocusControl();
     mFakeQualityPresets = new CxeFakeQualityPresets();
     mFakeFileSaveThread = new CxeFakeFileSaveThread();
+    
+    mDiskMonitor = new CxeDiskMonitor(*mFakeSettings);
+
 
     mStillCaptureControl = new CxeStillCaptureControlSymbian(
             *mFakeCameraDevice,
@@ -80,7 +84,8 @@
             *mFakeAutoFocusControl,
             *mFakeSettings,
             *mFakeQualityPresets,
-            *mFakeFileSaveThread);
+            *mFakeFileSaveThread,
+            *mDiskMonitor);
 
     // init supported qualities.
     mStillCaptureControl->supportedImageQualities();
@@ -111,6 +116,8 @@
     mSpyState = 0;
     delete mFakeQualityPresets;
     mFakeQualityPresets = 0;
+    delete mDiskMonitor;
+    mDiskMonitor = 0;
     delete mFakeFileSaveThread;
     mFakeFileSaveThread = 0;
 }
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.h	Fri May 14 15:40:46 2010 +0300
@@ -36,6 +36,7 @@
 class CxeFakeSettings;
 class CxeFakeQualityPresets;
 class CxeFakeFileSaveThread;
+class CxeDiskMonitor;
 
 class UnitTestCxeStillCaptureControlSymbian : public QObject
 {
@@ -75,6 +76,7 @@
     QSignalSpy *mSpyState;
     CxeFakeQualityPresets *mFakeQualityPresets;
     CxeFakeFileSaveThread *mFakeFileSaveThread;
+    CxeDiskMonitor *mDiskMonitor;
 };
 
 #endif // UNITTEST_CXESTILLCAPTURECONTROLSYMBIAN_H
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.pro	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxestillcapturecontrolsymbian/unittest_cxestillcapturecontrolsymbian.pro	Fri May 14 15:40:46 2010 +0300
@@ -66,6 +66,8 @@
     cxefakeautofocuscontrol.cpp \
     cxefakesettings.cpp \
     cxefilesavethread.cpp \
+    cxediskmonitor.cpp \
+    cxediskmonitorprivate.cpp \
     cxefakefilesavethread.cpp
 
 HEADERS *= unittest_cxestillcapturecontrolsymbian.h \
@@ -112,4 +114,6 @@
     cxefakequalitypresets.h \
     cxefakefilesavethread.h \
     cxefilesavethread.h \
+    cxediskmonitor.h \
+    cxediskmonitorprivate.h \
     cxequalitypresets.h
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.cpp	Fri May 14 15:40:46 2010 +0300
@@ -21,6 +21,7 @@
 #include "cxevideocapturecontrolsymbianunit.h"
 #include "cxefakeVideorecorderutility.h"
 #include "cxutils.h"
+#include "cxediskmonitor.h"
 
 CxeVideoCaptureControlSymbianUnit::CxeVideoCaptureControlSymbianUnit( 
                                    CxeCameraDevice &cameraDevice,
@@ -28,10 +29,11 @@
                                    CxeCameraDeviceControl &cameraDeviceControl,
                                    CxeFilenameGenerator &nameGenerator,
                                    CxeSettings &settings,
-                                   CxeQualityPresets &qualityPresets)
+                                   CxeQualityPresets &qualityPresets,
+                                   CxeDiskMonitor &diskMonitor)
     : CxeVideoCaptureControlSymbian(cameraDevice, viewfinderControl, 
                                     cameraDeviceControl, nameGenerator,
-                                    settings, qualityPresets)
+                                    settings, qualityPresets, diskMonitor)
 {
     CX_DEBUG_IN_FUNCTION();
 }
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/cxevideocapturecontrolsymbianunit.h	Fri May 14 15:40:46 2010 +0300
@@ -37,7 +37,8 @@
                                    CxeCameraDeviceControl &cameraDeviceControl,
                                    CxeFilenameGenerator &nameGenerator,
                                    CxeSettings &settings,
-                                   CxeQualityPresets &qualityPresets);
+                                   CxeQualityPresets &qualityPresets,
+                                   CxeDiskMonitor &diskMonitor);
     virtual ~CxeVideoCaptureControlSymbianUnit();
     void createVideoRecorder();
 
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.cpp	Fri May 14 15:40:46 2010 +0300
@@ -29,6 +29,8 @@
 #include "cxefakequalitypresets.h"
 #include "cxefakesettings.h"
 #include "cxutils.h"
+#include "cxediskmonitor.h"
+
 
 // Enums
 
@@ -68,12 +70,14 @@
     mFilenameGeneratorSymbian = new CxeFakeFilenameGenerator();
     mFilenameGeneratorSymbian->init(Cxe::VideoMode);
     mFakeQualityPresets = new CxeFakeQualityPresets();
+    mDiskMonitor = new CxeDiskMonitor(*mSettings);
     mCxeVideoCaptureControlSymbian = new CxeVideoCaptureControlSymbianUnit(*mCameraDevice,
                                                                        *mViewfinderControl,
                                                                        *mCameraDeviceControl,
                                                                        *mFilenameGeneratorSymbian,
                                                                        *mSettings,
-                                                                       *mFakeQualityPresets);
+                                                                       *mFakeQualityPresets,
+                                                                       *mDiskMonitor);
     mCameraDevice->newCamera(mCameraDeviceControl->cameraIndex(), mCameraDeviceControl);
 
     mSpyState = new QSignalSpy(mCxeVideoCaptureControlSymbian,
@@ -104,6 +108,8 @@
     mCameraDevice = 0;
     delete mFakeQualityPresets;
     mFakeQualityPresets = 0;
+    delete mDiskMonitor;
+    mDiskMonitor = 0;
     delete mSettings;
     mSettings = 0;
     delete mSpyState;
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.h	Fri May 14 15:40:46 2010 +0300
@@ -28,6 +28,7 @@
 class CxeFakeFilenameGenerator;
 class QSignalSpy;
 class CxeFakeQualityPresets;
+class CxeDiskMonitor;
 
 class UnitTestCxeVideoCaptureControlSymbian : public QObject
 {
@@ -74,6 +75,7 @@
     CxeFakeFilenameGenerator *mFilenameGeneratorSymbian;
     QSignalSpy *mSpyState;
     CxeFakeQualityPresets *mFakeQualityPresets;
+    CxeDiskMonitor *mDiskMonitor;
 };
 
 #endif // UNITTEST_CXESTILLIMAGESYMBIAN_H
--- a/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.pro	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxevideocapturecontrolsymbian/unittest_cxevideocapturecontrolsymbian.pro	Fri May 14 15:40:46 2010 +0300
@@ -50,6 +50,8 @@
     cxesoundplayersymbian.cpp \
     cxeerrormappingsymbian.cpp \
     cxefakequalitypresets.cpp \
+    cxediskmonitor.cpp \
+    cxediskmonitorprivate.cpp \
     cxesysutil.cpp
 
 HEADERS *= unittest_cxevideocapturecontrolsymbian.h \
@@ -79,4 +81,6 @@
     cxesoundplayersymbian.h \
     cxefakequalitypresets.h \
     cxutils.h \
+    cxediskmonitor.h \
+    cxediskmonitorprivate.h \
     cxesysutil.h
--- a/camerauis/cameraxui/cxui/inc/cxuienums.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuienums.h	Fri May 14 15:40:46 2010 +0300
@@ -91,8 +91,10 @@
     static const char *STILL_PRE_CAPTURE_SELFTIMER_START_BUTTON = "still_selftimer_start_button";
     static const char *STILL_PRE_CAPTURE_SELFTIMER_CANCEL_BUTTON = "still_selftimer_cancel_button";
 
-    static const char *VIDEO_PRE_CAPTURE_VIEW  = "video_capture_view";
-
+    static const char *VIDEO_PRE_CAPTURE_VIEW = "video_capture_view";
+    
+    static const char *SETTINGS_DIALOG_OK_ACTION = "action_ok";
+    
     // video
     // In order to be able to refer to a widget, we need to know its object name.
     static const char *VIDEO_PRE_CAPTURE_TOOLBAR = "video_toolbar";
--- a/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuipostcaptureview.h	Fri May 14 15:40:46 2010 +0300
@@ -21,6 +21,7 @@
 #include <QList>
 #include <QTimer>
 #include <hbview.h>
+#include <xqappmgr.h>
 
 class QGraphicsRectItem;
 class HbMainWindow;
@@ -127,6 +128,8 @@
     bool mControlsVisible;
 
     bool mTimersStarted;
+    
+    XQApplicationManager mAppManager;
 
 };
 
--- a/camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuiprecaptureview.h	Fri May 14 15:40:46 2010 +0300
@@ -105,7 +105,7 @@
     void zoomTo(int value);
 
     // Control visibility of all UI items at the same time: toolbar, zoom and titlepane items
-    void hideControls();
+    virtual void hideControls();
     virtual void showControls();
     void toggleControls();
 
@@ -197,7 +197,9 @@
     CxuiSettingSlider *mSettingsSlider;
 
     CxuiSettingsInfo *mSettingsInfo;
-
+    
+    HbAction *mSettingsDialogOkAction;
+    HbAction *mSliderSettingsDialogOkAction;
 };
 
 #endif // CXUIPRECAPTUREVIEW_H
--- a/camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuivideoprecaptureview.h	Fri May 14 15:40:46 2010 +0300
@@ -106,6 +106,9 @@
 
     void updateTimeLabels();
 
+    // from CxuiPrecaptureView
+    void hideControls();
+
 protected:
 
     void setVideoTime(HbLabel* label, int time);
@@ -118,6 +121,8 @@
     void initializeSettingsGrid();
     void setRecordingItemsVisibility(bool visible);
 
+    // from QObject
+    bool eventFilter(QObject *object, QEvent *event);
 protected:
     QTimer mElapsedTimer;
     int mTimeElapsed;
@@ -136,6 +141,7 @@
     QPropertyAnimation* mRecordingAnimation; //For recording indicator
 
     bool mCapturePending;
+    QTimer mPauseTimer;
     };
 
 #endif // CXUIVIDEOPRECAPTUREVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/errornote_popup.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <widget name="errornote_popup" type="HbDialog">
+        <widget name="errornote_content_widget" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="errornote_text" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="0.3"/>
+                <sizehint height="360" type="PREFERRED" width="640"/>
+                <string locid="txt_cam_info_error" name="plainText" value="Unexpected error occurred. Power off the device and restart"/>
+            </widget>
+            <widget name="errornote_exit_button_widget" type="HbWidget">
+                <widget name="errornote_button_exit" type="HbPushButton">
+                    <real name="z" value="0.4"/>
+                    <real name="opacity" value="0.7"/>
+                    <sizehint height="7.46269un" type="PREFERRED" width="22.38806un"/>
+                    <string locid="txt_common_button_close" name="text" value="Close"/>
+                </widget>
+                <real name="z" value="0.3"/>
+                <sizehint height="11.9403un" type="PREFERRED" width="23.8806un"/>
+                <layout orientation="Horizontal" type="linear">
+                    <linearitem itemname="errornote_button_exit"/>
+                </layout>
+            </widget>
+            <real name="z" value="0.1"/>
+            <layout type="anchor">
+                <anchoritem dst="errornote_exit_button_widget" dstEdge="BOTTOM" spacing="0" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="errornote_exit_button_widget" dstEdge="LEFT" spacing="400" src="" srcEdge="LEFT"/>
+            </layout>
+        </widget>
+        <size height="360" name="size" width="640"/>
+        <rect height="360" name="geometry" width="640" x="0" y="0"/>
+    </widget>
+    <connect receiver="errornote_popup" sender="errornote_button_exit" signal="released()" slot="close()"/>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/setting.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="action_ok" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_ok" name="text" value="Ok"/>
+    </object>
+    <object name="action_cancel" type="HbAction">
+        <string name="role" value="HbDialog:secondaryAction"/>
+        <string locid="txt_common_button_cancel" name="text" value="Cancel"/>
+    </object>
+    <widget name="settings_dialog" type="HbDialog">
+        <widget name="settings_dialog_heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            <string name="plainText" value="Dummy settings dialog"/>
+            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-primary)"/>
+        </widget>
+        <widget name="settings_dialog_name_content" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="settings_dialog_list" type="HbRadioButtonList">
+                <container name="items" type="stringlist">
+                    <string value="Dummy item 1"/>
+                    <string value="Dummy item 2"/>
+                </container>
+                <sizehint type="MINIMUM" height="30un"/>
+            </widget>
+            <layout orientation="Vertical" type="linear">
+                <linearitem itemname="settings_dialog_list"/>
+            </layout>
+        </widget>
+        <sizehint type="MINIMUM" width="var(hb-param-widget-dialog-width)"/>
+        <ref object="action_ok" role="HbDialog:primaryAction"/>
+        <ref object="action_cancel" role="HbDialog:secondaryAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/setting_scenemode.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <widget name="settings_scenes_view" type="HbView">
+        <widget name="scene_view_content" role="HbView:widget" type="HbWidget">
+            <widget name="scene_view_bg_icon" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="-1"/>
+                <real name="opacity" value="1"/>
+            </widget>
+            <widget name="scene_view_bg_icon2" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="0"/>
+                <real name="opacity" value="0"/>
+            </widget>
+            <widget name="scene_view_container" type="HbWidget">
+                <widget name="scene_view_radioButtonList" type="HbRadioButtonList">
+                    <real name="z" value="4"/>
+                    <sizehint height="31.04478un" type="PREFERRED"/>
+                </widget>
+                <widget name="button_container" type="HbWidget">
+                    <widget name="scene_ok_button" type="HbPushButton">
+                        <sizehint height="2un" type="PREFERRED"/>
+                        <sizehint height="2un" type="MINIMUM" width="12un"/>
+                        <string name="text" value="txt_common_button_ok"/>
+                        <string name="state" value="normal"/>
+                    </widget>
+                    <widget name="scene_cancel_button" type="HbPushButton">
+                        <sizehint height="2un" type="PREFERRED"/>
+                        <string name="text" value="txt_common_button_cancel"/>
+                        <string name="state" value="normal"/>
+                        <sizehint height="2un" type="MINIMUM"/>
+                    </widget>
+                    <real name="z" value="0"/>
+                    <sizehint height="7un" type="PREFERRED" width="23.8806un"/>
+                    <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-left)" type="linear">
+                        <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                        <linearitem itemname="scene_ok_button"/>
+                        <linearitem itemname="scene_cancel_button"/>
+                    </layout>
+                </widget>
+                <widget name="scene_title" type="HbLabel">
+                    <real name="z" value="4"/>
+                    <contentsmargins bottom="0un" left="3un" right="0un" top="1un"/>
+                    <string name="plainText" value="txt_cam_title_scene_mode"/>
+                    <fontspec name="fontSpec" role="Title" textheight="var(hb-param-text-height-primary)"/>
+                </widget>
+                <real name="z" value="2"/>
+                <sizehint height="41.49254un" type="PREFERRED" width="43.8806un"/>
+                <layout orientation="Vertical" type="linear">
+                    <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
+                    <linearitem itemname="scene_title"/>
+                    <linearitem itemname="scene_view_radioButtonList"/>
+                    <linearitem itemname="button_container"/>
+                </layout>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="scene_view_bg_icon" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="scene_view_bg_icon" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="scene_view_bg_icon" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="scene_view_bg_icon" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="scene_view_bg_icon2" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="scene_view_bg_icon2" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="scene_view_bg_icon2" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="scene_view_bg_icon2" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="scene_view_container" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="scene_view_container" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-bottom)" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <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()"/>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/setting_slider.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="action_ok" type="HbAction">
+        <string name="role" value="HbDialog:primaryAction"/>
+        <string locid="txt_common_button_ok" name="text" value="Ok"/>
+    </object>
+    <object name="action_cancel" type="HbAction">
+        <string name="role" value="HbDialog:secondaryAction"/>
+        <string locid="txt_common_button_ok" name="text" value="Cancel"/>
+    </object>
+    <widget name="slider_settings_dialog" type="HbDialog">
+        <widget name="slider_settings_dialog_heading" role="HbDialog:headingWidget" type="HbLabel">
+            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+            <string name="plainText" value="Setting dialog"/>
+        </widget>
+        <widget name="slider_dialog_container" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="settings_dialog_slider" type="HbSlider">
+                <bool name="visible" value="TRUE"/>
+                <string name="orientation" value="Horizontal"/>
+            </widget>
+            <layout orientation="Horizontal" type="linear">
+                <linearitem itemname="settings_dialog_slider"/>
+            </layout>
+        </widget>
+        <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+        <sizehint type="PREFERRED" width="var(hb-param-widget-dialog-width)"/>
+        <sizehint type="MINIMUM" width="10un"/>
+        <ref object="action_ok" role="HbDialog:primaryAction"/>
+        <ref object="action_cancel" role="HbDialog:secondaryAction"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/standbymode_popup.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <widget name="standbymode_popup" type="HbDialog">
+        <widget name="standbymode_widget" role="HbDialog:contentWidget" type="HbWidget">
+            <widget name="standby_text" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="0.3"/>
+                <sizehint height="360" type="MINIMUM" width="640"/>
+                <string locid="txt_cam_info_camera_in_standby_mode" name="plainText" value="Camera in stand-by mode"/>
+            </widget>
+            <real name="z" value="0.1"/>
+        </widget>
+        <sizehint height="360" type="MINIMUM" width="640"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/view_postcapture.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="cxui_action_post_photos" type="HbAction">
+        <icon iconName="qtg_mono_photos" name="icon"/>
+    </object>
+    <object name="cxui_action_post_videos" type="HbAction">
+        <icon iconName="qtg_mono_photos" name="icon"/>
+    </object>
+    <object name="cxui_action_post_share" type="HbAction">
+        <icon iconName="qtg_mono_share" name="icon"/>
+    </object>
+    <object name="cxui_action_post_delete" type="HbAction">
+        <icon iconName="qtg_mono_delete" name="icon"/>
+    </object>
+    <object name="cxui_action_post_play" type="HbAction">
+        <icon iconName="qtg_mono_play" name="icon"/>
+    </object>
+    <object name="cxui_action_post_select" type="HbAction">
+        <icon iconName="qtg_mono_tick" name="icon"/>
+    </object>
+    <widget name="postcapture_view" type="HbView">
+        <widget name="postcapture_container" role="HbView:widget" type="HbWidget">
+            <widget name="snapshot_label" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="1"/>
+                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
+                <sizehint height="var(hb-param-screen-height)" type="PREFERRED" width="var(hb-param-screen-width)"/>
+                <sizehint height="250un" type="MAXIMUM" width="250un"/>
+            </widget>
+            <widget name="video_postcapture_toolbar" type="HbToolBar">
+                <enums name="layoutDirection" value="RightToLeft"/>
+                <real name="z" value="3"/>
+                <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
+                <enums name="orientation" value="Vertical"/>
+                <bool name="visible" value="TRUE"/>
+                <ref object="cxui_action_post_videos" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_share" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_play" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_delete" role="HbToolBar:addAction"/>
+            </widget>
+            <widget name="still_postcapture_toolbar" type="HbToolBar">
+                <enums name="layoutDirection" value="RightToLeft"/>
+                <real name="z" value="3"/>
+                <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
+                <enums name="orientation" value="Vertical"/>
+                <bool name="visible" value="TRUE"/>
+                <ref object="cxui_action_post_photos" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_share" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_delete" role="HbToolBar:addAction"/>
+            </widget>
+            <widget name="embedded_postcapture_toolbar" type="HbToolBar">
+                <enums name="layoutDirection" value="RightToLeft"/>
+                <real name="z" value="3"/>
+                <sizehint type="PREFERRED" width="var(hb-param-widget-toolbar-height)"/>
+                <enums name="orientation" value="Vertical"/>
+                <bool name="visible" value="TRUE"/>
+                <ref object="cxui_action_post_select" role="HbToolBar:addAction"/>
+                <ref object="cxui_action_post_delete" role="HbToolBar:addAction"/>
+            </widget>
+            <real name="z" value="1"/>
+            <layout type="anchor">
+                <anchoritem dst="snapshot_label" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="snapshot_label" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="video_postcapture_toolbar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="video_postcapture_toolbar" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                <anchoritem dst="video_postcapture_toolbar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="still_postcapture_toolbar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="still_postcapture_toolbar" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                <anchoritem dst="still_postcapture_toolbar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="embedded_postcapture_toolbar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="embedded_postcapture_toolbar" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                <anchoritem dst="embedded_postcapture_toolbar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="snapshot_label" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="snapshot_label" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <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()"/>
+    <connect receiver="postcapture_view" sender="cxui_action_post_share" signal="triggered(bool)" slot="launchShare()"/>
+    <connect receiver="postcapture_view" sender="cxui_action_post_photos" signal="triggered(bool)" slot="launchPhotosApp()"/>
+    <connect receiver="postcapture_view" sender="cxui_action_post_videos" signal="triggered(bool)" slot="launchVideosApp()"/>
+    <connect receiver="postcapture_view" sender="cxui_action_post_select" signal="triggered(bool)" slot="select()"/>
+    <metadata activeUIState="Common ui state" display="NHD landscape" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/view_still_precapture.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument context="CxuiStillPrecaptureView" version="1.0">
+    <object name="cxui_action_goto_2_camera" type="HbAction">
+        <string name="text" value="Go to 2nd camera"/>
+    </object>
+    <object name="cxui_action_goto_photos" type="HbAction">
+        <string locid="txt_cam_opt_go_to_photos" name="text" value="Go to Photos"/>
+    </object>
+    <object name="cxui_action_self_timer" type="HbAction">
+        <string name="settingskey" value="selfTimer"/>
+        <string locid="txt_cam_opt_self_timer" name="text" value="Self timer"/>
+    </object>
+    <object name="cxui_action_stillpostcapture" type="HbAction">
+        <string name="settingskey" value="still_showcaptured"/>
+        <string locid="txt_cam_opt_show_captured_image" name="text" value="Show captured image"/>
+    </object>
+    <object name="cxui_action_capturetone" type="HbAction">
+        <string locid="txt_cam_opt_capture_tone" name="text" value="Capture tone"/>
+    </object>
+    <object name="cxui_action_imagerotation" type="HbAction">
+        <string locid="txt_cam_opt_image_rotation" name="text" value="Image rotation"/>
+    </object>
+    <object name="cxui_action_setdefaultscenemode" type="HbAction">
+        <string locid="txt_cam_opt_set_as_default_scene_mode" name="text" value="Set as default scene mode"/>
+    </object>
+    <object name="cxui_action_restore" type="HbAction">
+        <string locid="txt_cam_opt_restore_settings" name="text" value="Restore settings"/>
+    </object>
+    <object name="cxui_action_settings" type="HbAction">
+        <string locid="txt_cam_opt_camera_settings" name="text" value="Camera settings"/>
+    </object>
+    <object name="cxui_action_image_quality" type="HbAction">
+        <string name="settingskey" value="imageQuality"/>
+        <string locid="txt_cam_opt_image_quality" name="text" value="Image quality"/>
+    </object>
+    <object name="cxui_action_default_image_name" type="HbAction">
+        <string locid="txt_cam_opt_default_image_name" name="text" value="Default image name"/>
+    </object>
+    <object name="cxui_action_capture" type="HbAction">
+        <icon iconName="qtg_mono_capture" name="icon"/>
+    </object>
+    <object name="cxui_action_goto_video" type="HbAction">
+        <icon iconName="qtg_mono_change_cam_mode" name="icon"/>
+    </object>
+    <object name="cxui_action_flash" type="HbAction">
+        <icon iconName="qtg_mono_flash" name="icon"/>
+        <string name="settingskey" value="flash_mode"/>
+    </object>
+    <object name="cxui_action_scenemodes" type="HbAction">
+        <icon iconName="qtg_mono_automatic" name="icon"/>
+    </object>
+    <widget name="still_capture_view" type="HbView">
+        <widget name="still_container" role="HbView:widget" type="HbWidget">
+            <widget name="transparent" type="HbTransparentWindow">
+                <real name="z" value="0"/>
+            </widget>
+            <widget name="indicatorContainer" type="HbWidget">
+                <widget name="mode_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_mono_camera" name="icon"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                </widget>
+                <widget name="quality_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                    <bool name="visible" value="TRUE"/>
+                </widget>
+                <widget name="flash_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                    <bool name="visible" value="TRUE"/>
+                </widget>
+                <real name="z" value="5"/>
+                <bool name="visible" value="FALSE"/>
+                <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="mode_indicator"/>
+                    <linearitem itemname="quality_indicator"/>
+                    <linearitem itemname="flash_indicator"/>
+                </layout>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="indicatorContainer" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="indicatorContainer" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
+                <anchoritem dst="transparent" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="transparent" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="transparent" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="transparent" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </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">
+            <widget name="still_view_menu" role="HbView:menu" type="HbMenu"/>
+            <widget name="still_container" role="HbView:widget" type="HbWidget">
+                <widget name="toolbar" type="HbToolBar">
+                    <enums name="layoutDirection" value="RightToLeft"/>
+                    <real name="z" value="7"/>
+                    <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"/>
+                </widget>
+                <widget name="zoom" type="HbSlider">
+                    <real name="z" value="2"/>
+                    <sizehint height="40un" type="PREFERRED"/>
+                    <enums name="orientation" value="Vertical"/>
+                    <bool name="visible" value="FALSE"/>
+                </widget>
+                <widget name="images_left_container" type="HbWidget">
+                    <widget name="images_remaining" type="HbLabel">
+                        <real name="z" value="1"/>
+                        <string name="textColor" value="#ffffff"/>
+                        <string name="plainText" value="9999"/>
+                        <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-tiny)"/>
+                    </widget>
+                    <real name="z" value="1"/>
+                    <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="images_remaining"/>
+                    </layout>
+                </widget>
+                <widget name="still_precapture_selftimer_container" type="HbWidget">
+                    <widget name="selftimer_button_container" type="HbWidget">
+                        <widget name="still_selftimer_start_button" type="HbPushButton">
+                            <real name="z" value="5"/>
+                            <string locid="txt_cam_button_start" name="text" value="Start"/>
+                            <bool name="visible" value="TRUE"/>
+                            <string name="state" value="normal"/>
+                            <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-tiny)"/>
+                        </widget>
+                        <widget name="still_selftimer_cancel_button" type="HbPushButton">
+                            <real name="z" value="4"/>
+                            <string locid="txt_cam_button_cancel" name="text" value="Cancel"/>
+                            <bool name="visible" value="TRUE"/>
+                            <string name="state" value="normal"/>
+                            <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-tiny)"/>
+                        </widget>
+                        <real name="z" value="0"/>
+                        <bool name="visible" value="TRUE"/>
+                        <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
+                            <contentsmargins bottom="0un" left="0un" right="0un" top="var(hb-param-margin-gene-top)"/>
+                            <linearitem itemname="still_selftimer_start_button"/>
+                            <linearitem itemname="still_selftimer_cancel_button"/>
+                        </layout>
+                    </widget>
+                    <widget name="selftimer_icon_container" type="HbWidget">
+                        <widget name="still_selftimer_icon" type="HbLabel">
+                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                            <icon iconName="qtg_mono_countdown_timer" name="icon"/>
+                            <real name="z" value="2"/>
+                            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                            <sizehint height="var(hb-param-graphic-size-function)" type="FIXED" width="var(hb-param-graphic-size-function)"/>
+                            <bool name="visible" value="TRUE"/>
+                        </widget>
+                        <widget name="still_selftimer_counter" type="HbLabel">
+                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                            <real name="z" value="4"/>
+                            <string name="textColor" value="#ffffff"/>
+                            <string name="plainText" value="00"/>
+                            <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-primary)"/>
+                        </widget>
+                        <real name="z" value="9"/>
+                        <bool name="visible" value="TRUE"/>
+                        <layout orientation="Horizontal" spacing="var(hb-param-margin-gene-middle-horizontal)" type="linear">
+                            <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                            <stretchitem stretchfactor="1"/>
+                            <linearitem itemname="still_selftimer_icon"/>
+                            <linearitem itemname="still_selftimer_counter"/>
+                            <stretchitem stretchfactor="1"/>
+                        </layout>
+                    </widget>
+                    <real name="z" value="1"/>
+                    <layout orientation="Vertical" spacing="0un" type="linear">
+                        <linearitem itemname="selftimer_icon_container"/>
+                        <linearitem itemname="selftimer_button_container"/>
+                    </layout>
+                </widget>
+                <real name="z" value="1"/>
+                <layout type="anchor">
+                    <anchoritem dst="indicatorContainer" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="indicatorContainer" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="toolbar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="toolbar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="toolbar" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="zoom" dstEdge="CENTERV" spacing="0un" src="toolbar" srcEdge="CENTERV"/>
+                    <anchoritem dst="zoom" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-screen)" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="transparent" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="transparent" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <anchoritem dst="transparent" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="transparent" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="images_left_container" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-bottom)" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="images_left_container" dstEdge="LEFT" spacing="11un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="still_precapture_selftimer_container" dstEdge="CENTERH" spacing="0" src="" srcEdge="CENTERH"/>
+                    <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_capturetone" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_imagerotation" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_setdefaultscenemode" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_restore" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_image_quality" signal="triggered(bool)" slot="launchSetting()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_default_image_name" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="still_capture_view" sender="still_view_menu" signal="aboutToShow()" slot="disableControlsTimeout()"/>
+        <connect receiver="still_capture_view" sender="still_view_menu" signal="aboutToHide()" slot="hideControls()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_goto_photos" signal="triggered(bool)" slot="launchPhotosApp()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_self_timer" signal="triggered(bool)" slot="launchSetting()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_settings" signal="triggered(bool)" slot="showSettingsGrid()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_stillpostcapture" signal="triggered(bool)" slot="launchSetting()"/>
+        <connect receiver="still_capture_view" sender="cxui_action_goto_2_camera" signal="triggered(bool)" slot="requestCameraSwitch()"/>
+        <connect receiver="still_capture_view" sender="zoom" signal="valueChanged(int)" slot="zoomTo(int)"/>
+        <connect receiver="still_capture_view" sender="cxui_action_capture" signal="triggered(bool)" slot="capture()"/>
+        <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="launchNotSupportedNotification()"/>
+    </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"/>
+            <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_default_image_name" role="HbMenu:addAction"/>
+                <ref object="cxui_action_capturetone" role="HbMenu:addAction"/>
+                <ref object="cxui_action_imagerotation" role="HbMenu:addAction"/>
+            </widget>
+            <ref object="cxui_action_setdefaultscenemode" role="HbMenu:addAction"/>
+            <ref object="cxui_action_restore" role="HbMenu: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"/>
+            <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"/>
+                <ref object="cxui_action_default_image_name" role="HbMenu:addAction"/>
+                <ref object="cxui_action_imagerotation" role="HbMenu:addAction"/>
+            </widget>
+            <ref object="cxui_action_restore" role="HbMenu:addAction"/>
+        </widget>
+    </section>
+    <metadata activeUIState="still_standalone_mode" display="NHD 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"/>
+        <uistate name="still_embedded_mode" sections="#common still_capture_with_widgets still_embedded_mode"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxui/layouts/view_video_precapture.docml	Fri May 14 15:40:46 2010 +0300
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.0">
+    <object name="cxui_video_action_record" type="HbAction">
+        <icon iconName="qtg_small_record" name="icon"/>
+    </object>
+    <object name="cxui_video_action_light" type="HbAction">
+        <icon iconName="qtg_mono_light" name="icon"/>
+    </object>
+    <object name="cxui_video_action_zoom" type="HbAction">
+        <icon iconName="qtg_mono_zoom" name="icon"/>
+    </object>
+    <object name="cxui_video_action_gotostill" type="HbAction">
+        <icon iconName="qtg_mono_change_cam_mode" name="icon"/>
+    </object>
+    <object name="cxui_video_action_scene" type="HbAction">
+        <icon iconName="qtg_mono_automatic" name="icon"/>
+    </object>
+    <object name="cxui_video_action_goto_2_camera" type="HbAction">
+        <string name="text" value="Go to second camera"/>
+    </object>
+    <object name="cxui_video_action_quality" type="HbAction">
+        <string name="settingskey" value="videoQuality"/>
+        <string locid="txt_cam_opt_video_quality" name="text" value="Video quality"/>
+    </object>
+    <object name="cxui_video_action_restore" type="HbAction">
+        <string locid="txt_cam_opt_restore_settings" name="text" value="Restore settings"/>
+    </object>
+    <object name="cxui_video_action_help" type="HbAction">
+        <string name="text" value="Help"/>
+    </object>
+    <object name="cxui_video_action_pause" type="HbAction">
+        <icon iconName="qtg_mono_pause" name="icon"/>
+    </object>
+    <object name="cxui_video_action_stop" type="HbAction">
+        <icon iconName="qtg_mono_stop" name="icon"/>
+    </object>
+    <object name="cxui_video_action_resume" type="HbAction">
+        <icon iconName="qtg_small_record" name="icon"/>
+    </object>
+    <object name="cxui_video_action_showcapturedvideo" type="HbAction">
+        <string name="settingskey" value="video_showcaptured"/>
+        <string locid="txt_cam_opt_show_captured_video" name="text" value="Show captured video"/>
+    </object>
+    <object name="cxui_video_action_videosound" type="HbAction">
+        <string locid="txt_cam_opt_video_sound" name="text" value="Video sound"/>
+    </object>
+    <object name="cxui_video_action_defaultvideoname" type="HbAction">
+        <string locid="txt_cam_opt_default_video_name" name="text" value="Default video name"/>
+    </object>
+    <object name="cxui_video_action_setdefaultscenemode" type="HbAction">
+        <string locid="txt_cam_opt_set_as_default_scene_mode" name="text" value="Set as default scene mode"/>
+    </object>
+    <object name="cxui_video_action_settings" type="HbAction">
+        <string locid="txt_cam_opt_camera_settings" name="text" value="Camera settings"/>
+    </object>
+    <object name="cxui_video_action_gotovideos" type="HbAction">
+        <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_container" role="HbView:widget" type="HbWidget">
+            <widget name="video_viewfinder_widget" type="HbTransparentWindow">
+                <real name="z" value="0"/>
+            </widget>
+            <widget name="video_indicator_container_top" type="HbWidget">
+                <widget name="video_mode_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_mono_camcorder" name="icon"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                </widget>
+                <widget name="video_quality_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_mono_vga" name="icon"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                </widget>
+                <widget name="video_audio_mute_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_mono_call_mute" name="icon"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                </widget>
+                <widget name="video_stability_indicator" type="HbLabel">
+                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                    <icon iconName="qtg_mono_call_mute" name="icon"/>
+                    <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                    <sizehint height="var(hb-param-graphic-size-secondary)" type="FIXED" width="var(hb-param-graphic-size-secondary)"/>
+                    <bool name="visible" value="FALSE"/>
+                </widget>
+                <real name="z" value="5"/>
+                <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_mode_indicator"/>
+                    <linearitem itemname="video_quality_indicator"/>
+                    <linearitem itemname="video_stability_indicator"/>
+                    <linearitem itemname="video_audio_mute_indicator"/>
+                </layout>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="video_indicator_container_top" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                <anchoritem dst="video_indicator_container_top" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
+                <anchoritem dst="video_viewfinder_widget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="video_viewfinder_widget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="video_viewfinder_widget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="video_viewfinder_widget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </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">
+            <widget name="video_view_menu" role="HbView:menu" type="HbMenu"/>
+            <widget name="video_container" role="HbView:widget" type="HbWidget">
+                <widget name="video_toolbar" type="HbToolBar">
+                    <enums name="layoutDirection" value="RightToLeft"/>
+                    <real name="z" value="3"/>
+                    <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"/>
+                </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"/>
+                </widget>
+                <widget name="video_zoom" type="HbSlider">
+                    <real name="z" value="8"/>
+                    <sizehint height="40un" type="PREFERRED"/>
+                    <enums name="orientation" value="Vertical"/>
+                </widget>
+                <widget name="video_toolbar_paused" 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_resume" role="HbToolBar:addAction"/>
+                    <ref object="cxui_video_action_light" role="HbToolBar:addAction"/>
+                    <ref object="cxui_video_action_stop" role="HbToolBar:addAction"/>
+                </widget>
+                <widget name="video_indicator_container_bottom" type="HbWidget">
+                    <widget name="video_recording_icon" type="HbLabel">
+                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                        <icon iconName="qtg_small_record" name="icon"/>
+                        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
+                        <sizehint height="var(hb-param-graphic-size-function)" type="FIXED" width="var(hb-param-graphic-size-function)"/>
+                    </widget>
+                    <widget name="video_remaining_time" type="HbLabel">
+                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                        <sizehint height="var(hb-param-graphic-size-function)" type="PREFERRED"/>
+                        <string name="textColor" value="#ff0000"/>
+                        <string name="plainText" value="00:00"/>
+                        <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-tiny)"/>
+                    </widget>
+                    <widget name="video_elapsed_time" type="HbLabel">
+                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                        <sizehint height="var(hb-param-graphic-size-function)" type="PREFERRED"/>
+                        <string name="textColor" value="#ffffff"/>
+                        <string name="plainText" value="00:00"/>
+                        <fontspec name="fontSpec" role="Undefined" textheight="var(hb-param-text-height-tiny)"/>
+                    </widget>
+                    <real name="z" value="5"/>
+                    <bool name="visible" value="FALSE"/>
+                    <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>
+                <layout type="anchor">
+                    <anchoritem dst="video_indicator_container_top" dstEdge="LEFT" spacing="var(hb-param-margin-gene-left)" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_indicator_container_top" dstEdge="TOP" spacing="var(hb-param-margin-gene-top)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="video_toolbar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="video_toolbar" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="video_toolbar" dstEdge="RIGHT" spacing="var(hb-param-widget-toolbar-height)" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_toolbar_recording" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="video_toolbar_recording" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="video_toolbar_recording" dstEdge="RIGHT" spacing="var(hb-param-widget-toolbar-height)" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_zoom" dstEdge="CENTERV" spacing="0un" src="video_toolbar" srcEdge="CENTERV"/>
+                    <anchoritem dst="video_zoom" dstEdge="RIGHT" spacing="-var(hb-param-margin-gene-right)" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="video_toolbar_paused" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="video_toolbar_paused" dstEdge="TOP" spacing="var(hb-param-widget-chrome-height)" src="" srcEdge="TOP"/>
+                    <anchoritem dst="video_toolbar_paused" dstEdge="RIGHT" spacing="var(hb-param-widget-toolbar-height)" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_indicator_container_bottom" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-bottom)" src="" srcEdge="BOTTOM"/>
+                    <anchoritem dst="video_indicator_container_bottom" dstEdge="LEFT" spacing="11un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                    <anchoritem dst="video_viewfinder_widget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                    <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()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_settings" signal="triggered(bool)" slot="showSettingsGrid()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_quality" signal="triggered(bool)" slot="launchSetting()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_restore" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_showcapturedvideo" signal="triggered(bool)" slot="launchSetting()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_videosound" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_defaultvideoname" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="video_capture_view" sender="video_zoom" signal="valueChanged(int)" slot="zoomTo(int)"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_record" signal="triggered(bool)" slot="record()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_resume" signal="triggered(bool)" slot="record()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_stop" signal="triggered(bool)" slot="stop()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_pause" signal="triggered(bool)" slot="pause()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_gotostill" signal="triggered(bool)" slot="goToStill()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_gotostill" signal="triggered(bool)" slot="hideControls()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_light" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_scene" signal="triggered(bool)" slot="launchNotSupportedNotification()"/>
+        <connect receiver="video_capture_view" sender="cxui_video_action_gotovideos" signal="triggered(bool)" slot="launchVideosApp()"/>
+    </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"/>
+            <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_videosound" role="HbMenu:addAction"/>
+                <ref object="cxui_video_action_defaultvideoname" role="HbMenu:addAction"/>
+            </widget>
+            <ref object="cxui_video_action_restore" role="HbMenu:addAction"/>
+        </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"/>
+            <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_videosound" role="HbMenu:addAction"/>
+                <ref object="cxui_video_action_defaultvideoname" role="HbMenu:addAction"/>
+            </widget>
+            <ref object="cxui_video_action_restore" role="HbMenu:addAction"/>
+        </widget>
+    </section>
+    <section name="video_idle">
+        <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_remaining_time"/>
+            </layout>
+        </widget>
+        <widget name="video_elapsed_time" type="HbLabel">
+            <bool name="visible" value="FALSE"/>
+        </widget>
+    </section>
+    <section name="video_recording">
+        <widget name="video_recording_icon" type="HbLabel">
+            <bool name="visible" value="TRUE"/>
+        </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>
+        <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">
+        <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"/>
+        <uistate name="video_embedded_mode" sections="#common video_capture_with_widgets video_embedded_mode"/>
+        <uistate name="Idle" sections="#common video_capture_with_widgets video_idle"/>
+        <uistate name="Recording" sections="#common video_capture_with_widgets video_recording"/>
+        <uistate name="Paused" sections="#common video_capture_with_widgets video_paused"/>
+    </metadata>
+</hbdocument>
--- a/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuipostcaptureview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -32,7 +32,7 @@
 #include <hbmessagebox.h>
 #include <hbnotificationdialog.h>
 
-#include <shareuidialog.h>
+#include <shareui.h>
 
 #include "cxeviewfindercontrol.h"
 #include "cxuienums.h"
@@ -136,14 +136,20 @@
 
     // get toolbar pointers from the documentloader
     widget = mDocumentLoader->findWidget(STILL_POST_CAPTURE_TOOLBAR);
+    // This resize is a workaround to get toolbar shown correctly.
+    widget->resize(60, 300);
     mStillToolbar = qobject_cast<HbToolBar *> (widget);
     CX_DEBUG_ASSERT(mStillToolbar);
 
     widget = mDocumentLoader->findWidget(VIDEO_POST_CAPTURE_TOOLBAR);
+    // This resize is a workaround to get toolbar shown correctly.
+    widget->resize(60, 300);
     mVideoToolbar = qobject_cast<HbToolBar *> (widget);
     CX_DEBUG_ASSERT(mVideoToolbar);
 
     widget = mDocumentLoader->findWidget(EMBEDDED_POST_CAPTURE_TOOLBAR);
+    // This resize is a workaround to get toolbar shown correctly.
+    widget->resize(60, 300);
     mEmbeddedToolbar = qobject_cast<HbToolBar *> (widget);
     CX_DEBUG_ASSERT(mEmbeddedToolbar);
 
@@ -204,9 +210,11 @@
  */
 void CxuiPostcaptureView::playVideo()
 {
+
     launchNotSupportedNotification();
     //! @todo needs an implementation
     CX_DEBUG_IN_FUNCTION();
+
 }
 
 // ---------------------------------------------------------------------------
@@ -245,7 +253,9 @@
     hideControls();
 
     HbMessageBox *dlg = qobject_cast<HbMessageBox*>(sender());
-    if(dlg && action == dlg->primaryAction()) {
+
+    // check that it was "primary action" that closed the dialog
+    if (dlg && dlg->actions().at(0) == action) {
         // User confirmed delete
         QString filename = getCurrentFilename();
         QFileInfo fileInfo(filename);
@@ -276,16 +286,15 @@
     CX_DEBUG_ENTER_FUNCTION();
 
     stopTimers();
-    stopViewfinder();
     releaseCamera();
 
     QString filename = getCurrentFilename();
 
-    QVariantList filelist;
-    filelist.append(QVariant(filename));
+    QStringList filelist;
+    filelist.append(filename);
 
     ShareUi dialog;
-    dialog.init(filelist, true);
+    dialog.send(filelist, true);
 
     showControls();
 
@@ -467,8 +476,8 @@
 //
 void CxuiPostcaptureView::mousePressEvent(QGraphicsSceneMouseEvent *event)
 {
-
-    if (event->type() == QEvent::GraphicsSceneMousePress) {
+    //! @todo temporary workaround for title bar mouse event handling bug
+    if (event->type() == QEvent::GraphicsSceneMousePress && event->scenePos().y() > 70) {
         mPostcaptureTimer.stop();
         toggleControls();
         event->accept();
@@ -606,13 +615,7 @@
 void CxuiPostcaptureView::launchNotSupportedNotification()
 {
     CX_DEBUG_ENTER_FUNCTION();
-
-    // Instantiate a popup
-    HbNotificationDialog note;
-    note.setTitle("Notification");
-    note.setText("Not supported yet");
-    note.exec();
-
+    HbNotificationDialog::launchDialog("Notification", "Not supported yet");
     CX_DEBUG_EXIT_FUNCTION();
 }
 
--- a/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiprecaptureview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -101,7 +101,9 @@
     mSliderSettingsDialog(NULL),
     mSliderSettingsDialogHeading(NULL),
     mSettingsSlider(NULL),
-    mSettingsInfo(NULL)
+    mSettingsInfo(NULL),
+    mSettingsDialogOkAction(NULL),
+    mSliderSettingsDialogOkAction(NULL)
 {
     CX_DEBUG_ENTER_FUNCTION();
     mDisplayHandler = new CxuiDisplayPropertyHandler();
@@ -466,7 +468,8 @@
 //
 void CxuiPrecaptureView::mousePressEvent(QGraphicsSceneMouseEvent *event)
 {
-    if (event->type() == QEvent::GraphicsSceneMousePress) {
+    //! @todo temporary workaround for title bar mouse event handling bug
+    if (event->type() == QEvent::GraphicsSceneMousePress && event->scenePos().y() > 70) {
         toggleControls();
         event->accept();
     }
@@ -720,6 +723,9 @@
                                     documentLoader->findWidget(SETTINGS_DIALOG_CONTENT_WIDGET));
     CX_ASSERT_ALWAYS(mSettingsDialogList);
 
+    QObject *object = documentLoader->findObject(SETTINGS_DIALOG_OK_ACTION);
+    mSettingsDialogOkAction = qobject_cast<HbAction *>(object);
+    CX_DEBUG_ASSERT(mSettingsDialogOkAction);
 
     CX_DEBUG_EXIT_FUNCTION();
 
@@ -773,13 +779,12 @@
             // so we can easily decide if we show grid again or not.
             mSettingsDialog->setStarterAction(qobject_cast<HbAction *>(action));
 
-            HbAction *okAction = mSettingsDialog->primaryAction();
-            if (okAction) {
-                // disconnect primary action from dialog so that dialog won't be closed
+            if (mSettingsDialogOkAction) {
+                // disconnect ok action from dialog so that dialog won't be closed
                 // automatically when action is triggered. handleSelectionAccepted
                 // is called instead
-                okAction->disconnect(mSettingsDialog);
-                connect(okAction, SIGNAL(triggered()), mSettingsDialogList, SLOT(handleSelectionAccepted()));
+                mSettingsDialogOkAction->disconnect(mSettingsDialog);
+                connect(mSettingsDialogOkAction, SIGNAL(triggered()), mSettingsDialogList, SLOT(handleSelectionAccepted()));
 
                 // Close the dialog when new setting value is committed
                 connect(mSettingsDialogList, SIGNAL(selectionCommitted()), mSettingsDialog, SLOT(close()));
@@ -828,6 +833,9 @@
                                     documentLoader->findWidget(SETTINGS_SLIDER_DIALOG_CONTENT_WIDGET));
     CX_ASSERT_ALWAYS(mSettingsSlider);
 
+    QObject *object = documentLoader->findObject(SETTINGS_DIALOG_OK_ACTION);
+    mSliderSettingsDialogOkAction = qobject_cast<HbAction *>(object);
+    CX_DEBUG_ASSERT(mSliderSettingsDialogOkAction);
 
     CX_DEBUG_EXIT_FUNCTION();
 
@@ -879,13 +887,12 @@
             // so we can easily decide if we show grid again or not.
             mSliderSettingsDialog->setStarterAction(qobject_cast<HbAction *>(action));
 
-            HbAction *okAction = mSliderSettingsDialog->primaryAction();
-            if (okAction) {
-                // disconnect primary action from dialog so that dialog won't be closed
+            if (mSliderSettingsDialogOkAction) {
+                // disconnect ok action from dialog so that dialog won't be closed
                 // automatically when action is triggered. handleSelectionAccepted
                 // is called instead
-                okAction->disconnect(mSliderSettingsDialog);
-                connect(okAction, SIGNAL(triggered()), mSettingsSlider, SLOT(handleSelectionAccepted()));
+                mSliderSettingsDialogOkAction->disconnect(mSliderSettingsDialog);
+                connect(mSliderSettingsDialogOkAction, SIGNAL(triggered()), mSettingsSlider, SLOT(handleSelectionAccepted()));
 
                 // Close the dialog when new setting value is committed
                 connect(mSettingsSlider, SIGNAL(selectionCommitted()), mSliderSettingsDialog, SLOT(close()));
@@ -927,13 +934,7 @@
 void CxuiPrecaptureView::launchNotSupportedNotification()
 {
     CX_DEBUG_ENTER_FUNCTION();
-
-    // Instantiate a popup
-    HbNotificationDialog note;
-    note.setTitle("Notification");
-    note.setText("Not supported yet");
-    note.exec();
-
+    HbNotificationDialog::launchDialog("Notification", "Not supported yet");
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -1016,13 +1017,15 @@
 void CxuiPrecaptureView::addIncreaseDecreaseButtons(CxuiZoomSlider *slider)
 {
     // get current slider elements
-    QList<HbSlider::SliderElement> elements = slider->elements();
+    QList<QVariant> elements = slider->sliderElements();
+
     // add increase and decrease elements to the slider
     elements << HbSlider::IncreaseElement << HbSlider::DecreaseElement;
-    slider->setElements(elements);
+    slider->setSliderElements(elements);
+
     // set icons for the increase and decrease element
-    slider->setIcon(HbSlider::DecreaseElement , HbIcon("qtg_mono_minus"));
-    slider->setIcon(HbSlider::IncreaseElement , HbIcon("qtg_mono_plus"));
+    slider->setElementIcon(HbSlider::DecreaseElement , HbIcon("qtg_mono_minus"));
+    slider->setElementIcon(HbSlider::IncreaseElement , HbIcon("qtg_mono_plus"));
 }
 
 
@@ -1038,7 +1041,7 @@
 {
     if (widget) {
         HbFrameDrawer *drawer = new HbFrameDrawer(graphicName, frameType);
-    
+
         if (drawer) {
             HbFrameItem *backgroundItem = new HbFrameItem(drawer, widget);
             if (backgroundItem) {
--- a/camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuiscenemodeview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -271,6 +271,7 @@
 void CxuiSceneModeView::handleOkButtonPress()
 {
     CX_DEBUG_ENTER_FUNCTION();
+    mScenesList->handleSelectionAccepted();
     closeView();
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -326,7 +327,6 @@
 void CxuiSceneModeView::closeView()
 {
     CX_DEBUG_ENTER_FUNCTION();
-    mScenesList->handleSelectionAccepted();
     mScenesList->handleClose();
     mScenesBackground->setIcon(HbIcon());
     // Make sure engine prepares for new image/video if necessary
--- a/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuistillprecaptureview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -356,7 +356,10 @@
         capture();
     } else {
         // start focusing
-        handleAutofocusKeyPressed();
+        // Auto-focus can only work if viewfinder is running
+        if (mEngine->viewfinderControl().state() == CxeViewfinderControl::Running) {
+            mEngine->autoFocusControl().start(false);
+        }
         setCapturePending();
     }
 
@@ -370,7 +373,7 @@
 
     if (mEngine->mode() == Cxe::ImageMode) {
         // do not start capturing, if it is already ongoing
-        // the user might be repeatly triggering capture key
+        // the user might be repeatedly triggering capture key
         if (mEngine->stillCaptureControl().state() == CxeStillCaptureControl::Ready) {
             // If focusing in progress, cancel it now.
             // Set capture pending and continue once focusing is cancelled.
@@ -394,7 +397,6 @@
 
     // after capturing check what is the new amount for images left
     updateImagesLeftLabel();
-
     CX_DEBUG_EXIT_FUNCTION();
 }
 
--- a/camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/cxuivideoprecaptureview.cpp	Fri May 14 15:40:46 2010 +0300
@@ -29,7 +29,6 @@
 #include <hbmenu.h>
 #include <hbdialog.h>
 #include <hbnotificationdialog.h>
-#include <hbfeedbackplayer.h>
 #include <hbfeedbacksettings.h>
 #include <hbfeedbacknamespace.h>
 
@@ -60,6 +59,7 @@
 {
     static const int CXUI_ELAPSED_TIME_TIMEOUT = 1000; // 1 second
     static const int CXUI_RECORD_ANIMATION_DURATION = 3000; // milliseconds
+    static const int CXUI_PAUSE_TIMEOUT = 60*1000;   // 60 seconds
 
     //!@todo Localization?
     static const char* VIDEO_TIME_FORMAT = "%02d:%02d";
@@ -113,6 +113,10 @@
     connect(mVideoCaptureControl, SIGNAL(remainingTimeChanged()),
             this, SLOT(updateTimeLabels()));
 
+    mPauseTimer.setSingleShot(true);
+    connect(&mPauseTimer, SIGNAL(timeout()), this, SLOT(stop()));
+    mPauseTimer.setInterval(CXUI_PAUSE_TIMEOUT);
+
     HbAction *quitAction = new HbAction(Hb::QuitNaviAction, this);
     setNavigationAction(quitAction);
     connect(quitAction, SIGNAL(triggered()), this, SLOT(handleQuitClicked()));
@@ -251,12 +255,12 @@
 
     // Initializing recording indicator animation
     mRecordingAnimation = new QPropertyAnimation(mRecordingIcon, "opacity");
-    mRecordingAnimation->setStartValue(0.0);
+    mRecordingAnimation->setStartValue(0.2);
     mRecordingAnimation->setKeyValueAt(0.5, 1.0);
-    mRecordingAnimation->setEndValue(0.0);
+    mRecordingAnimation->setEndValue(0.2);
     mRecordingAnimation->setDuration(CXUI_RECORD_ANIMATION_DURATION);
     mRecordingAnimation->setLoopCount(-1);
-    mRecordingAnimation->setEasingCurve(QEasingCurve::InCubic);
+    mRecordingAnimation->setEasingCurve(QEasingCurve::OutInQuad);
 
     // Initialize the video time counters.
     updateTimeLabels();
@@ -306,7 +310,6 @@
 
     if (time) {
         mMenu = takeMenu();
-        hideControls();
         mVideoCaptureControl->record();
     } else {
         launchDiskFullNotification();
@@ -321,16 +324,9 @@
 
     CxeVideoCaptureControl::State state = mVideoCaptureControl->state();
     if (state == CxeVideoCaptureControl::Recording) {
-        if (mRecordingAnimation && mRecordingIcon) {
-            mVideoCaptureControl->pause();
-            mRecordingAnimation->stop();
-            }
-
-        // force update of toolbar
-        showToolbar();
+        mVideoCaptureControl->pause();
     } else if (state == CxeVideoCaptureControl::Paused) {
         mVideoCaptureControl->record();
-        //mRecordingAnimation->start();
     }
 
     CX_DEBUG_EXIT_FUNCTION();
@@ -408,10 +404,10 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    HbFeedbackPlayer* feedback = HbFeedbackPlayer::instance();
-    if (feedback) {
-        feedback->settings().disableFeedback();
-    }
+    HbFeedbackSettings settings;
+    settings.disableFeedback();
+
+
     CX_DEBUG_EXIT_FUNCTION();
 }
 
@@ -419,10 +415,9 @@
 {
     CX_DEBUG_ENTER_FUNCTION();
 
-    HbFeedbackPlayer* feedback = HbFeedbackPlayer::instance();
-    if (feedback) {
-        feedback->settings().disableFeedback();
-    }
+    HbFeedbackSettings settings;
+    settings.enableFeedback();
+
 
     CX_DEBUG_EXIT_FUNCTION();
 }
@@ -488,6 +483,21 @@
 }
 
 /*!
+  Overridded version of hideControls() that doesn't hide the controls when video recording
+  is paused.
+ */
+void CxuiVideoPrecaptureView::hideControls()
+{
+    if (mVideoCaptureControl && mVideoCaptureControl->state() == CxeVideoCaptureControl::Paused) {
+        // never hide controls in paused state
+        return;
+    }
+
+    CxuiPrecaptureView::hideControls();
+
+}
+
+/*!
 * Helper method for formatting video time to requested label.
 * @param label Text label to show the time.
 * @param time Time in seconds to be formatted to the label text.
@@ -547,6 +557,8 @@
 
     updateTimeLabels();
 
+    mPauseTimer.stop();
+
     switch (newState) {
     case CxeVideoCaptureControl::Ready:
         if (mDocumentLoader){
@@ -558,11 +570,15 @@
         }
         break;
     case CxeVideoCaptureControl::Recording:
+        hideControls();
         if (mDocumentLoader){
             mDocumentLoader->load(VIDEO_1ST_XML, VIDEO_PRE_CAPTURE_RECORDING);
         }
         mElapsedTimer.start(CXUI_ELAPSED_TIME_TIMEOUT);
         disableFeedback();
+        if (mRecordingAnimation && mRecordingIcon) {
+            mRecordingAnimation->start();
+        }
         break;
     case CxeVideoCaptureControl::Paused:
         mElapsedTimer.stop();
@@ -571,13 +587,21 @@
             mDocumentLoader->load(VIDEO_1ST_XML, VIDEO_PRE_CAPTURE_PAUSED);
         }
 
+        if (mRecordingAnimation && mRecordingIcon) {
+            mRecordingAnimation->stop();
+        }
+        showControls();
         enableFeedback();
+        mPauseTimer.start();
         break;
     case CxeVideoCaptureControl::Stopping:
         if (mDocumentLoader){
             mDocumentLoader->load(VIDEO_1ST_XML, VIDEO_PRE_CAPTURE_PAUSED);
         }
 
+        if (mRecordingAnimation && mRecordingIcon) {
+            mRecordingAnimation->stop();
+        }
         enableFeedback();
 
         if (isPostcaptureOn()) {
@@ -630,10 +654,10 @@
 
     switch (state) {
         case CxeVideoCaptureControl::Ready:
-        case CxeVideoCaptureControl::Paused:
             record();
             break;
         case CxeVideoCaptureControl::Recording:
+        case CxeVideoCaptureControl::Paused:
             stop();
             break;
         case CxeVideoCaptureControl::Idle:
@@ -671,7 +695,8 @@
     CX_DEBUG_ENTER_FUNCTION();
 
     CxeVideoCaptureControl::State state = mVideoCaptureControl->state();
-    if (state == CxeVideoCaptureControl::Recording){
+    if (state == CxeVideoCaptureControl::Recording ||
+        state == CxeVideoCaptureControl::Paused) {
         // Disable going to post-capture when video capture control goes to stopping state.
         disconnect(mVideoCaptureControl, SIGNAL(stateChanged(CxeVideoCaptureControl::State, CxeError::Id)),
                    this, SLOT(handleVideoStateChanged(CxeVideoCaptureControl::State,CxeError::Id)));
@@ -768,6 +793,29 @@
     }
 }
 
+/*!
+ * Overridden eventFilter() to restart the pause timer.
+ */
+bool CxuiVideoPrecaptureView::eventFilter(QObject *object, QEvent *event)
+{
+
+    if (mVideoCaptureControl && mVideoCaptureControl->state() == CxeVideoCaptureControl::Paused) {
+        // restart the timer if the screen is touched and we are in paused state
+        switch (event->type())
+        {
+        case QEvent::GraphicsSceneMouseRelease:
+            mPauseTimer.start();
+            break;
+        case QEvent::GraphicsSceneMousePress:
+            mPauseTimer.stop();
+            break;
+        default:
+            break;
+        }
+    }
+    return CxuiPrecaptureView::eventFilter(object, event);
+}
+
 
 
 //end of file
--- a/camerauis/cameraxui/cxui/src/main.cpp	Mon May 03 12:22:55 2010 +0300
+++ b/camerauis/cameraxui/cxui/src/main.cpp	Fri May 14 15:40:46 2010 +0300
@@ -71,7 +71,9 @@
     } else {
         // Normal mode. Init engine now.
         OstTrace0( camerax_performance, DUP9__MAIN, "msg: e_CX_INIT_ENGINE 1" );
-        eng->initMode(Cxe::ImageMode);
+		 //! @todo temporarily commented as part of a hack to change the startup sequence
+         // to avoid GOOM issues
+        //eng->initMode(Cxe::ImageMode);
         OstTrace0( camerax_performance, DUP10__MAIN, "msg: e_CX_INIT_ENGINE 0" );
     }
 
@@ -94,40 +96,39 @@
     app.installTranslator(&commonTranslator);
     OstTrace0( camerax_performance, DUP4__MAIN, "msg: e_CX_LOAD_TRANSLATIONS 0" );
 
-    // If the parent of the engine is set to be the
-    // HbApplication, then for some reason the engine won't be deleted
-    // on shutdown (or at least there will be no traces visible of it)
-    //eng->setParent(&app); // HbApplication will now own the engine
-
     OstTrace0( camerax_performance, DUP5__MAIN, "msg: e_CX_MAINWINDOW_CREATION 1" );
-    HbMainWindow mainWindow(0, Hb::WindowFlagTransparent |
-                               Hb::WindowFlagNoBackground);
-    mainWindow.setAttribute(Qt::WA_NoBackground);
+    HbMainWindow *mainWindow = new HbMainWindow(0, Hb::WindowFlagTransparent |
+                                                   Hb::WindowFlagNoBackground);
+    mainWindow->setAttribute(Qt::WA_NoBackground);
     OstTrace0( camerax_performance, DUP6__MAIN, "msg: e_CX_MAINWINDOW_CREATION 0" );
 
     OstTrace0( camerax_performance, DUP11__MAIN, "msg: e_CX_CREATE_VIEW_MANAGER 1" );
-    CxuiViewManager viewManager(app, mainWindow, *eng);
+    CxuiViewManager *viewManager = new CxuiViewManager(app, *mainWindow, *eng);
     OstTrace0( camerax_performance, DUP12__MAIN, "msg: e_CX_CREATE_VIEW_MANAGER 0" );
 
-    // Setting the viewmanager as the parent of the engine fixes the deletion issue
-    eng->setParent(&viewManager);
-
     OstTrace0( camerax_performance, DUP13__MAIN, "msg: e_CX_MAINWINDOW_SETORIENTATION 1" );
-    mainWindow.setOrientation(Qt::Horizontal);
+    mainWindow->setOrientation(Qt::Horizontal);
     OstTrace0( camerax_performance, DUP14__MAIN, "msg: e_CX_MAINWINDOW_SETORIENTATION 0" );
 
     OstTrace0( camerax_performance, DUP15__MAIN, "msg: e_CX_MAINWINDOW_FULLSCREEN 1" );
-    mainWindow.showFullScreen();
+    mainWindow->showFullScreen();
     OstTrace0( camerax_performance, DUP16__MAIN, "msg: e_CX_MAINWINDOW_FULLSCREEN 0" );
 
     OstTrace0( camerax_performance, DUP17__MAIN, "msg: e_CX_PREPAREWINDOW 1" );
-    viewManager.prepareWindow();
+    viewManager->prepareWindow();
     OstTrace0( camerax_performance, DUP18__MAIN, "msg: e_CX_PREPAREWINDOW 0" );
-
+    //! @todo initMode call added here as a temporary hack to change the startup sequence
+	// in order to avoid GOOM issues
+	  User::After(2000000);
+    eng->initMode(Cxe::ImageMode);
     int returnValue = app.exec();
 
     // delete service provider instance
     CxuiServiceProvider::destroy();
 
+    delete viewManager;
+    delete mainWindow;
+    delete eng;
+
     return returnValue;
 }