1 /* |
|
2 * Copyright (c) 2007 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: Container for still Post capture view |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAMPOSTCAPTURECONTAINER_H |
|
21 #define CAMPOSTCAPTURECONTAINER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "CamContainerBase.h" |
|
25 #include "CamControllerObservers.h" |
|
26 |
|
27 #include "cambatterypanecontroller.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CCamAppController; |
|
31 class CAknView; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Container for still image Post capture view |
|
37 */ |
|
38 class CCamPostCaptureContainer : public CCamContainerBase, |
|
39 public MCamControllerObserver, |
|
40 public MCamBatteryPaneObserver |
|
41 { |
|
42 public: |
|
43 |
|
44 enum TCamPostCaptureSubControls |
|
45 { |
|
46 ECamPostCaptureSubControlNaviPane = 1, |
|
47 ECamPostCaptureActivePalette |
|
48 }; |
|
49 |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Symbian OS two-phased constructor |
|
54 * @since 2.8 |
|
55 * @param aController reference to CCamAppControllerBase instance |
|
56 * @param aView reference to the view containing this container |
|
57 * @param aRect Frame rectangle for container. |
|
58 */ |
|
59 static CCamPostCaptureContainer* NewL( CCamAppController& aController, |
|
60 CAknView& aView, |
|
61 const TRect& aRect ); |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 * @since 2.8 |
|
66 */ |
|
67 virtual ~CCamPostCaptureContainer(); |
|
68 |
|
69 private: |
|
70 /** |
|
71 * Symbian OS 2nd phase constructor. |
|
72 * @since 2.8 |
|
73 * @param aRect Frame rectangle for container. |
|
74 */ |
|
75 void ConstructL( const TRect& aRect ); |
|
76 |
|
77 /** |
|
78 * C++ constructor |
|
79 * @since 2.8 |
|
80 * @param aController reference to CCamAppControllerBase instance |
|
81 * @param aView reference to the view containing this container |
|
82 */ |
|
83 CCamPostCaptureContainer( CCamAppController& aController, |
|
84 CAknView& aView ); |
|
85 |
|
86 public: // Functions from base classes |
|
87 /** |
|
88 * From CamContainerBase |
|
89 * @since 2.8 |
|
90 * @param aKeyEvent the key event |
|
91 * @param aType the type of the event |
|
92 * @return TKeyResponse key event was used by this control or not |
|
93 */ |
|
94 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
95 TEventCode aType ); |
|
96 |
|
97 /** |
|
98 * Will show the zoom pane for a set time |
|
99 * Only implemented by pre capture containers |
|
100 * @since 2.8 |
|
101 */ |
|
102 void ShowZoomPaneWithTimer(); |
|
103 |
|
104 /** |
|
105 * We check for the file name whenever we call the UMP |
|
106 * or Properties view and come back. |
|
107 */ |
|
108 void CheckForFileName( TBool aDoCheck ); |
|
109 |
|
110 /** |
|
111 * Requests that the camera application redraws the supplied area |
|
112 * @since 3.0 |
|
113 * @param aArea the area to redraw |
|
114 */ |
|
115 virtual void Redraw(const TRect& aArea); |
|
116 |
|
117 /** |
|
118 * From CCamContainerBase / CCoeControl |
|
119 * Locally takes actions needed due to resource changes, then |
|
120 * calls the implementation in CCamContainerBase |
|
121 * @since 2.8 |
|
122 * @param aType resource change |
|
123 */ |
|
124 virtual void HandleResourceChange( TInt aType ); |
|
125 |
|
126 /** |
|
127 * Handle application level event. |
|
128 * For example focus gained and lost are notified through this method. |
|
129 * @param aEvent Event type |
|
130 */ |
|
131 virtual void HandleAppEvent( const TCamAppEvent& aEvent ); |
|
132 |
|
133 /** |
|
134 * From MCamBatteryPaneObserver |
|
135 * Called when battery pane has changed and redraw is needed |
|
136 * @since 3.1 |
|
137 */ |
|
138 void BatteryPaneUpdated(); |
|
139 |
|
140 /** |
|
141 * From CoeControl |
|
142 * @param aPointerEvent the pointer event to handle |
|
143 */ |
|
144 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
145 |
|
146 protected: // Functions from base classes |
|
147 /** |
|
148 * From CoeControl |
|
149 * @since 2.8 |
|
150 * @return number of contained controls |
|
151 */ |
|
152 TInt CountComponentControls() const; |
|
153 |
|
154 /** |
|
155 * From CoeControl |
|
156 * @since 2.8 |
|
157 * @return number of contained controls |
|
158 */ |
|
159 CCoeControl* ComponentControl( TInt aIndex ) const; |
|
160 |
|
161 /** |
|
162 * From CCoeControl |
|
163 * @since 2.8 |
|
164 * @param aRect area where to draw |
|
165 */ |
|
166 void Draw( const TRect& aRect ) const; |
|
167 |
|
168 |
|
169 /** |
|
170 * From MCamControllerObserver |
|
171 * @since 2.8 |
|
172 * @param aEvent The enumerated code for the event received |
|
173 * @param aError The error code associated with the event |
|
174 */ |
|
175 void HandleControllerEventL( TCamControllerEvent aEvent, |
|
176 TInt aError ); |
|
177 |
|
178 private: // Data |
|
179 // The full screen dimensions |
|
180 TSize iScreenSize; |
|
181 |
|
182 CCamBatteryPaneController* iBatteryPaneController; |
|
183 TBool iCheckForFileNameChange; |
|
184 |
|
185 TBool iUpdatingBatteryPane; //Needed for drawing black background behind battery pane in Video mode |
|
186 |
|
187 // Play icon bitmaps |
|
188 CFbsBitmap* iPlayIcon; |
|
189 CFbsBitmap* iPlayIconMask; |
|
190 |
|
191 CFbsBitmap* iPlayIconBg; |
|
192 CFbsBitmap* iPlayIconBgMask; |
|
193 |
|
194 CFbsBitmap* iPlayIconBgPressed; |
|
195 CFbsBitmap* iPlayIconBgPressedMask; |
|
196 |
|
197 //Bools to control play button feedback |
|
198 TBool iPlayIconPressed; |
|
199 TBool iDraggedInAlready; |
|
200 }; |
|
201 |
|
202 #endif |
|
203 |
|
204 // End of File |
|