54
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-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: Class for displaying capture set-up controls*
|
|
15 |
*/
|
|
16 |
|
|
17 |
|
|
18 |
#ifndef CAMCAPTURESETUPCONTAINER_H
|
|
19 |
#define CAMCAPTURESETUPCONTAINER_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <AknUtils.h>
|
|
23 |
#include <eiklbo.h>
|
|
24 |
|
|
25 |
#include "CamContainerBase.h"
|
|
26 |
#include "CamControllerObservers.h"
|
|
27 |
#include "mcamcameraobserver.h"
|
|
28 |
|
|
29 |
|
|
30 |
// FORWARD DECLARATIONS
|
|
31 |
class CCamCaptureSetupControlHandler;
|
|
32 |
class MTouchFeedback;
|
|
33 |
|
|
34 |
|
|
35 |
// CLASS DECLARATION
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Container base class
|
|
39 |
*/
|
|
40 |
class CCamCaptureSetupContainer : public CCamContainerBase,
|
|
41 |
public MCamCameraObserver,
|
|
42 |
public MEikListBoxObserver
|
|
43 |
// public MCamViewFinderObserver
|
|
44 |
{
|
|
45 |
public: // Constructors and destructor
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Symbian OS two-phased constructor
|
|
49 |
* @since 2.8
|
|
50 |
* @param aController Controller reference
|
|
51 |
* @param aView View reference
|
|
52 |
* @param aControlHandler Handler reference
|
|
53 |
* @param aRect Frame rectangle for container.
|
|
54 |
*/
|
|
55 |
static CCamCaptureSetupContainer* NewL(
|
|
56 |
CCamAppController& aController,
|
|
57 |
CAknView& aView,
|
|
58 |
CCamCaptureSetupControlHandler& aControlHandler,
|
|
59 |
const TRect& aRect,
|
|
60 |
TBool aFullScreenVF=ETrue );
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Destructor.
|
|
64 |
* @since 2.8
|
|
65 |
*/
|
|
66 |
virtual ~CCamCaptureSetupContainer();
|
|
67 |
|
|
68 |
|
|
69 |
// -----------------------------------------------------
|
|
70 |
// From CCoeControl
|
|
71 |
private:
|
|
72 |
|
|
73 |
/**
|
|
74 |
* @since 2.8
|
|
75 |
* @return number of contained controls
|
|
76 |
*/
|
|
77 |
TInt CountComponentControls() const;
|
|
78 |
|
|
79 |
/**
|
|
80 |
* @since 2.8
|
|
81 |
* @param aIndex the index of the control
|
|
82 |
* @return pointer to the component control
|
|
83 |
*/
|
|
84 |
CCoeControl* ComponentControl( TInt aIndex ) const;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* @since 2.8
|
|
88 |
* @param aRect area where to draw
|
|
89 |
*/
|
|
90 |
void Draw( const TRect& aRect ) const;
|
|
91 |
|
|
92 |
/**
|
|
93 |
* @since 2.8
|
|
94 |
* @param aKeyEvent the key event
|
|
95 |
* @param aType the type of the event
|
|
96 |
* @return TKeyResponse key event was used by this control or not
|
|
97 |
*/
|
|
98 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
|
|
99 |
TEventCode aType );
|
|
100 |
|
|
101 |
/*
|
|
102 |
* From CoeControl
|
|
103 |
* @param aPointerEvent the pointer event to handle
|
|
104 |
*/
|
|
105 |
void HandlePointerEventL( const TPointerEvent& aPointerEvent );
|
|
106 |
/**
|
|
107 |
* From MEikListBoxObserver
|
|
108 |
*/
|
|
109 |
void HandleListBoxEventL(CEikListBox* aListBox,
|
|
110 |
TListBoxEvent aEventType );
|
|
111 |
|
|
112 |
// -----------------------------------------------------
|
|
113 |
// From MCamCameraObserver
|
|
114 |
public:
|
|
115 |
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Handle events sending app to foreground or background
|
|
119 |
* @param aForeground whether the event brings the app to fore or background
|
|
120 |
*/
|
|
121 |
|
|
122 |
void HandleForegroundEventL( TBool aForeground );
|
|
123 |
|
|
124 |
|
|
125 |
/**
|
|
126 |
* @since Camera 4.0
|
|
127 |
* @see MCamCameraObserver
|
|
128 |
*/
|
|
129 |
virtual void HandleCameraEventL( TInt aStatus,
|
|
130 |
TCamCameraEventId aEventId,
|
|
131 |
TAny* aEventData = NULL );
|
|
132 |
|
|
133 |
// -----------------------------------------------------
|
|
134 |
// Other methods
|
|
135 |
private:
|
|
136 |
|
|
137 |
/**
|
|
138 |
* Calculates the position for the settings editing control
|
|
139 |
* @since 2.8
|
|
140 |
* @return the top left corner position for the control
|
|
141 |
*/
|
|
142 |
TPoint ControlPositionL() const;
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Read nontouch layout
|
|
146 |
* @return TRect, listbox rectangle
|
|
147 |
*/
|
|
148 |
TRect NonTouchLayout();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Read touch layout
|
|
152 |
* @return TRect, listbox rectangle
|
|
153 |
*/
|
|
154 |
TRect TouchLayout();
|
|
155 |
|
|
156 |
|
|
157 |
// -----------------------------------------------------
|
|
158 |
// Constructors
|
|
159 |
private:
|
|
160 |
|
|
161 |
/**
|
|
162 |
* C++ constructor
|
|
163 |
* @param aController Controller reference
|
|
164 |
* @param aView View reference
|
|
165 |
* @param aControlHandler Handler reference
|
|
166 |
* @since 2.8
|
|
167 |
*/
|
|
168 |
CCamCaptureSetupContainer(
|
|
169 |
CCamAppController& aController,
|
|
170 |
CAknView& aView,
|
|
171 |
CCamCaptureSetupControlHandler& aControlHandler,
|
|
172 |
TBool aFullScreenVF = ETrue );
|
|
173 |
|
|
174 |
/**
|
|
175 |
* Symbian OS 2nd phase constructor.
|
|
176 |
* @since 2.8
|
|
177 |
* @param aRect Frame rectangle for container.
|
|
178 |
*/
|
|
179 |
void ConstructL( const TRect& aRect );
|
|
180 |
|
|
181 |
|
|
182 |
// =====================================================
|
|
183 |
// Data
|
|
184 |
protected:
|
|
185 |
|
|
186 |
// The control handler that creates the setting editing control
|
|
187 |
CCamCaptureSetupControlHandler& iControlHandler;
|
|
188 |
// The control that edits the setting value
|
|
189 |
CCoeControl* iCaptureSetupControl;
|
|
190 |
// The text shown as the title of the container
|
|
191 |
HBufC* iTitleText;
|
|
192 |
// Whether or not the container displays a viewfinder preview pane
|
|
193 |
TBool iViewFinding;
|
|
194 |
|
|
195 |
// Layout rect for cropped viewfinder display
|
|
196 |
TAknLayoutRect iViewFinderRectLayout;
|
|
197 |
|
|
198 |
TAknLayoutRect iSetupControlRectLayout;
|
|
199 |
|
|
200 |
// Layout rect for title text
|
|
201 |
TAknLayoutText iTitleTextRectLayout;
|
|
202 |
|
|
203 |
// width of list-box
|
|
204 |
TInt iListBoxWidth;
|
|
205 |
|
|
206 |
TBool iActivateOnTouchRelease;
|
|
207 |
|
|
208 |
TBool iFullScreenVF;
|
|
209 |
TRect iLayoutAreaRect;
|
|
210 |
};
|
|
211 |
|
|
212 |
#endif // CAMCAPTURESETUPCONTAINER_H
|
|
213 |
|
|
214 |
// End of File
|