camerauis/cameraxui/cxui/inc/cxuiscenemodeview.h
changeset 43 0e652f8f1fbd
parent 28 3075d9b614e6
equal deleted inserted replaced
28:3075d9b614e6 43:0e652f8f1fbd
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    29 #include "cxeerror.h"
    29 #include "cxeerror.h"
    30 #include "cxenamespace.h"
    30 #include "cxenamespace.h"
    31 #include "cxuisettingsinfo.h"
    31 #include "cxuisettingsinfo.h"
    32 #include "cxuienums.h"
    32 #include "cxuienums.h"
    33 #include "cxeengine.h"
    33 #include "cxeengine.h"
       
    34 #include "cxuiview.h"
    34 
    35 
    35 class CxuiCaptureKeyHandler;
    36 class CxuiCaptureKeyHandler;
    36 class CxuiDocumentLoader;
    37 class CxuiDocumentLoader;
    37 class HbPushButton;
    38 class HbPushButton;
    38 class HbLabel;
    39 class HbLabel;
    43 /**
    44 /**
    44  * Scene mode view class for both video and still sides
    45  * Scene mode view class for both video and still sides
    45  */
    46  */
    46 
    47 
    47 
    48 
    48 class CxuiSceneModeView : public HbView
    49 class CxuiSceneModeView : public CxuiView
    49 {
    50 {
    50     Q_OBJECT
    51     Q_OBJECT
    51 
    52 
    52 public:
    53 public:
    53     CxuiSceneModeView(QGraphicsItem *parent = 0);
    54     CxuiSceneModeView(QGraphicsItem *parent = 0);
    57 public:
    58 public:
    58 
    59 
    59     void construct(HbMainWindow *mainwindow,
    60     void construct(HbMainWindow *mainwindow,
    60                    CxeEngine *engine,
    61                    CxeEngine *engine,
    61                    CxuiDocumentLoader *documentLoader,
    62                    CxuiDocumentLoader *documentLoader,
    62                    CxuiCaptureKeyHandler *keyHandler = NULL);
    63                    CxuiCaptureKeyHandler *keyHandler,
       
    64                    HbActivityManager *activityManager);
    63 
    65 
    64     void loadDefaultWidgets();
    66     void loadDefaultWidgets();
    65     void loadBackgroundImages();
    67     void loadBackgroundImages();
    66 
    68     void saveActivity();
    67 signals:
    69 signals:
    68     void viewCloseEvent();
    70     void viewCloseEvent();
    69 
    71 
    70 public slots:
    72 public slots:
    71     void handleCaptureKeyPressed();
    73     void handleCaptureKeyPressed();
    74 private slots:
    76 private slots:
    75     void handleSceneRadiobuttonPress(int index);
    77     void handleSceneRadiobuttonPress(int index);
    76     void finishScenesTransition();
    78     void finishScenesTransition();
    77     void handleOkButtonPress();
    79     void handleOkButtonPress();
    78     void handleCancelButtonPress();
    80     void handleCancelButtonPress();
    79     void releaseCameraHw();
       
    80 
    81 
    81 protected:
    82 protected:
    82     void showEvent(QShowEvent *event);
    83     void showEvent(QShowEvent *event);
       
    84     bool allowShowControls() const;
       
    85     bool isFeedbackEnabled() const;
    83 
    86 
    84 private:
    87 private:
    85     QString backgroundForScene(const QString& sceneId);
    88     QString backgroundForScene(const QString& sceneId);
    86     void startBackgroundTransition();
    89     void startBackgroundTransition();
    87     void createWidgetBackgroundGraphic(HbWidget *widget,
       
    88                            const QString &graphicName,
       
    89                            HbFrameDrawer::FrameType frameType =
       
    90                            HbFrameDrawer::NinePieces);
       
    91 
    90 
    92     void connectSignals();
    91     void connectSignals();
    93     void closeView();
    92     void closeView();
    94 
    93 
    95 private:
    94 private:
    96     HbMainWindow *mMainWindow; //not own
       
    97     CxuiSettingsInfo *mSettingsInfo;
    95     CxuiSettingsInfo *mSettingsInfo;
    98     CxeEngine *mEngine; //not own
       
    99     CxuiDocumentLoader *mDocumentLoader; //not own
       
   100     CxuiCaptureKeyHandler *mCaptureKeyHandler;
       
   101 
    96 
   102     HbLabel* mScenesBackground;
    97     HbLabel* mScenesBackground;
   103     HbLabel* mScenesBackground2;
    98     HbLabel* mScenesBackground2;
   104     CxuiSettingRadioButtonList* mScenesList;
    99     CxuiSettingRadioButtonList* mScenesList;
   105     QList<CxUiSettings::SettingItem> mSettingPairList;
   100     QList<CxUiSettings::SettingItem> mSettingPairList;
   106     HbPushButton* mScenesOkButton;
   101     HbPushButton* mScenesOkButton;
   107     HbPushButton* mScenesCancelButton;
   102     HbPushButton* mScenesCancelButton;
   108     HbWidget* mScenesContainer;
   103     HbWidget* mScenesContainer;
       
   104     HbLabel *mScenesHeading;
   109 
   105 
   110     QTimer mCameraReleaseTimer;
   106     QTimer mCameraReleaseTimer;
   111 
   107 
   112     QPropertyAnimation* mTransitionAnimation; //for mScenesBackground
   108     QPropertyAnimation* mTransitionAnimation; //for mScenesBackground
   113 
   109