author | Simon Howkins <simonh@symbian.org> |
Mon, 22 Nov 2010 16:01:09 +0000 | |
branch | RCL_3 |
changeset 93 | d216ae5a8733 |
parent 74 | 97232defd20e |
permissions | -rw-r--r-- |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
66 | 14 |
* Description: This class is the base class of all Calendar views. |
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
66 | 19 |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#ifndef CALENNATIVEVIEW_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#define CALENNATIVEVIEW_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
66 | 23 |
// INCLUDES |
24 |
||
25 |
#include <calentry.h> |
|
26 |
//#include <aknview.h> |
|
27 |
#include <calenview.h> |
|
28 |
#include "CalendarVariant.hrh" |
|
29 |
#include "calensetting.h" |
|
30 |
||
31 |
#ifdef RD_CALEN_EXTERNAL_CAL |
|
32 |
#include <aiwcommon.h> |
|
33 |
#endif |
|
34 |
||
35 |
#include <calennotificationhandler.h> |
|
36 |
||
37 |
// FORWARD DECLARATIONS |
|
38 |
class CCalenContainer; |
|
39 |
class CCalInstance; |
|
40 |
class CCalEntry; |
|
41 |
class MCalenModelChangeHandler; |
|
42 |
class CAknNavigationControlContainer; |
|
43 |
class CAknNavigationDecorator; |
|
44 |
class CAknWaitDialog; |
|
45 |
||
46 |
class CAknToolbar; |
|
47 |
||
48 |
class CCnvCharacterSetConverter; |
|
49 |
class MCalenServices; |
|
50 |
class CCalenStatusPaneUtils; |
|
51 |
||
52 |
#ifdef RD_CALEN_EXTERNAL_CAL |
|
53 |
class CAiwServiceHandler; |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
#endif |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
|
66 | 56 |
// CLASS DEFINITIONS |
57 |
||
58 |
/** |
|
59 |
* CCalenNativeView |
|
60 |
* This class is the base class of all Calendar views. |
|
61 |
*/ |
|
62 |
NONSHARABLE_CLASS( CCalenNativeView ) : public CCalenView, |
|
63 |
public MCalenNotificationHandler |
|
64 |
#ifdef RD_CALEN_EXTERNAL_CAL |
|
65 |
,public MAiwNotifyCallback |
|
66 |
#endif //RD_CALEN_EXTERNAL_CAL |
|
67 |
||
68 |
{ |
|
69 |
public: // Constructors and destructor |
|
70 |
/** |
|
71 |
* Destructor. |
|
72 |
*/ |
|
73 |
virtual ~CCalenNativeView(); |
|
74 |
||
75 |
public: // New functions |
|
76 |
||
77 |
/** |
|
78 |
* This function is called when Locale or Today was chenged. |
|
79 |
* @param aReason Notify reason EChangesLocale | |
|
80 |
* EChangesMidnightCrossover |
|
81 |
*/ |
|
82 |
virtual void OnLocaleChangedL(TInt aReason)=0; |
|
83 |
||
84 |
/** |
|
85 |
* This function is called when Editor/Viewer is closed |
|
86 |
*/ |
|
87 |
virtual void OnEditorClosedL(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
|
66 | 89 |
/** |
90 |
* Set date to Status pane. Default implementation does nothing. |
|
91 |
* @param aTime it will be refrect to StatusPane |
|
92 |
*/ |
|
93 |
virtual void SetStatusPaneFromActiveContextL(); |
|
94 |
||
95 |
/** |
|
96 |
* Return container control pointer. |
|
97 |
* @return Container control pointer |
|
98 |
*/ |
|
99 |
CCalenContainer* Container(); |
|
100 |
||
101 |
/** |
|
102 |
* Change NoteView. |
|
103 |
*/ |
|
104 |
//void OnCmdChangeNoteViewL(); |
|
105 |
||
106 |
/** |
|
107 |
* Handling command "Go to day" |
|
108 |
*/ |
|
109 |
void OnCmdGotoDateL(); |
|
110 |
/** |
|
111 |
* Handling command "Today". # key is pressed. |
|
112 |
*/ |
|
113 |
void OnCmdGotoTodayL(); |
|
114 |
||
115 |
/** |
|
116 |
* Starts repopulation again. |
|
117 |
*/ |
|
118 |
void BeginRepopulationL(); |
|
119 |
||
120 |
/** |
|
121 |
* Process "Send As" |
|
122 |
* @param aCommand command to be handled |
|
123 |
*/ |
|
124 |
void DoSendAsL(TInt aCommand); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
|
66 | 126 |
/** |
127 |
* Redraw status pane when Form is closed |
|
128 |
*/ |
|
129 |
virtual void RedrawStatusPaneL() = 0; |
|
130 |
||
131 |
/** |
|
132 |
* Notified that the focus of Container changes. |
|
133 |
*/ |
|
134 |
void NotifyFocusChanged(); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
|
66 | 136 |
/** |
137 |
* Is container focused? |
|
138 |
* @return If value is ETrue, container has focus |
|
139 |
*/ |
|
140 |
TBool IsContainerFocused(); |
|
141 |
||
142 |
void ShowValidScrollButtons(CAknNavigationDecorator& iNaviLabel, |
|
143 |
const TTime& aRangeStart, |
|
144 |
const TTime& aRangeEnd); |
|
145 |
||
146 |
||
147 |
/** |
|
148 |
* Set CBA from resources. |
|
149 |
* @param aCbaResourceId is id of CBA resource |
|
150 |
*/ |
|
151 |
void SetCbaL(TInt aCbaResourceId); |
|
152 |
||
153 |
//void EditEntryL( CCalEntry *aEntry, const TTime& aInstanceDate ); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
|
66 | 155 |
/** |
156 |
* Returns an array of abbreviated day names (MO, TU etc.) |
|
157 |
*/ |
|
158 |
const CDesCArrayFlat& AbbreviatedDayArrayL(); |
|
159 |
||
160 |
/** |
|
161 |
* Returns ETrue whenever editor is active or whenever fake exit is active |
|
162 |
* Used to hide the preview popup |
|
163 |
*/ |
|
164 |
TBool IsEditorActiveOrFasterAppExit(); |
|
165 |
||
166 |
/** |
|
167 |
* Set fasterappflag whenever fake exit is done |
|
168 |
*/ |
|
169 |
void SetFasterAppActive( TBool aFasterAppActive ); |
|
170 |
||
171 |
/** |
|
172 |
* Set editor active flag |
|
173 |
*/ |
|
174 |
void SetEditorActive(TBool aEditorActive); |
|
175 |
||
176 |
/** |
|
177 |
* @brief Checks if any command is being handled |
|
178 |
* |
|
179 |
* @return ETrue if some command is being handled, EFalse otherwise |
|
180 |
*/ |
|
181 |
TBool IsCommandHandlingInProgress(); |
|
182 |
||
183 |
/** |
|
184 |
* @brief Checks whether eventview is launched from alarm |
|
185 |
* |
|
186 |
* @return ETrue if launched from alarm popup, EFalse otherwise |
|
187 |
*/ |
|
74
97232defd20e
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
66
diff
changeset
|
188 |
TBool IsCalenLaunchedFromExtApp(); |
66 | 189 |
|
190 |
/** |
|
191 |
* @brief Marks that a command is being processed currently |
|
192 |
* |
|
193 |
* @param aInProgress ETrue if the command is being handled, EFalse otherwise |
|
194 |
*/ |
|
195 |
void SetCommandHandlingInProgress( TBool aInProgress ); |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
|
66 | 197 |
/** |
198 |
* @brief Checks if any command is being handled |
|
199 |
* |
|
200 |
* @param aServices Reference to the calendar services. |
|
201 |
* @param aCollectionIds Out parameter. |
|
202 |
*/ |
|
203 |
static void GetActiveCollectionidsL( |
|
204 |
MCalenServices& aServices, |
|
205 |
RArray< TInt >& aCollectionIds ); |
|
206 |
/** |
|
207 |
* @brief Sets flag to ignore tap on any of the views |
|
208 |
* |
|
209 |
* @param bool value to ignore the tap |
|
210 |
*/ |
|
211 |
void SetTapIgnore(TBool); |
|
212 |
#ifdef RD_CALEN_EXTERNAL_CAL |
|
213 |
||
214 |
/** |
|
215 |
* Returns Service Handler if available |
|
216 |
*/ |
|
217 |
CAiwServiceHandler* ServiceHandler(); |
|
218 |
||
219 |
/** |
|
220 |
* Releases service handler and unloads loaded plugins |
|
221 |
*/ |
|
222 |
void ReleaseServiceHandler(); |
|
223 |
||
224 |
/** |
|
225 |
* Create service handler if needed. |
|
226 |
* it will also attach to menu services if needed |
|
227 |
*/ |
|
228 |
void CreateServiceHandlerL(TBool aAttachMenu); |
|
229 |
||
230 |
/* |
|
231 |
* Handles notifications caused by an asynchronous Execute*CmdL call |
|
232 |
* or an event. |
|
233 |
* |
|
234 |
* @param aCmdId The service command associated to the event. |
|
235 |
* @param aEventId Occured event, see AiwCommon.hrh. |
|
236 |
* @param aEventParamList Event parameters, if any, as defined per |
|
237 |
* each event. |
|
238 |
* @param aInParamList Input parameters, if any, given in the |
|
239 |
* related HandleCommmandL. |
|
240 |
* @return Error code for the callback. |
|
241 |
*/ |
|
242 |
TInt HandleNotifyL(TInt aCmdId,TInt aEventId,CAiwGenericParamList& aEventParamList,const CAiwGenericParamList& aInParamList); |
|
243 |
||
244 |
||
245 |
/** |
|
246 |
* Returns ETrue if wait note for multiple entry delete is currently shown. |
|
247 |
*/ |
|
248 |
TBool ExtCalendarAvailableL(); |
|
249 |
||
250 |
#endif //RD_CALEN_EXTERNAL_CAL |
|
251 |
||
252 |
||
253 |
public: // From CCalenView |
|
254 |
void RemoveViewsFromCycle( RArray<TInt>& aViews ); |
|
255 |
void GetHelpContext( TCoeHelpContext& aHelpContext ); |
|
256 |
TAny* CalenViewExtensionL( TUid aExtensionUid ); |
|
257 |
||
258 |
public: // From MCalenDBChangeObserver |
|
259 |
void HandleDBChangeL(); |
|
260 |
||
261 |
public: // From MCalenNotificationHandler |
|
262 |
void HandleNotification( const TCalenNotification aNotification ); |
|
263 |
||
264 |
public: // from MEikMenuObserver |
|
265 |
void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
266 |
/** |
|
267 |
* From CAknView. Command handling for each view |
|
268 |
* @param aCommand command id |
|
269 |
*/ |
|
270 |
void HandleCommandL(TInt aCommand); |
|
271 |
||
272 |
/** |
|
273 |
* @brief From MEikMenuObserver. Dynamically initializes the menubar. |
|
274 |
* @see MEikMenuObserver. |
|
275 |
*/ |
|
276 |
void DynInitMenuBarL( TInt aResourceId, CEikMenuBar* aMenuBar ); |
|
277 |
||
278 |
/** |
|
279 |
* @brief copies the calendar entry to respective calendar. |
|
280 |
*/ |
|
281 |
void CopyToCalendarsL(); |
|
282 |
||
283 |
||
284 |
protected: // New functions |
|
285 |
/** |
|
286 |
* C++ constructor. |
|
287 |
*/ |
|
288 |
CCalenNativeView( MCalenServices& aServices ); |
|
289 |
||
290 |
/** |
|
291 |
* 2nd phase construction common to all Calendar views. |
|
292 |
*/ |
|
293 |
void CommonConstructL( TInt aViewResource ); |
|
294 |
||
295 |
/** |
|
296 |
* Second phase DoActivateL |
|
297 |
*/ |
|
298 |
virtual void DoActivateImplL( const TVwsViewId& aPrevViewId, |
|
299 |
TUid aCustomMessageId, |
|
300 |
const TDesC8& aCustomMessage) = 0; |
|
301 |
/** |
|
302 |
* Second phase DoDeactivate |
|
303 |
*/ |
|
304 |
virtual void DoDeactivateImpl() = 0; |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
|
66 | 306 |
/** |
307 |
* Creates container control for each views |
|
308 |
*/ |
|
309 |
virtual CCalenContainer* CreateContainerImplL() = 0; |
|
310 |
||
311 |
/** |
|
312 |
* Notify marked entryy deleted. |
|
313 |
* Used to notify the todo view |
|
314 |
*/ |
|
315 |
virtual void NotifyMarkedEntryDeletedL(){ }; |
|
316 |
||
317 |
/** |
|
318 |
* Notify marked entryy deleted. |
|
319 |
* Used to notify the todo view |
|
320 |
*/ |
|
321 |
virtual void NotifyMarkedEntryCompletedL(){ }; |
|
322 |
||
323 |
/* |
|
324 |
* Clears view specific data |
|
325 |
*/ |
|
326 |
virtual void ClearViewSpecificDataL()=0; |
|
327 |
||
328 |
/** |
|
329 |
* Update date form context when entry is saved |
|
330 |
*/ |
|
331 |
virtual void UpdateDateFromContextL(){ }; |
|
332 |
||
333 |
/** |
|
334 |
* Updates preview pane whenever application comes to foreground |
|
335 |
*/ |
|
336 |
virtual void UpdatePreviewPaneL(){ }; |
|
337 |
||
338 |
/** |
|
339 |
* Hides the preview pane whenever application goes to background |
|
340 |
* or whenever fake exit is done |
|
341 |
*/ |
|
342 |
virtual void HidePreviewPane(){ }; |
|
343 |
||
344 |
private: // New Functions |
|
13
0f07cd1b5772
Revision: 201009
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
345 |
|
66 | 346 |
/** |
347 |
* A container control is created. |
|
348 |
*/ |
|
349 |
void CreateContainerL(); |
|
350 |
||
351 |
/** |
|
352 |
* Prcess "Send As" |
|
353 |
* @param aCommand command to be handled |
|
354 |
*/ |
|
355 |
void DoSendAsImplL(TInt aCommand); |
|
356 |
||
357 |
private: // From CAknView |
|
358 |
/** |
|
359 |
* From CAknView View activation handler |
|
360 |
*/ |
|
361 |
void DoActivateL( const TVwsViewId& aPrevViewId, |
|
362 |
TUid aCustomMessageId, |
|
363 |
const TDesC8& aCustomMessage); |
|
364 |
/** |
|
365 |
* From CAknView View deactivation handler |
|
366 |
*/ |
|
367 |
void DoDeactivate(); |
|
368 |
||
369 |
/** |
|
370 |
* @brief asynchronous call back for copy to calendar functionality. |
|
371 |
* added because of err VGGG-82X8TV . |
|
372 |
* |
|
373 |
*/ |
|
374 |
static TInt AsyncCopyToCalendarsL(TAny* aThisPtr); |
|
375 |
||
376 |
/** |
|
377 |
* @brief called from AsyncCopyToCalendarsL |
|
378 |
*/ |
|
379 |
void CopyEntryToCalendarsL(); |
|
380 |
||
381 |
protected: // Data |
|
382 |
CCalenContainer* iContainer; |
|
383 |
MCalenModelChangeHandler* iHandler; |
|
384 |
CAknNavigationControlContainer* iNaviContainer; // cache |
|
385 |
TInt iLocChangeReason; |
|
386 |
MCalenServices& iServices; // not owned. |
|
387 |
TBool iNeedsRefresh; |
|
388 |
||
389 |
CAknToolbar *iToolbar; // not owned |
|
390 |
||
391 |
HBufC* iMenuName; // localised name of view for change view menu. Owned. |
|
392 |
HBufC* iSettingsName; // localised name of view for default view setting. Owned. |
|
393 |
||
394 |
CCalenStatusPaneUtils* iSPUtils; // owned, status pane utils |
|
395 |
||
396 |
#ifdef RD_CALEN_EXTERNAL_CAL |
|
397 |
||
398 |
private: |
|
399 |
CAiwServiceHandler* iServiceHandler; // own |
|
400 |
#endif //RD_CALEN_EXTERNAL_CAL |
|
401 |
||
402 |
private: // Data |
|
403 |
CDesCArrayFlat* iAbbreviatedDayArray; |
|
404 |
TBool iFasterAppActive; |
|
405 |
TBool iIsEditorActive; |
|
406 |
TBool iIsBackgrounded; |
|
407 |
||
408 |
/** |
|
409 |
* @var iCommandProcessing |
|
410 |
* @brief ETrue if some command handling is under progress, EFalse otherwise |
|
411 |
*/ |
|
412 |
TBool iCommandProcessing; |
|
413 |
TBool iIgnoreTap; |
|
414 |
CAsyncCallBack* iAsyncCallback; |
|
415 |
}; |
|
0
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
|
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
#endif // CALENNATIVEVIEW_H |
f979ecb2b13e
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
|
66 | 419 |
|
420 |
// End of File |