|
1 /* |
|
2 * Copyright (c) 2009 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 |
|
35 class CxuiCaptureKeyHandler; |
|
36 class CxuiDocumentLoader; |
|
37 class HbPushButton; |
|
38 class HbLabel; |
|
39 class HbView; |
|
40 class CxuiSettingsInfo; |
|
41 |
|
42 |
|
43 /** |
|
44 * Scene mode view class for both video and still sides |
|
45 */ |
|
46 |
|
47 |
|
48 class CxuiSceneModeView : public HbView |
|
49 { |
|
50 Q_OBJECT |
|
51 |
|
52 public: |
|
53 CxuiSceneModeView(QGraphicsItem *parent = 0); |
|
54 |
|
55 virtual ~CxuiSceneModeView(); |
|
56 |
|
57 public: |
|
58 |
|
59 void construct(HbMainWindow *mainwindow, |
|
60 CxeEngine *engine, |
|
61 CxuiDocumentLoader *documentLoader, |
|
62 CxuiCaptureKeyHandler *keyHandler = NULL); |
|
63 |
|
64 void loadDefaultWidgets(); |
|
65 void loadBackgroundImages(); |
|
66 |
|
67 signals: |
|
68 void viewCloseEvent(); |
|
69 |
|
70 public slots: |
|
71 void handleCaptureKeyPressed(); |
|
72 void handleAutofocusKeyPressed(); |
|
73 |
|
74 private slots: |
|
75 void handleSceneRadiobuttonPress(int index); |
|
76 void finishScenesTransition(); |
|
77 void handleOkButtonPress(); |
|
78 void handleCancelButtonPress(); |
|
79 void releaseCameraHw(); |
|
80 |
|
81 protected: |
|
82 void showEvent(QShowEvent *event); |
|
83 |
|
84 private: |
|
85 QString backgroundForScene(const QString& sceneId); |
|
86 void startBackgroundTransition(); |
|
87 void createWidgetBackgroundGraphic(HbWidget *widget, |
|
88 const QString &graphicName, |
|
89 HbFrameDrawer::FrameType frameType = |
|
90 HbFrameDrawer::NinePieces); |
|
91 |
|
92 void connectSignals(); |
|
93 void closeView(); |
|
94 |
|
95 private: |
|
96 HbMainWindow *mMainWindow; //not own |
|
97 CxuiSettingsInfo *mSettingsInfo; |
|
98 CxeEngine *mEngine; //not own |
|
99 CxuiDocumentLoader *mDocumentLoader; //not own |
|
100 CxuiCaptureKeyHandler *mCaptureKeyHandler; |
|
101 |
|
102 HbLabel* mScenesBackground; |
|
103 HbLabel* mScenesBackground2; |
|
104 CxuiSettingRadioButtonList* mScenesList; |
|
105 QList<CxUiSettings::SettingItem> mSettingPairList; |
|
106 HbPushButton* mScenesOkButton; |
|
107 HbPushButton* mScenesCancelButton; |
|
108 HbWidget* mScenesContainer; |
|
109 |
|
110 QTimer mCameraReleaseTimer; |
|
111 |
|
112 QPropertyAnimation* mTransitionAnimation; //for mScenesBackground |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // CXUISCENEMODEVIEW_H |