--- a/camerauis/cameraxui/cxui/inc/cxuiviewmanager.h Fri Apr 16 14:51:30 2010 +0300
+++ b/camerauis/cameraxui/cxui/inc/cxuiviewmanager.h Mon May 03 12:22:55 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -24,30 +24,29 @@
#include "cxeviewfindercontrol.h"
#include "cxenamespace.h"
#include "cxeerror.h"
+#include "cxuiapplicationframeworkmonitor.h"
+
class QGraphicsSceneMouseEvent;
+class HbMainWindow;
+class CxuiApplication;
class CxuiCaptureKeyHandler;
-class XQSettingsManager;
-class XQSettingsKey;
-class HbMainWindow;
-
class CxuiPrecaptureView;
class CxuiStillPrecaptureView;
-class CxuiStillPrecaptureView2;
class CxuiVideoPrecaptureView;
-class CxuiVideoPrecaptureView2;
class CxuiPostcaptureView;
class CxeEngine;
class CxuiDocumentLoader;
class CxuiErrorManager; // class that handles all errors in ui.
class CxuiStandby;
+class CxuiSceneModeView;
class CxuiViewManager : public QObject
{
Q_OBJECT
public:
- CxuiViewManager(HbMainWindow &mainWindow, CxeEngine &engine, CxuiCaptureKeyHandler &keyHandler);
+ CxuiViewManager(CxuiApplication &application, HbMainWindow &mainWindow, CxeEngine &engine);
~CxuiViewManager();
void prepareWindow();
@@ -60,20 +59,14 @@
public slots:
void changeToPostcaptureView();
void changeToPrecaptureView();
-
- /**
- * Switch camera from primary to secondary or vise versa.
- */
void switchCamera();
-
- /**
- * Event monitor can be used to monitor changes in cenrep and PS values.
- */
- void eventMonitor(const XQSettingsKey& key, const QVariant& value);
-
void createPostcaptureView();
+ void showScenesView();
private slots:
+ void toForeground();
+ void handleForegroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState state);
+ void handleBatteryEmpty();
void aboutToLooseFocus();
void aboutToGainFocus();
@@ -81,18 +74,19 @@
void focusGained();
void focusLost();
void batteryEmpty();
+ void disableStandbyTimer();
+ void startStandbyTimer();
protected:
bool eventFilter(QObject *object, QEvent *event);
private:
- void startEventMonitors();
void createStillPrecaptureView();
- void createStillPrecaptureView2();
void createVideoPrecaptureView();
- void createVideoPrecaptureView2();
CxuiPrecaptureView* getPrecaptureView(Cxe::CameraMode mode, Cxe::CameraIndex camera);
+ void createSceneModesView();
+
/*
* connects all necessary signals for precapture view
*/
@@ -117,25 +111,21 @@
private:
//data
+ CxuiApplication &mApplication;
HbMainWindow &mMainWindow;
CxuiStillPrecaptureView *mStillPrecaptureView;
CxuiVideoPrecaptureView *mVideoPrecaptureView;
CxuiPostcaptureView *mPostcaptureView;
- CxuiStillPrecaptureView2 *mStillPrecaptureView2;
- CxuiVideoPrecaptureView2 *mVideoPrecaptureView2;
-
CxeEngine &mEngine;
- CxuiCaptureKeyHandler &mKeyHandler;
+ CxuiCaptureKeyHandler *mKeyHandler;
+ CxuiApplicationFrameworkMonitor *mApplicationMonitor;
private:
- XQSettingsManager *mSettingsManager;
- int mKeyLockState; //! @todo: Needed due to Settings manager error: valueChanged is emmitted with same value repeatedly
- int mBatteryStatus;
- bool mFocused;
CxuiDocumentLoader *mCameraDocumentLoader;
CxuiStandby *mStandbyHandler;
CxuiErrorManager *mErrorManager;
+ CxuiSceneModeView *mSceneModeView;
};
#endif // CXUIVIEWMANAGER_H