54
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 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 base class pre capture views
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CAMPRECAPTURECONTAINERBASE_H
|
|
21 |
#define CAMPRECAPTURECONTAINERBASE_H
|
|
22 |
|
|
23 |
// ===========================================================================
|
|
24 |
// INCLUDES
|
|
25 |
#include "CamAppController.h"
|
|
26 |
#include "CamContainerBase.h"
|
|
27 |
#include "CamControllerObservers.h"
|
|
28 |
#include "CamBurstModeObserver.h"
|
|
29 |
#include "CamZoomPane.h"
|
|
30 |
#include "CamPSI.h" // Product Specific Information
|
|
31 |
#include "cambatterypanecontroller.h"
|
|
32 |
#include "mcamcameraobserver.h" // MCamCameraObserver <CAMERAAPP_CAPI_V2_MIGRATION/>
|
|
33 |
|
|
34 |
#include "CamLocationIconController.h"
|
|
35 |
|
|
36 |
|
|
37 |
// ===========================================================================
|
|
38 |
// FORWARD DECLARATIONS
|
|
39 |
class CWindowGC;
|
|
40 |
class CAknView;
|
|
41 |
|
|
42 |
class CCamViewBase;
|
|
43 |
class CCamSidePane;
|
|
44 |
class CCamZoomPane;
|
|
45 |
class CCamIndicator;
|
|
46 |
class CCamTimeLapseSlider;
|
|
47 |
class MCamVfGridDrawer;
|
|
48 |
class CCamStartupLogo;
|
|
49 |
class CCamCaptureButtonContainer;
|
|
50 |
|
|
51 |
|
|
52 |
// ===========================================================================
|
|
53 |
// CLASS DECLARATION
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Container for still image pre capture view
|
|
57 |
*/
|
|
58 |
class CCamPreCaptureContainerBase : public CCamContainerBase,
|
|
59 |
public MCamControllerObserver,
|
|
60 |
public MCamCameraObserver,
|
|
61 |
public MCamSettingsModelObserver, // <CAMERAAPP_CAPI_V2_MIGRATION/>
|
|
62 |
// public MCamViewFinderObserver,
|
|
63 |
|
|
64 |
public MCamBurstModeObserver,
|
|
65 |
public MCamBatteryPaneObserver,
|
|
66 |
public MCamLocationIconObserver
|
|
67 |
|
|
68 |
{
|
|
69 |
// =========================================================================
|
|
70 |
// Typenames
|
|
71 |
public:
|
|
72 |
|
|
73 |
// enum TVfState moved to CCamContainerBase. Used in multiple child classes.
|
|
74 |
|
|
75 |
enum TCamPreCaptureSubControls
|
|
76 |
{
|
|
77 |
// ECamTimeLapseControl
|
|
78 |
ECamActivePalette = 1,
|
|
79 |
ECamCaptureButton
|
|
80 |
};
|
|
81 |
|
|
82 |
enum TFocusState
|
|
83 |
{
|
|
84 |
EFocusStateNormal,
|
|
85 |
EFocusStateFocusing,
|
|
86 |
EFocusStateFocusFailed,
|
|
87 |
EFocusStateFocusAchieved
|
|
88 |
};
|
|
89 |
|
|
90 |
// =========================================================================
|
|
91 |
// Public constructors and destructor
|
|
92 |
public:
|
|
93 |
|
|
94 |
/**
|
|
95 |
* Destructor.
|
|
96 |
*/
|
|
97 |
virtual ~CCamPreCaptureContainerBase();
|
|
98 |
|
|
99 |
// -------------------------------------------------------------------------
|
|
100 |
// From CoeControl
|
|
101 |
public:
|
|
102 |
|
|
103 |
/**
|
|
104 |
* @since 2.8
|
|
105 |
* @return number of contained controls
|
|
106 |
*/
|
|
107 |
virtual TInt CountComponentControls() const;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* @since 2.8
|
|
111 |
* @param aIndex The index of the control required
|
|
112 |
* @return The requested control
|
|
113 |
*/
|
|
114 |
virtual CCoeControl* ComponentControl(TInt aIndex) const;
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Locally takes actions needed due to resource changes, then
|
|
118 |
* calls the implementation in CCamContainerBase
|
|
119 |
* @since 2.8
|
|
120 |
* @param aType resource change
|
|
121 |
*/
|
|
122 |
virtual void HandleResourceChange( TInt aType );
|
|
123 |
|
|
124 |
|
|
125 |
/**
|
|
126 |
* @since 2.8
|
|
127 |
* @param aKeyEvent the key event
|
|
128 |
* @param aType the type of the event
|
|
129 |
* @return TKeyResponse key event was used by this control or not
|
|
130 |
*/
|
|
131 |
virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
|
|
132 |
TEventCode aType );
|
|
133 |
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Handle events sending app to foreground or background
|
|
137 |
* @since 2.8
|
|
138 |
* @param aForeground whether the event brings the app to fore or background
|
|
139 |
*/
|
|
140 |
virtual void HandleForegroundEventL( TBool aForeground );
|
|
141 |
|
|
142 |
/**
|
|
143 |
* Handle application level event.
|
|
144 |
* For example focus gained and lost are notified through this method.
|
|
145 |
* @param aEvent Event type
|
|
146 |
*/
|
|
147 |
virtual void HandleAppEvent( const TCamAppEvent& aEvent );
|
|
148 |
|
|
149 |
/**
|
|
150 |
* @since 2.8
|
|
151 |
* @param aVisible ETrue if the controls should be visible
|
|
152 |
*/
|
|
153 |
virtual void MakeVisible( TBool aVisible );
|
|
154 |
|
|
155 |
/**
|
|
156 |
* From CCoeControl
|
|
157 |
* Handle pointer events.
|
|
158 |
* @since S60 5.0
|
|
159 |
* @param aPointerEvent information about the pointerevent
|
|
160 |
*/
|
|
161 |
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
|
|
162 |
|
|
163 |
protected:
|
|
164 |
|
|
165 |
/**
|
|
166 |
* @since 2.8
|
|
167 |
* @param aRect area where to draw
|
|
168 |
*/
|
|
169 |
virtual void Draw( const TRect& aRect ) const;
|
|
170 |
|
|
171 |
/**
|
|
172 |
* From CCoeControl.
|
|
173 |
* @since 5.2
|
|
174 |
* @param aDrawNow Flag to indicate if the container should be drawn
|
|
175 |
*/
|
|
176 |
virtual void FocusChanged( TDrawNow aDrawNow );
|
|
177 |
|
|
178 |
// -------------------------------------------------------------------------
|
|
179 |
// From MCamControllerObserver
|
|
180 |
public:
|
|
181 |
|
|
182 |
/**
|
|
183 |
* @since 2.8
|
|
184 |
* @param aEvent The specific event which occurred
|
|
185 |
* @param aError The error code associated with the event
|
|
186 |
*/
|
|
187 |
virtual void HandleControllerEventL( TCamControllerEvent aEvent,
|
|
188 |
TInt aError );
|
|
189 |
|
|
190 |
// <CAMERAAPP_CAPI_V2_MIGRATION>
|
|
191 |
// -------------------------------------------------------------------------
|
|
192 |
// From MCamCameraObserver
|
|
193 |
public:
|
|
194 |
|
|
195 |
/**
|
|
196 |
* @since Camera 4.0
|
|
197 |
* @see MCamCameraObserver
|
|
198 |
*/
|
|
199 |
virtual void HandleCameraEventL( TInt aStatus,
|
|
200 |
TCamCameraEventId aEventId,
|
|
201 |
TAny* aEventData = NULL );
|
|
202 |
|
|
203 |
// -------------------------------------------------------------------------
|
|
204 |
// From MCamSettingsModelObserver
|
|
205 |
public:
|
|
206 |
|
|
207 |
/**
|
|
208 |
* Notification for change in integer setting item value.
|
|
209 |
*
|
|
210 |
*/
|
|
211 |
virtual void IntSettingChangedL( TCamSettingItemIds aSettingItem,
|
|
212 |
TInt aSettingValue );
|
|
213 |
|
|
214 |
/**
|
|
215 |
* Notification for change in text setting item value.
|
|
216 |
*
|
|
217 |
*/
|
|
218 |
virtual void TextSettingChangedL( TCamSettingItemIds aSettingItem,
|
|
219 |
const TDesC& aSettingValue );
|
|
220 |
|
|
221 |
|
|
222 |
// </CAMERAAPP_CAPI_V2_MIGRATION>
|
|
223 |
// -------------------------------------------------------------------------
|
|
224 |
// From MCamBatteryPaneObserver
|
|
225 |
public:
|
|
226 |
/**
|
|
227 |
* Called when battery pane has changed and redraw is needed
|
|
228 |
* @since 3.1
|
|
229 |
*/
|
|
230 |
void BatteryPaneUpdated();
|
|
231 |
|
|
232 |
|
|
233 |
// -------------------------------------------------------------------------
|
|
234 |
// From MCamLocationIconObserver
|
|
235 |
public:
|
|
236 |
/**
|
|
237 |
* Called when location icon status is changed
|
|
238 |
* @since 3.1
|
|
239 |
*/
|
|
240 |
void LocationIconUpdated();
|
|
241 |
|
|
242 |
// -------------------------------------------------------------------------
|
|
243 |
public:
|
|
244 |
|
|
245 |
/**
|
|
246 |
* Requests that the camera application redraws the supplied area
|
|
247 |
* @since 3.0
|
|
248 |
* @param aArea the area to redraw
|
|
249 |
*/
|
|
250 |
virtual void Redraw(const TRect& aArea);
|
|
251 |
|
|
252 |
public: // New functions
|
|
253 |
|
|
254 |
/**
|
|
255 |
* Handles CBA and Options menu keys
|
|
256 |
* @since 3.0
|
|
257 |
* @param aCommand The command to handle
|
|
258 |
*/
|
|
259 |
void HandleCommand( TInt aCommand );
|
|
260 |
|
|
261 |
/**
|
|
262 |
* Will show the zoom pane for a set time
|
|
263 |
* @since 2.8
|
|
264 |
*/
|
|
265 |
void ShowZoomPaneWithTimer();
|
|
266 |
|
|
267 |
/**
|
|
268 |
* Constructs Active Palette if not done yet.
|
|
269 |
* If Active Palette already exists, clears any existing items.
|
|
270 |
* Sets new items based on resource from GetAPResourceId.
|
|
271 |
* Registers the view for Active Palette.
|
|
272 |
*/
|
|
273 |
virtual void SetupActivePaletteL( CCamViewBase* aView );
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Tells the container to blink the resolution indicator
|
|
277 |
* when the resolution changes. The flag is reset after
|
|
278 |
* doing one blinking rountine or can be reset manually by
|
|
279 |
* calling the function with EFalse.
|
|
280 |
*/
|
|
281 |
void BlinkResolutionIndicatorOnChange( TBool aBlink=ETrue );
|
|
282 |
|
|
283 |
/**
|
|
284 |
* Updates the visibility of the capture button
|
|
285 |
* @since 5.2
|
|
286 |
*/
|
|
287 |
void UpdateCaptureButton();
|
|
288 |
|
|
289 |
/**
|
|
290 |
* Perform the UI adjustments just before start of capture
|
|
291 |
* @since 5.2
|
|
292 |
*/
|
|
293 |
void PrepareForCapture();
|
|
294 |
|
|
295 |
protected:
|
|
296 |
|
|
297 |
/**
|
|
298 |
* Callback for zoom timer when zoom pane needs to be hidden.
|
|
299 |
* @since 2.8
|
|
300 |
* @param aObject - Pointer to instance of CCamPreCaptureContainerBase
|
|
301 |
* @return KErrNone
|
|
302 |
*/
|
|
303 |
static TInt ZoomTimerCallback( TAny* aObject );
|
|
304 |
|
|
305 |
/**
|
|
306 |
* Callback for reticule timer,
|
|
307 |
* @since 3.0
|
|
308 |
* @param aObject - Pointer to instance of CCamPreCaptureContainerBase
|
|
309 |
* @return KErrNone
|
|
310 |
*/
|
|
311 |
static TInt ReticuleTimerCallback( TAny* aObject );
|
|
312 |
|
|
313 |
/**
|
|
314 |
* Member function called when zoom timer expires.
|
|
315 |
* @since 2.8
|
|
316 |
*/
|
|
317 |
void ZoomTimerTick();
|
|
318 |
|
|
319 |
/**
|
|
320 |
* Allows derived classes to draw mode-specific icons
|
|
321 |
* @param aGc The context to draw with
|
|
322 |
* @since 3.0
|
|
323 |
*/
|
|
324 |
virtual void DrawAdditionalIcons(CBitmapContext& aGc) const = 0;
|
|
325 |
|
|
326 |
/**
|
|
327 |
* Returns the rect of the resolution indicator
|
|
328 |
* @return The rect of the resolution icon as a TRect
|
|
329 |
* @since 3.0
|
|
330 |
*/
|
|
331 |
TRect ResolutionIndicatorRect() const;
|
|
332 |
|
|
333 |
/**
|
|
334 |
* Returns the ID of the array containing the resolution indicator icons
|
|
335 |
* @return The array ID
|
|
336 |
* @since 3.0
|
|
337 |
*/
|
|
338 |
virtual TCamPsiKey ResolutionIndicatorIconPsiKey() const = 0;
|
|
339 |
|
|
340 |
protected:
|
|
341 |
|
|
342 |
/**
|
|
343 |
* Draw viewfinder grid.
|
|
344 |
* Delegates call to iVfGridDrawer.
|
|
345 |
* Does not draw anything if grid has not been set visible.
|
|
346 |
* @param aGc The graphics context
|
|
347 |
*/
|
|
348 |
virtual void DrawVfGrid( CBitmapContext& aGc ) const;
|
|
349 |
|
|
350 |
/**
|
|
351 |
* Redraw part of viewfinder grid.
|
|
352 |
* Delegates call to iVfGridDrawer.
|
|
353 |
* Does not draw anything if grid has not been set visible.
|
|
354 |
* @param aRect The area to redraw
|
|
355 |
* @param aGc The graphics context
|
|
356 |
*/
|
|
357 |
virtual void ReDrawVfGrid( const TRect& aRect,
|
|
358 |
CBitmapContext& aGc ) const;
|
|
359 |
|
|
360 |
/**
|
|
361 |
* Init the viewfinder grid.
|
|
362 |
* Creates the grid drawer if not done yet.
|
|
363 |
* Set drawing rectangle and visibility.
|
|
364 |
*/
|
|
365 |
virtual void InitVfGridL( const TRect& aRect ) = 0;
|
|
366 |
|
|
367 |
/**
|
|
368 |
* Get the current setting for viewfinder grid visibility.
|
|
369 |
*/
|
|
370 |
virtual TBool GetVFGridVisibilitySetting() const;
|
|
371 |
|
|
372 |
/**
|
|
373 |
* Reset the viewfinder grid drawer visibility property with
|
|
374 |
* value asked from controller.
|
|
375 |
*/
|
|
376 |
virtual void ResetVFGridVisibility();
|
|
377 |
|
|
378 |
protected:
|
|
379 |
|
|
380 |
/**
|
|
381 |
* Symbian OS 2nd phase constructor.
|
|
382 |
* @since 2.8
|
|
383 |
* @param aRect Frame rectangle for container.
|
|
384 |
*/
|
|
385 |
void BaseConstructL( const TRect& aRect );
|
|
386 |
|
|
387 |
/**
|
|
388 |
* C++ constructor
|
|
389 |
* @since 2.8
|
|
390 |
* @param aController reference to CCamAppController instance
|
|
391 |
* @param aView reference to the view containing this container
|
|
392 |
*/
|
|
393 |
CCamPreCaptureContainerBase( CCamAppController& aController,
|
|
394 |
CAknView& aView );
|
|
395 |
|
|
396 |
private: // New Functions
|
|
397 |
|
|
398 |
/**
|
|
399 |
* Performs the actual BitBlt of the viewfinder frame
|
|
400 |
* @since 2.8
|
|
401 |
* @param aGc the graphics context
|
|
402 |
* @param aFrame pointer to the bitmap.
|
|
403 |
*/
|
|
404 |
void DrawFrameNow( CBitmapContext& aGc, const CFbsBitmap* aFrame ) const;
|
|
405 |
|
|
406 |
protected:
|
|
407 |
/**
|
|
408 |
* Autofocus indication layout from LAF
|
|
409 |
*
|
|
410 |
* @since S60 S60 v5.0
|
|
411 |
*/
|
|
412 |
void SizeChanged();
|
|
413 |
|
|
414 |
private:
|
|
415 |
/**
|
|
416 |
* Draws the reticule over the viewfinder
|
|
417 |
* @since 3.0
|
|
418 |
* @param aGc the graphics context
|
|
419 |
*/
|
|
420 |
void DrawReticule( CBitmapContext& aGc ) const;
|
|
421 |
|
|
422 |
/**
|
|
423 |
* Draw part of the reticule.
|
|
424 |
* Used to redraw areas left dirty by hiding AP tooltips.
|
|
425 |
* @param aRect The area to redraw
|
|
426 |
* @param aGc The graphics context
|
|
427 |
*/
|
|
428 |
void ReDrawReticule( const TRect& aRect,
|
|
429 |
CBitmapContext& aGc ) const;
|
|
430 |
|
|
431 |
/**
|
|
432 |
* Force the side-pane or zoom-pane to redraw. Called when they
|
|
433 |
* are required to be overlaid on the viewfinder.
|
|
434 |
* @since 2.8
|
|
435 |
*/
|
|
436 |
void ForceSideZoomPaneDraw() const;
|
|
437 |
|
|
438 |
/**
|
|
439 |
* Return the id of the layout resource for the viewfinder frame
|
|
440 |
* @since 2.8
|
|
441 |
* @param aViewFinderLayoutId on return this contains the resource id
|
|
442 |
* of the viewfinder layout
|
|
443 |
* @param aReticuleLayoutId on return this contains the resource id
|
|
444 |
* of the reticule layout if used, otherwise 0
|
|
445 |
*/
|
|
446 |
virtual void ViewFinderLayoutResourceIds( TInt& aViewFinderLayoutId,
|
|
447 |
TInt& aReticuleLayoutId ) const = 0;
|
|
448 |
|
|
449 |
/**
|
|
450 |
* Create the resolution indicator
|
|
451 |
* @since 2.8
|
|
452 |
*/
|
|
453 |
void CreateResolutionIndicatorL();
|
|
454 |
|
|
455 |
/**
|
|
456 |
* Sets the resolution indicator to the required icon
|
|
457 |
* @since 2.8
|
|
458 |
*/
|
|
459 |
virtual void SetResolutionIndicator() = 0;
|
|
460 |
|
|
461 |
/**
|
|
462 |
* Sets the location indicator icon if the setting is enabled
|
|
463 |
*/
|
|
464 |
virtual void SetLocationIndicatorVisibility() = 0;
|
|
465 |
|
|
466 |
/**
|
|
467 |
* Burst mode activation has changed
|
|
468 |
* @since 2.8
|
|
469 |
* @param aActive whether or not burst mode is active
|
|
470 |
* @param aStillModeActive whether or not still capture is active
|
|
471 |
*/
|
|
472 |
void BurstModeActiveL( TBool aActive, TBool aStillModeActive );
|
|
473 |
|
|
474 |
/**
|
|
475 |
* Process a key event that should change the current capture state
|
|
476 |
* E.g. start/pause recording, start/stop capture
|
|
477 |
* @since 3.0
|
|
478 |
* @param aKeyEvent the key press that initiates the capture
|
|
479 |
* @return whether or not the key was consumed
|
|
480 |
*/
|
|
481 |
virtual TKeyResponse HandleCaptureKeyEventL( const TKeyEvent& aKeyEvent ) = 0;
|
|
482 |
|
|
483 |
/**
|
|
484 |
* Process a key event that could change the current capture state
|
|
485 |
* E.g. start autofocus, revert from post-capture to pre-capture views
|
|
486 |
* @since 3.0
|
|
487 |
* @param aKeyEvent the key press that initiates the capture
|
|
488 |
* @param aType the event code type
|
|
489 |
* @return whether or not the key was consumed
|
|
490 |
*/
|
|
491 |
virtual TKeyResponse HandleShutterKeyEventL( const TKeyEvent& aKeyEvent,
|
|
492 |
TEventCode aType ) = 0;
|
|
493 |
|
|
494 |
/**
|
|
495 |
* Move up through the flash settings
|
|
496 |
* @since 3.0
|
|
497 |
*/
|
|
498 |
virtual void IncreaseFlashSettingL();
|
|
499 |
|
|
500 |
/**
|
|
501 |
* Move down through the flash settings
|
|
502 |
* @since 3.0
|
|
503 |
*/
|
|
504 |
virtual void DecreaseFlashSettingL();
|
|
505 |
|
|
506 |
/**
|
|
507 |
* Initiate behaviour in response to a navi key left/right arrow
|
|
508 |
* press
|
|
509 |
* @since 3.0
|
|
510 |
* @param aKeyEvent the key that has been pressed
|
|
511 |
* @param aType the Key type
|
|
512 |
* @return whether or not the key was consumed
|
|
513 |
*/
|
|
514 |
TKeyResponse HandleLeftRightNaviKeyL( const TKeyEvent& aKeyEvent,
|
|
515 |
TEventCode aType );
|
|
516 |
/**
|
|
517 |
* Draw side or zoom pane, softkeys and reticule
|
|
518 |
* @since 3.0
|
|
519 |
* @param aGc context to draw into
|
|
520 |
*/
|
|
521 |
void DrawScreenFurniture( CBitmapContext& aGc ) const;
|
|
522 |
|
|
523 |
/**
|
|
524 |
* Draw navi pane items
|
|
525 |
* @since 3.0
|
|
526 |
* @param aGc context to draw into
|
|
527 |
*/
|
|
528 |
void DrawNaviControls( CBitmapContext& aGc ) const;
|
|
529 |
|
|
530 |
/**
|
|
531 |
* Draw active palette
|
|
532 |
* @since 3.1
|
|
533 |
*/
|
|
534 |
void DrawActivePalette() const;
|
|
535 |
|
|
536 |
/**
|
|
537 |
* Draw active pallette
|
|
538 |
* @since 3.1
|
|
539 |
* @param aGc context to draw into
|
|
540 |
*/
|
|
541 |
void DrawActivePalette( CBitmapContext& aGc ) const;
|
|
542 |
|
|
543 |
/**
|
|
544 |
* Sets the iTimeLapseVisible flag
|
|
545 |
* @param aActive What to set iTimeLapseVisible to
|
|
546 |
*/
|
|
547 |
void SetTimeLapseVisible(TBool aActive);
|
|
548 |
|
|
549 |
void HandleOperationStateChangeEventL();
|
|
550 |
|
|
551 |
/**
|
|
552 |
* Gets the resource id of AP items.
|
|
553 |
* Needs to be implemented in inheriting classes.
|
|
554 |
*/
|
|
555 |
virtual TInt GetAPResourceId() const = 0;
|
|
556 |
|
|
557 |
/**
|
|
558 |
* Draws Screen content to graphics context
|
|
559 |
* @param aGc The context to draw with
|
|
560 |
* @param aFrame View Finder Frame to be drawn
|
|
561 |
*/
|
|
562 |
void DrawToContext(CBitmapContext& aGc, const CFbsBitmap* aFrame);
|
|
563 |
|
|
564 |
/**
|
|
565 |
* Creates a colored Autofocus indication icon
|
|
566 |
*
|
|
567 |
* @since S60 S60 v5.0
|
|
568 |
* @param aColor indication color
|
|
569 |
* @return TInt Created icon's offset in icons array
|
|
570 |
*/
|
|
571 |
TInt CreateAfIconL( TRgb aColor );
|
|
572 |
|
|
573 |
/**
|
|
574 |
* Creates a colored autofocus indication icon corner
|
|
575 |
*
|
|
576 |
* @since S60 S60 v5.0
|
|
577 |
* @param aColor indication color
|
|
578 |
* @param aFileBitmapId ID of the bitmap in the file
|
|
579 |
*/
|
|
580 |
void CreateAfCornerL( TRgb aColor, TInt aFileBitmapId );
|
|
581 |
|
|
582 |
/**
|
|
583 |
* Sets size of autofocus indication icon
|
|
584 |
*
|
|
585 |
* @since S60 S60 v5.0
|
|
586 |
* @param aOffset Offset in colored corner icon array
|
|
587 |
*/
|
|
588 |
void SetAfIconSize( TInt aOffset );
|
|
589 |
|
|
590 |
/**
|
|
591 |
* Draws corners of autofocus indication icon
|
|
592 |
*
|
|
593 |
* @since S60 S60 v5.0
|
|
594 |
* @param aGc Bitmap graphics context
|
|
595 |
* @param aOffset Offset in colored corner icon array
|
|
596 |
*/
|
|
597 |
void DrawAf( CBitmapContext& aGc, TInt aOffset ) const;
|
|
598 |
|
|
599 |
/**
|
|
600 |
* Read nontouch layout
|
|
601 |
*/
|
|
602 |
void NonTouchLayout();
|
|
603 |
|
|
604 |
/**
|
|
605 |
* Read touch layout
|
|
606 |
*/
|
|
607 |
void TouchLayout();
|
|
608 |
|
|
609 |
/**
|
|
610 |
* Callback used by timer to blink resolution indicator
|
|
611 |
* @since 5.2
|
|
612 |
* @param aSelf Pointer to self (container)
|
|
613 |
*/
|
|
614 |
static TInt IndicatorVisible( TAny *aSelf );
|
|
615 |
|
|
616 |
/**
|
|
617 |
* Draw resolution indicator (for blinking).
|
|
618 |
* @since 5.2
|
|
619 |
*/
|
|
620 |
void DrawResolutionIndicator();
|
|
621 |
|
|
622 |
// =========================================================================
|
|
623 |
// Data
|
|
624 |
protected:
|
|
625 |
|
|
626 |
// Pointer to the instance of the side pane
|
|
627 |
CCamSidePane* iSidePane;
|
|
628 |
|
|
629 |
// Pointer to the instance of the zoom pane
|
|
630 |
CCamZoomPane* iZoomPane;
|
|
631 |
|
|
632 |
// Array of pointer to the resolution indicators
|
|
633 |
RPointerArray<CCamIndicator> iResolutionIndicators;
|
|
634 |
|
|
635 |
// The current indicator
|
|
636 |
TInt iCurrentIndicator;
|
|
637 |
|
|
638 |
// The visibility of the location indicator
|
|
639 |
TBool iLocationIndicatorVisible;
|
|
640 |
CCamLocationIconController* iLocationIconController;
|
|
641 |
|
|
642 |
// Is reticule to be displayed or not (for when flashing)
|
|
643 |
TBool iShowReticule;
|
|
644 |
|
|
645 |
// Whether the current Photo Scene requires a reticule (some scenes do not focus)
|
|
646 |
TBool iPhotoSceneUsesReticule;
|
|
647 |
|
|
648 |
TBool iNaviPaneActive;
|
|
649 |
|
|
650 |
// If set, redraw calls are ignored.
|
|
651 |
TBool iDisableRedraws;
|
|
652 |
|
|
653 |
// Viewfinder rect.
|
|
654 |
TRect iRect;
|
|
655 |
|
|
656 |
// Timer used to remove zoom pane after a short delay
|
|
657 |
CPeriodic* iZoomTimer;
|
|
658 |
|
|
659 |
// Keys to use for detecting zoom in and out key events
|
|
660 |
TInt iZoomInKey;
|
|
661 |
TInt iZoomOutKey;
|
|
662 |
|
|
663 |
// whether we are left or right handed
|
|
664 |
TCamHandedness iHandedness;
|
|
665 |
|
|
666 |
|
|
667 |
// Reticule location and size
|
|
668 |
TRect iReticuleRect;
|
|
669 |
|
|
670 |
// Icons and rect for capturing image
|
|
671 |
CCamCaptureButtonContainer* iCaptureButtonContainer;
|
|
672 |
|
|
673 |
/**
|
|
674 |
* Autofocus indication icons array.
|
|
675 |
*/
|
|
676 |
RPointerArray<CFbsBitmap> iAfIcons;
|
|
677 |
|
|
678 |
/**
|
|
679 |
* Autofocus indication: White ready icon.
|
|
680 |
*/
|
|
681 |
TInt iAfReadyIcon;
|
|
682 |
|
|
683 |
/**
|
|
684 |
* Autofocus indication: Green focused icon.
|
|
685 |
*/
|
|
686 |
TInt iAfFocusIcon;
|
|
687 |
|
|
688 |
/**
|
|
689 |
* Autofocus indication: Yellow error icon.
|
|
690 |
*/
|
|
691 |
TInt iAfErrIcon;
|
|
692 |
|
|
693 |
/**
|
|
694 |
* Autofocus indication icons layout
|
|
695 |
*/
|
|
696 |
RArray<TAknLayoutRect> iLayouts;
|
|
697 |
|
|
698 |
/**
|
|
699 |
* Autofocus layout
|
|
700 |
*/
|
|
701 |
TSize iAfIconCornerSize;
|
|
702 |
|
|
703 |
// Timer used for the flashing of the reticule
|
|
704 |
CPeriodic* iReticuleTimer;
|
|
705 |
|
|
706 |
// Whether the reticule is visible or not during 'flash' on/off
|
|
707 |
TBool iReticuleFlashOn;
|
|
708 |
|
|
709 |
// Current state of focus (reflected by reticule)
|
|
710 |
TFocusState iFocusState;
|
|
711 |
|
|
712 |
// Determines if a stored image should be used in Draw() functions
|
|
713 |
TBool iFreezeFrame;
|
|
714 |
|
|
715 |
// Determine from PSI if side & zoom pane are overlaid on VF
|
|
716 |
TBool iOverlayViewFinder;
|
|
717 |
|
|
718 |
// width of the zoom pane
|
|
719 |
TInt iZoomPaneWidth;
|
|
720 |
|
|
721 |
// The Time Lapse control
|
|
722 |
CCamTimeLapseSlider* iTimeLapseSlider;
|
|
723 |
|
|
724 |
// Whether the Time Lapse control is visible
|
|
725 |
TBool iTimeLapseVisible;
|
|
726 |
|
|
727 |
// Layout rect for the Timelapse control
|
|
728 |
TAknLayoutRect iTimeLapseLayout;
|
|
729 |
|
|
730 |
// Determines if the zoom pane background needs redrawing
|
|
731 |
TBool iRedrawPaneBackground;
|
|
732 |
|
|
733 |
// Determines if the viewfinder should use an off screen bitmap
|
|
734 |
TBool iUseOffScreenBitmap;
|
|
735 |
|
|
736 |
// Offscreen drawing members
|
|
737 |
CFbsBitmap* iOffScreenBitmap;
|
|
738 |
CFbsBitGc* iBitmapGc;
|
|
739 |
CFbsBitmapDevice* iBitmapDevice;
|
|
740 |
|
|
741 |
// True if this container has received any viewfinder frames
|
|
742 |
TBool iReceivedVfFrame;
|
|
743 |
|
|
744 |
// True if application is shutting down
|
|
745 |
TBool iShuttingDown;
|
|
746 |
|
|
747 |
TRect iVFRect;
|
|
748 |
|
|
749 |
TRect iVfGridRect;
|
|
750 |
MCamVfGridDrawer* iVfGridDrawer;
|
|
751 |
|
|
752 |
CCamBatteryPaneController* iBatteryPaneController;
|
|
753 |
|
|
754 |
CFbsBitmap* iViewFinderBackup;
|
|
755 |
|
|
756 |
// For blinking of resolution indicator
|
|
757 |
TBool iBlinkResolutionIndicator;
|
|
758 |
TBool iBlinkModeIndicator;
|
|
759 |
CPeriodic* iIndBlinkTimer;
|
|
760 |
TBool iDrawIndicator;
|
|
761 |
TInt iToggleCountdown;
|
|
762 |
|
|
763 |
// Startup animation control
|
|
764 |
CCamStartupLogo* iStartupLogo;
|
|
765 |
// =========================================================================
|
|
766 |
};
|
|
767 |
|
|
768 |
#endif // CAMPRECAPTURECONTAINERBASE_H
|
|
769 |
|
|
770 |
// End of File
|