camerauis/cameraxui/cxui/inc/cxuiscenemodeview.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef CXUISCENEMODEVIEW_H
       
    18 #define CXUISCENEMODEVIEW_H
       
    19 
       
    20 #include <QMetaType>
       
    21 #include <QPropertyAnimation>
       
    22 #include <QTimer>
       
    23 #include <hbframedrawer.h>
       
    24 #include <hbview.h>
       
    25 #include <hbmainwindow.h>
       
    26 #include <hblabel.h>
       
    27 #include <hbpushbutton.h>
       
    28 
       
    29 #include "cxeerror.h"
       
    30 #include "cxenamespace.h"
       
    31 #include "cxuisettingsinfo.h"
       
    32 #include "cxuienums.h"
       
    33 #include "cxeengine.h"
       
    34 #include "cxuiview.h"
       
    35 
       
    36 class CxuiCaptureKeyHandler;
       
    37 class CxuiDocumentLoader;
       
    38 class HbPushButton;
       
    39 class HbLabel;
       
    40 class HbView;
       
    41 class CxuiSettingsInfo;
       
    42 
       
    43 
       
    44 /**
       
    45  * Scene mode view class for both video and still sides
       
    46  */
       
    47 
       
    48 
       
    49 class CxuiSceneModeView : public CxuiView
       
    50 {
       
    51     Q_OBJECT
       
    52 
       
    53 public:
       
    54     CxuiSceneModeView(QGraphicsItem *parent = 0);
       
    55 
       
    56     virtual ~CxuiSceneModeView();
       
    57 
       
    58 public:
       
    59 
       
    60     void construct(HbMainWindow *mainwindow,
       
    61                    CxeEngine *engine,
       
    62                    CxuiDocumentLoader *documentLoader,
       
    63                    CxuiCaptureKeyHandler *keyHandler,
       
    64                    HbActivityManager *activityManager);
       
    65 
       
    66     void loadDefaultWidgets();
       
    67     void loadBackgroundImages();
       
    68     void saveActivity();
       
    69 signals:
       
    70     void viewCloseEvent();
       
    71 
       
    72 public slots:
       
    73     void handleCaptureKeyPressed();
       
    74     void handleAutofocusKeyPressed();
       
    75 
       
    76 private slots:
       
    77     void handleSceneRadiobuttonPress(int index);
       
    78     void finishScenesTransition();
       
    79     void handleOkButtonPress();
       
    80     void handleCancelButtonPress();
       
    81 
       
    82 protected:
       
    83     void showEvent(QShowEvent *event);
       
    84     bool allowShowControls() const;
       
    85     bool isFeedbackEnabled() const;
       
    86 
       
    87 private:
       
    88     QString backgroundForScene(const QString& sceneId);
       
    89     void startBackgroundTransition();
       
    90 
       
    91     void connectSignals();
       
    92     void closeView();
       
    93 
       
    94 private:
       
    95     CxuiSettingsInfo *mSettingsInfo;
       
    96 
       
    97     HbLabel* mScenesBackground;
       
    98     HbLabel* mScenesBackground2;
       
    99     CxuiSettingRadioButtonList* mScenesList;
       
   100     QList<CxUiSettings::SettingItem> mSettingPairList;
       
   101     HbPushButton* mScenesOkButton;
       
   102     HbPushButton* mScenesCancelButton;
       
   103     HbWidget* mScenesContainer;
       
   104     HbLabel *mScenesHeading;
       
   105 
       
   106     QTimer mCameraReleaseTimer;
       
   107 
       
   108     QPropertyAnimation* mTransitionAnimation; //for mScenesBackground
       
   109 
       
   110 };
       
   111 
       
   112 #endif // CXUISCENEMODEVIEW_H