|
1 /* |
|
2 * Copyright (c) 2002-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: Declares view class of View architecture for Day view. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <aknnavide.h> |
|
20 #include <bldvariant.hrh> // For FeatureIds (lint warns without) |
|
21 #include <eikmenup.h> |
|
22 #include <eikspane.h> |
|
23 #include <featmgr.h> |
|
24 #include <Sendnorm.rsg> |
|
25 #include <eikbtgpc.h> |
|
26 #include <eikmenub.h> |
|
27 #include <StringLoader.h> |
|
28 #include <aknappui.h> |
|
29 #include <calinstance.h> |
|
30 #include <calendateutils.h> |
|
31 #include <Calendar.rsg> |
|
32 #include <calencommonui.rsg> |
|
33 #include <CalenStatusPaneUtils.h> |
|
34 #include <calencommands.hrh> // Calendar commands |
|
35 #include <calencontext.h> |
|
36 #include <calenservices.h> |
|
37 #include <calenviewutils.h> |
|
38 #include <calentoolbar.h> |
|
39 #include <calentry.h> |
|
40 #include <calentryview.h> |
|
41 #include "calendarui_debug.h" |
|
42 #include "calendayview.h" |
|
43 #include "calencontainer.h" |
|
44 #include "calendaycontainer.h" |
|
45 #include "calensend.h" |
|
46 #include "calentitlepane.h" |
|
47 #include "calenlocationutil.h" |
|
48 #include <CalenInterimUtils2.h> |
|
49 #include "calendar.hrh" |
|
50 #include "CalenUid.h" |
|
51 #include "multicaluidialog.h" |
|
52 |
|
53 // LOCAL CONSTANTS AND MACROS |
|
54 #define iDayContainer static_cast<CCalenDayContainer*>(iContainer) |
|
55 |
|
56 // Button position of the MSK CBA button |
|
57 const TInt KSK2CBAPosition = 2; |
|
58 |
|
59 |
|
60 // ================= MEMBER FUNCTIONS ======================= |
|
61 |
|
62 // ---------------------------------------------------------------------------- |
|
63 // CCalenDayView::NewLC |
|
64 // Two-phased constructor. |
|
65 // (other items were commented in a header). |
|
66 // ---------------------------------------------------------------------------- |
|
67 // |
|
68 EXPORT_C CCalenDayView* CCalenDayView::NewL( MCalenServices& aServices ) |
|
69 { |
|
70 TRACE_ENTRY_POINT; |
|
71 |
|
72 CCalenDayView* self = new(ELeave) CCalenDayView( aServices ); |
|
73 CleanupStack::PushL( self ); |
|
74 self->ConstructL(); |
|
75 CleanupStack::Pop( self ); |
|
76 |
|
77 TRACE_EXIT_POINT; |
|
78 return self; |
|
79 } |
|
80 |
|
81 // ---------------------------------------------------------------------------- |
|
82 // CCalenDayView::~CCalenDayView |
|
83 // Destructor |
|
84 // (other items were commented in a header). |
|
85 // ---------------------------------------------------------------------------- |
|
86 // |
|
87 CCalenDayView::~CCalenDayView() |
|
88 { |
|
89 TRACE_ENTRY_POINT; |
|
90 TRACE_EXIT_POINT; |
|
91 } |
|
92 |
|
93 // ---------------------------------------------------------------------------- |
|
94 // CCalenDayView::CCalenDayView |
|
95 // C++ constructor can NOT contain any code, that might leave. |
|
96 // (other items were commented in a header). |
|
97 // ---------------------------------------------------------------------------- |
|
98 // |
|
99 CCalenDayView::CCalenDayView( MCalenServices& aServices ) |
|
100 : CCalenNativeView( aServices ), |
|
101 iPopulationStep( ENothingDone ) |
|
102 { |
|
103 TRACE_ENTRY_POINT; |
|
104 TRACE_EXIT_POINT; |
|
105 } |
|
106 |
|
107 // ---------------------------------------------------------------------------- |
|
108 // CCalenDayView::SetStatusPaneFromActiveContextL |
|
109 // Set a date text to StatusPane |
|
110 // (other items were commented in a header). |
|
111 // ---------------------------------------------------------------------------- |
|
112 // |
|
113 void CCalenDayView::SetStatusPaneFromActiveContextL() |
|
114 { |
|
115 TRACE_ENTRY_POINT; |
|
116 |
|
117 TTime activeDay = CCalenContainer::DateFromContextL( iServices.Context() ); |
|
118 // title pane |
|
119 if ( CalenDateUtils::IsOnToday( activeDay ) ) |
|
120 { |
|
121 iSPUtils->UnderLineTitleText( ETrue ); |
|
122 } |
|
123 else |
|
124 { |
|
125 iSPUtils->UnderLineTitleText( EFalse ); |
|
126 } |
|
127 TBuf<KMaxDayName> title; |
|
128 iSPUtils->DayNameByActiveTime( title, activeDay ); |
|
129 iSPUtils->SetTitleTextL( title ); |
|
130 |
|
131 // navi pane |
|
132 CAknNavigationDecorator* naviLabel = iSPUtils->ShowNaviPaneL( activeDay ); |
|
133 ShowValidScrollButtons( *naviLabel, |
|
134 activeDay -TTimeIntervalDays( 1 ), |
|
135 activeDay +TTimeIntervalDays( 1 ) ); |
|
136 |
|
137 iSPUtils->RefreshStatusPane(); |
|
138 TRACE_EXIT_POINT; |
|
139 } |
|
140 |
|
141 // --------------------------------------------------------- |
|
142 // CCalenDayView::ConstructL |
|
143 // Symbian OS default constructor |
|
144 // (other items were commented in a header). |
|
145 // --------------------------------------------------------- |
|
146 // |
|
147 void CCalenDayView::ConstructL() |
|
148 { |
|
149 TRACE_ENTRY_POINT; |
|
150 |
|
151 CommonConstructL( R_CALEN_DAYVIEW_INFO ); |
|
152 |
|
153 TRACE_EXIT_POINT; |
|
154 } |
|
155 |
|
156 // --------------------------------------------------------- |
|
157 // CCalenDayView::DoActivateImplL |
|
158 // Second phase DoActivateL |
|
159 // (other items were commented in a header). |
|
160 // --------------------------------------------------------- |
|
161 // |
|
162 void CCalenDayView::DoActivateImplL( const TVwsViewId& aPrevViewId, |
|
163 TUid aCustomMessageId, |
|
164 const TDesC8& /*aCustomMessage*/ ) |
|
165 { |
|
166 TRACE_ENTRY_POINT; |
|
167 // When day view is activated, we store the previous view id so that when |
|
168 // "back" softkey is avaible and pressed, we can go back to previous view. |
|
169 // Whether or the "Back" softkey should be available is determined by the flag |
|
170 // iShowBackButtonOnCba, which is set/unset based on aCustomMessageId. |
|
171 // |
|
172 // When day view is switched from Calendar's internal view, the flag and |
|
173 // the previous view id are updated. |
|
174 // When day view is switched from Other application's view, the flag and |
|
175 // the previous view id are NOT updated |
|
176 // |
|
177 if( aPrevViewId.iAppUid == KUidCalendar ) // switch from internal view |
|
178 { |
|
179 iPreviousViewId = aPrevViewId; |
|
180 |
|
181 iShowBackButtonOnCba = |
|
182 ( aCustomMessageId == KUidCalenShowBackCba ? ETrue : EFalse ); |
|
183 } |
|
184 else |
|
185 { |
|
186 iShowBackButtonOnCba = EFalse; |
|
187 } |
|
188 //UpdateCbaL(); |
|
189 |
|
190 iEventViewCommandHandled = EFalse; |
|
191 TRACE_EXIT_POINT; |
|
192 } |
|
193 |
|
194 // --------------------------------------------------------- |
|
195 // CCalenDayView::isEventViewCommandHandled |
|
196 // Check if event view command is handled or not |
|
197 // --------------------------------------------------------- |
|
198 // |
|
199 TBool CCalenDayView::isEventViewCommandHandled() |
|
200 { |
|
201 return iEventViewCommandHandled ; |
|
202 } |
|
203 |
|
204 // --------------------------------------------------------- |
|
205 // CCalenDayView::DoDeactivateImpl |
|
206 // Second phase DoDeactivate |
|
207 // (other items were commented in a header). |
|
208 // --------------------------------------------------------- |
|
209 // |
|
210 void CCalenDayView::DoDeactivateImpl() |
|
211 { |
|
212 TRACE_ENTRY_POINT; |
|
213 |
|
214 if (!iAvkonAppUi->IsDisplayingMenuOrDialog()) |
|
215 { |
|
216 iSPUtils->HideNaviPane(); |
|
217 } |
|
218 |
|
219 TRACE_EXIT_POINT; |
|
220 } |
|
221 |
|
222 // --------------------------------------------------------- |
|
223 // CCalenDayView::OnLocaleChangedL |
|
224 // Called when locale was changed and Time was crossovered |
|
225 // (other items were commented in a header). |
|
226 // --------------------------------------------------------- |
|
227 // |
|
228 void CCalenDayView::OnLocaleChangedL(TInt aReason) |
|
229 { |
|
230 TRACE_ENTRY_POINT; |
|
231 |
|
232 if(!iContainer) |
|
233 { |
|
234 return; |
|
235 } |
|
236 |
|
237 if (IsContainerFocused()) |
|
238 { |
|
239 if (!iContainer->IsFocused()) |
|
240 { |
|
241 iLocChangeReason = EChangesLocale; |
|
242 } |
|
243 else |
|
244 { |
|
245 if (aReason & EChangesLocale) |
|
246 { |
|
247 iDayContainer->UpdateTimeFormat(); |
|
248 iDayContainer->UpdateContainerL(); |
|
249 } |
|
250 if (aReason & EChangesSystemTime) |
|
251 { |
|
252 RedrawStatusPaneL(); |
|
253 } |
|
254 } |
|
255 } |
|
256 else |
|
257 { |
|
258 iLocChangeReason = EChangesLocale; |
|
259 } |
|
260 |
|
261 TRACE_EXIT_POINT; |
|
262 } |
|
263 |
|
264 |
|
265 |
|
266 // --------------------------------------------------------- |
|
267 // CCalenDayView::CreateContainerImplL |
|
268 // Creates container control for DayView |
|
269 // (other items were commented in a header). |
|
270 // --------------------------------------------------------- |
|
271 // |
|
272 CCalenContainer* CCalenDayView::CreateContainerImplL() |
|
273 { |
|
274 TRACE_ENTRY_POINT; |
|
275 |
|
276 TRACE_EXIT_POINT; |
|
277 return new( ELeave )CCalenDayContainer( this, |
|
278 iDate, |
|
279 iHighlightedRowNumber, |
|
280 iFirstEntryOnScreenIndex, |
|
281 iServices ); |
|
282 } |
|
283 |
|
284 // --------------------------------------------------------- |
|
285 // CCalenDayView::RedrawStatusPaneL |
|
286 // Redraw status pane when Form is closed |
|
287 // (other items were commented in a header). |
|
288 // --------------------------------------------------------- |
|
289 // |
|
290 void CCalenDayView::RedrawStatusPaneL() |
|
291 { |
|
292 TRACE_ENTRY_POINT; |
|
293 |
|
294 SetStatusPaneFromActiveContextL(); |
|
295 |
|
296 TRACE_EXIT_POINT; |
|
297 } |
|
298 |
|
299 // --------------------------------------------------------- |
|
300 // CCalenDayView::DynInitMenuPaneL |
|
301 // Changes MenuPane dynamically |
|
302 // (other items were commented in a header). |
|
303 // --------------------------------------------------------- |
|
304 // |
|
305 void CCalenDayView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
|
306 { |
|
307 TRACE_ENTRY_POINT; |
|
308 |
|
309 CCalenNativeView::DynInitMenuPaneL(aResourceId, aMenuPane); |
|
310 |
|
311 switch (aResourceId) |
|
312 { |
|
313 case R_CALENDAR_DAY_MENUPANE: |
|
314 { |
|
315 |
|
316 #ifdef RD_CALEN_EXTERNAL_CAL |
|
317 TBool isit=ExtCalendarAvailableL(); |
|
318 if (!isit) |
|
319 { |
|
320 //ECalenExtAiwCommandId |
|
321 ReleaseServiceHandler(); |
|
322 TInt dummy; |
|
323 if (aMenuPane->MenuItemExists(ECalenExtAiwCommandId,dummy)) |
|
324 { |
|
325 aMenuPane->DeleteMenuItem(ECalenExtAiwCommandId); |
|
326 } |
|
327 } |
|
328 #endif //RD_CALEN_EXTERNAL_CAL |
|
329 |
|
330 |
|
331 if ( ! FeatureManager::FeatureSupported(KFeatureIdHelp) ) |
|
332 { |
|
333 aMenuPane->DeleteMenuItem(EAknCmdHelp); |
|
334 } |
|
335 |
|
336 TBool emptyList = iDayContainer->IsEmptyView(); |
|
337 if ( emptyList ) |
|
338 { |
|
339 aMenuPane->DeleteMenuItem( ECalenViewCurrentEntry ); |
|
340 aMenuPane->DeleteMenuItem( ECalenDeleteCurrentEntry ); |
|
341 aMenuPane->DeleteMenuItem( ECalenCompleteTodo ); |
|
342 aMenuPane->DeleteMenuItem( ECalenSend ); |
|
343 //TODO: will be uncommented with copy to cal functionality. |
|
344 aMenuPane->DeleteMenuItem(ECalenCopyToCalendars); |
|
345 } |
|
346 else |
|
347 { |
|
348 // "Mark completed" item |
|
349 TCalenInstanceId instId = iServices.Context().InstanceId(); |
|
350 TBool isTodoFocused; // true when instId is not null and instId type == todo |
|
351 isTodoFocused = !(instId == TCalenInstanceId::NullInstanceId()) && |
|
352 instId.iType == CCalEntry::ETodo; |
|
353 |
|
354 if ( ! isTodoFocused ) |
|
355 { |
|
356 aMenuPane->DeleteMenuItem( ECalenCompleteTodo ); |
|
357 } |
|
358 } |
|
359 if(!iDayContainer->IsEmptyView() && CCalenLocationUtil::IsMapProviderAvailableL()) |
|
360 { |
|
361 if(iDayContainer->IsEventHasMapLocationL() || iDayContainer->IsEventHasNoLocationTextL()) |
|
362 { |
|
363 aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace ); |
|
364 } |
|
365 if(!iDayContainer->IsEventHasMapLocationL()) |
|
366 { |
|
367 aMenuPane->DeleteMenuItem( ECalenShowLocation ); |
|
368 } |
|
369 } |
|
370 else // No map provider available, remove both option items |
|
371 { |
|
372 aMenuPane->DeleteMenuItem( ECalenGetLocationAndReplace ); |
|
373 aMenuPane->DeleteMenuItem( ECalenShowLocation ); |
|
374 } |
|
375 |
|
376 if( !iServices.InterimUtilsL().MRViewersEnabledL( ETrue ) ) |
|
377 { |
|
378 aMenuPane->DeleteMenuItem( ECalenNewMeetingRequest ); |
|
379 } |
|
380 // Offer the menu pane to the services for customisation by the |
|
381 // the view manager/plugins |
|
382 iServices.OfferMenuPaneL( aResourceId, aMenuPane ); |
|
383 |
|
384 // Single click integration |
|
385 TInt menuIndex( 0 ); |
|
386 if ( aMenuPane->MenuItemExists( ECalenSend, menuIndex ) ) |
|
387 { |
|
388 aMenuPane->SetItemSpecific( ECalenSend, ETrue ); |
|
389 } |
|
390 break; |
|
391 } |
|
392 |
|
393 default: |
|
394 break; |
|
395 } |
|
396 |
|
397 TRACE_EXIT_POINT; |
|
398 } |
|
399 |
|
400 // --------------------------------------------------------- |
|
401 // CCalenDayView::HandleCommandL |
|
402 // Command handling for Day view. |
|
403 // This is needed for MSK. Check wheter Open or Context menu |
|
404 // events are triggered. By default call CCalenNativeView's |
|
405 // HandleCommand. |
|
406 // (other items were commented in a header). |
|
407 // --------------------------------------------------------- |
|
408 // |
|
409 void CCalenDayView::HandleCommandL(TInt aCommand) |
|
410 { |
|
411 TRACE_ENTRY_POINT; |
|
412 |
|
413 switch (aCommand) |
|
414 { |
|
415 case EAknSoftkeyOpen: |
|
416 case ECalenViewCurrentEntry: |
|
417 { |
|
418 if(iDayContainer->IsValidEntryL()&&!iDayContainer->IsEmptyView()) |
|
419 { |
|
420 // Set the context when performing an action |
|
421 iDayContainer->SetContextFromHighlightL(); |
|
422 |
|
423 CCalenNativeView::HandleCommandL( ECalenEventView ); |
|
424 iEventViewCommandHandled = ETrue; |
|
425 } |
|
426 |
|
427 } |
|
428 break; |
|
429 // TODO:will be uncommented with copy to cal functionality. |
|
430 case ECalenCopyToCalendars: |
|
431 { |
|
432 CopyToCalendarsL(); |
|
433 } |
|
434 break; |
|
435 |
|
436 case ECalenDeleteCurrentEntry: |
|
437 iDayContainer->NotifyDeleteItemL(); |
|
438 CCalenNativeView::HandleCommandL( ECalenDeleteCurrentEntry ); |
|
439 break; |
|
440 #ifdef RD_CALEN_ENHANCED_MSK |
|
441 case ECalenCmdOpenMskDialog: |
|
442 CCalenNativeView::HandleCommandL( ECalenNewMeeting ); |
|
443 break; |
|
444 #else |
|
445 case EAknSoftkeyContextOptions: |
|
446 MenuBar()->TryDisplayContextMenuBarL(); |
|
447 break; |
|
448 #endif //RD_CALEN_ENHANCED_MSK |
|
449 |
|
450 case EAknSoftkeyBack: |
|
451 //iServices.RequestActivationL( iPreviousViewId ); |
|
452 SetCbaL( R_CALEN_DEFAULT_DAY_VIEW_CBA ); |
|
453 iHighlightedRowNumber = KErrNotFound; |
|
454 iServices.IssueNotificationL(ECalenNotifyDayViewClosed); |
|
455 break; |
|
456 |
|
457 default: |
|
458 CCalenNativeView::HandleCommandL(aCommand); |
|
459 break; |
|
460 } |
|
461 |
|
462 TRACE_EXIT_POINT; |
|
463 } |
|
464 |
|
465 |
|
466 // --------------------------------------------------------- |
|
467 // CCalenDayView::UpdateCbaL |
|
468 // Set context menubar and also CBA button depending wheter |
|
469 // we have empty view or not. |
|
470 // (other items were commented in a header). |
|
471 // --------------------------------------------------------- |
|
472 // |
|
473 void CCalenDayView::UpdateCbaL() |
|
474 { |
|
475 TRACE_ENTRY_POINT; |
|
476 |
|
477 MenuBar()->SetContextMenuTitleResourceId( R_CALENDAR_DAY_CASE_MENUBAR ); |
|
478 |
|
479 // if the view is empty then we use context menu CBA |
|
480 if( iDayContainer->IsEmptyView() ) |
|
481 { |
|
482 SetCbaL( R_CALEN_DAY_AND_TODO_VIEW_CONTEXT_MENU_CBA ); |
|
483 } |
|
484 else // set normal CBA |
|
485 { |
|
486 SetCbaL( R_CALEN_DAY_AND_TODO_VIEW_NORMAL_CBA ); |
|
487 } |
|
488 |
|
489 if( iShowBackButtonOnCba ) |
|
490 { |
|
491 CEikButtonGroupContainer* cba = Cba(); |
|
492 cba->SetCommandL( KSK2CBAPosition, R_CALEN_BACK_CBA_BUTTON); |
|
493 cba->DrawNow(); |
|
494 } |
|
495 |
|
496 TRACE_EXIT_POINT; |
|
497 } |
|
498 |
|
499 // ---------------------------------------------------------------------------- |
|
500 // CCalenDayView::Id |
|
501 // From CAknView |
|
502 // Return the UID of the day view |
|
503 // (other items were commented in a header) |
|
504 // ---------------------------------------------------------------------------- |
|
505 // |
|
506 TUid CCalenDayView::Id() const |
|
507 { |
|
508 TRACE_ENTRY_POINT; |
|
509 |
|
510 TRACE_EXIT_POINT; |
|
511 return KUidCalenDayView; |
|
512 } |
|
513 // ---------------------------------------------------------------------------- |
|
514 // CCalenDayView::ClearViewSpecificDataL |
|
515 // Clears any cached data for the specific view, e.g. currently |
|
516 // highlighted row, column, etc. |
|
517 // (other items were commented in a header) |
|
518 // ---------------------------------------------------------------------------- |
|
519 // |
|
520 void CCalenDayView::ClearViewSpecificDataL() |
|
521 { |
|
522 TRACE_ENTRY_POINT; |
|
523 |
|
524 iDate = Time::NullTTime(); |
|
525 //iHighlightedRowNumber = KErrNotFound; |
|
526 //iFirstEntryOnScreenIndex = KErrNotFound; |
|
527 |
|
528 TRACE_EXIT_POINT; |
|
529 } |
|
530 |
|
531 // ---------------------------------------------------------------------------- |
|
532 // CCalenDayView::IsViewSpecificDataNullL |
|
533 // From CCalenNativeView |
|
534 // Returns ETrue if the view specific data is null, EFalse otherwise. |
|
535 // (other items were commented in a header) |
|
536 // ---------------------------------------------------------------------------- |
|
537 // |
|
538 TBool CCalenDayView::IsViewSpecificDataNullL() |
|
539 { |
|
540 TRACE_ENTRY_POINT; |
|
541 TRACE_EXIT_POINT; |
|
542 return ( iDate == Time::NullTTime() ) && |
|
543 ( iHighlightedRowNumber == KErrNotFound ) && |
|
544 ( iFirstEntryOnScreenIndex == KErrNotFound ); |
|
545 } |
|
546 |
|
547 // ---------------------------------------------------------------------------- |
|
548 // CCalenDayView::ActiveStepL |
|
549 // From CCalenView |
|
550 // (other items were commented in a header) |
|
551 // ---------------------------------------------------------------------------- |
|
552 // |
|
553 CCalenView::TNextPopulationStep CCalenDayView::ActiveStepL() |
|
554 { |
|
555 TRACE_ENTRY_POINT; |
|
556 |
|
557 CCalenView::TNextPopulationStep nextStep = CCalenView::EDone; |
|
558 switch( iPopulationStep ) |
|
559 { |
|
560 case ENothingDone: |
|
561 { |
|
562 RArray<TInt> colIdArray; |
|
563 CCalenNativeView::GetActiveCollectionidsL( iServices, colIdArray ); |
|
564 |
|
565 if(colIdArray.Count() > 0) |
|
566 { |
|
567 if( !iServices.InstanceViewL(colIdArray) ) |
|
568 { |
|
569 nextStep = CCalenView::EWaitForInstanceView; |
|
570 break; |
|
571 } |
|
572 } |
|
573 else |
|
574 { |
|
575 if( !iServices.InstanceViewL() ) |
|
576 { |
|
577 nextStep = CCalenView::EWaitForInstanceView; |
|
578 break; |
|
579 } |
|
580 } |
|
581 colIdArray.Reset(); |
|
582 } |
|
583 |
|
584 // else fall through... |
|
585 //lint -fallthrough |
|
586 case ERequestedInstanceView: |
|
587 { |
|
588 iDayContainer->GetInstanceListL(); |
|
589 iPopulationStep = ESizedChanged; |
|
590 nextStep = CCalenView::EKeepGoing; |
|
591 } |
|
592 break; |
|
593 case ESizedChanged: |
|
594 { |
|
595 iDayContainer->UpdateSize(); |
|
596 iPopulationStep = ECreateSlotTableNext; |
|
597 nextStep = CCalenView::EKeepGoing; |
|
598 } |
|
599 break; |
|
600 case ECreateSlotTableNext: |
|
601 { |
|
602 iDayContainer->CreateSlotTableL(); |
|
603 iPopulationStep = ECreateListBoxDataNext; |
|
604 nextStep = CCalenView::EKeepGoing; |
|
605 } |
|
606 break; |
|
607 case ECreateListBoxDataNext: |
|
608 default: |
|
609 { |
|
610 iDayContainer->CompletePopulationL(); |
|
611 iPopulationStep = EPopulationDone; |
|
612 nextStep = CCalenView::EDone; |
|
613 } |
|
614 break; |
|
615 } |
|
616 |
|
617 TRACE_EXIT_POINT; |
|
618 return nextStep; |
|
619 } |
|
620 |
|
621 // ---------------------------------------------------------------------------- |
|
622 // CCalenDayView::CancelPopulation |
|
623 // From CCalenView |
|
624 // (other items were commented in a header) |
|
625 // ---------------------------------------------------------------------------- |
|
626 // |
|
627 void CCalenDayView::CancelPopulation() |
|
628 { |
|
629 TRACE_ENTRY_POINT; |
|
630 |
|
631 iPopulationStep = ENothingDone; |
|
632 |
|
633 TRACE_EXIT_POINT; |
|
634 } |
|
635 |
|
636 // ---------------------------------------------------------------------------- |
|
637 // CCalenDayView::CyclePosition |
|
638 // From CCalenView |
|
639 // (other items were commented in a header) |
|
640 // ---------------------------------------------------------------------------- |
|
641 // |
|
642 CCalenView::TCyclePosition CCalenDayView::CyclePosition() const |
|
643 { |
|
644 TRACE_ENTRY_POINT; |
|
645 TRACE_EXIT_POINT; |
|
646 return CCalenView::EReplaceDayView; |
|
647 } |
|
648 |
|
649 // ---------------------------------------------------------------------------- |
|
650 // CCalenDayView::LocalisedViewNameL |
|
651 // From CCalenView |
|
652 // (other items were commented in a header) |
|
653 // ---------------------------------------------------------------------------- |
|
654 // |
|
655 const TDesC& CCalenDayView::LocalisedViewNameL( CCalenView::TViewName aViewName ) |
|
656 { |
|
657 TRACE_ENTRY_POINT; |
|
658 |
|
659 HBufC* ret = NULL; |
|
660 |
|
661 switch ( aViewName ) |
|
662 { |
|
663 case CCalenView::EMenuName: |
|
664 if ( !iMenuName ) |
|
665 { |
|
666 iMenuName = StringLoader::LoadL( R_CALEN_VIEW_DAY, iCoeEnv ); |
|
667 } |
|
668 ret = iMenuName; |
|
669 break; |
|
670 case CCalenView::ESettingsName: |
|
671 if ( !iSettingsName ) |
|
672 { |
|
673 iSettingsName = StringLoader::LoadL( R_CALEN_QTN_DEFAULT_DAY_VIEW, |
|
674 iCoeEnv ); |
|
675 } |
|
676 ret = iSettingsName; |
|
677 break; |
|
678 default: |
|
679 ASSERT( EFalse ); |
|
680 break; |
|
681 } |
|
682 |
|
683 TRACE_EXIT_POINT; |
|
684 return *ret; |
|
685 } |
|
686 |
|
687 // ---------------------------------------------------------------------------- |
|
688 // CCalenDayView::ViewIconL |
|
689 // From CCalenView |
|
690 // (other items were commented in a header) |
|
691 // ---------------------------------------------------------------------------- |
|
692 // |
|
693 CGulIcon* CCalenDayView::ViewIconL() const |
|
694 { |
|
695 TRACE_ENTRY_POINT; |
|
696 TRACE_EXIT_POINT; |
|
697 return iServices.GetIconL( MCalenServices::ECalenDayViewIcon ); |
|
698 } |
|
699 |
|
700 // ---------------------------------------------------------------------------- |
|
701 // CCalenDayView::UpdateDateFromContextL |
|
702 // Update date form context when entry is saved |
|
703 // (other items were commented in a header) |
|
704 // ---------------------------------------------------------------------------- |
|
705 // |
|
706 void CCalenDayView::UpdateDateFromContextL() |
|
707 { |
|
708 TRACE_ENTRY_POINT; |
|
709 |
|
710 iDate = CCalenContainer::DateFromContextL( iServices.Context() ); |
|
711 |
|
712 TRACE_EXIT_POINT; |
|
713 } |
|
714 |
|
715 // End of File |