|
1 /* |
|
2 * Copyright (c) 2002-2004 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 looking after alarm fields for forms. |
|
15 * |
|
16 */ |
|
17 |
|
18 //debug |
|
19 #include "calendarui_debug.h" |
|
20 |
|
21 //user includes |
|
22 #include "CalenKoreanLunarPlugin.h" |
|
23 #include "CalenLunarInfoProvider.h" |
|
24 #include "CalenLunarLocalizedInfo.h" |
|
25 #include "CalenLunarLocalizer.h" |
|
26 #include "CalenLunarPanic.h" |
|
27 #include <CalenKoreanLunarPluginData.rsg> |
|
28 #include "CalenLunarSettingItem.h" |
|
29 #include "CalenKoreanLunarPrivateCRKeys.h" |
|
30 #include "CleanupResetAndDestroy.h" |
|
31 |
|
32 //system includes |
|
33 #include <AknMessageQueryDialog.h> |
|
34 #include <data_caging_path_literals.hrh> |
|
35 #include <eikenv.h> |
|
36 #include <eikmenup.h> |
|
37 #include <eiklabel.h> |
|
38 #include <CentralRepository.h> |
|
39 #include <StringLoader.h> |
|
40 #include <AknUtils.h> |
|
41 #include <aknsutils.h> |
|
42 #include <aknbiditextutils.h> |
|
43 #include <CalendarConverter.h> |
|
44 |
|
45 // CONSTANTS |
|
46 _LIT( KResourceDrive, "z:" ); |
|
47 _LIT( KFieldSeparator, "\n" ); |
|
48 _LIT( KHeaderSeparator, "\n "); |
|
49 _LIT( KResourceFile, "CalenKoreanLunarPluginData.rsc" ); |
|
50 const TInt KFieldCount = 2; |
|
51 #define KResourcePath KDC_RESOURCE_FILES_DIR |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CCalenKoreanLunarPlugin::CreateKoreanPluginL() |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CCalenKoreanLunarPlugin* CCalenKoreanLunarPlugin::CreateKoreanPluginL( |
|
58 MCalenServices* aServices ) |
|
59 { |
|
60 TRACE_ENTRY_POINT; |
|
61 |
|
62 CCalenKoreanLunarPlugin* plugin = new (ELeave) CCalenKoreanLunarPlugin( |
|
63 KCalenKoreanPluginEnabled, aServices ); |
|
64 CleanupStack::PushL( plugin ); |
|
65 plugin->ConstructL(); |
|
66 plugin->SetLunarLocalizerL(); |
|
67 CleanupStack::Pop( plugin ); |
|
68 |
|
69 TRACE_EXIT_POINT; |
|
70 return plugin; |
|
71 } |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CCalenKoreanLunarPlugin::~CCalenKoreanLunarPlugin() |
|
75 // ----------------------------------------------------------------------------- |
|
76 // |
|
77 CCalenKoreanLunarPlugin::~CCalenKoreanLunarPlugin() |
|
78 { |
|
79 TRACE_ENTRY_POINT; |
|
80 |
|
81 // Deregister services |
|
82 if ( iServices ) |
|
83 { |
|
84 iServices->CancelNotifications( this ); |
|
85 iServices->Release(); |
|
86 } |
|
87 |
|
88 delete iLocInfo; |
|
89 delete iInfoProvider; |
|
90 if ( iLocalizer != NULL ) |
|
91 delete iLocalizer; |
|
92 |
|
93 iResourceLoader.Close(); |
|
94 delete iLabel; |
|
95 delete iConverter; |
|
96 TRACE_EXIT_POINT; |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CCalenKoreanLunarPlugin::CCalenKoreanLunarPlugin() |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 CCalenKoreanLunarPlugin::CCalenKoreanLunarPlugin( |
|
104 TUint32 aCenRepLunarEnabledId, MCalenServices* aServices ) |
|
105 : iLocalizer( NULL ), |
|
106 iResourceLoader( *( CEikonEnv::Static() ) ), |
|
107 iCenRepLunarEnabledId( aCenRepLunarEnabledId ), |
|
108 iServices( aServices ) |
|
109 |
|
110 { |
|
111 TRACE_ENTRY_POINT; |
|
112 TRACE_EXIT_POINT; |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // CCalenKoreanLunarPlugin::SetLunarLocalizerL() |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 void CCalenKoreanLunarPlugin::SetLunarLocalizerL() |
|
120 { |
|
121 TRACE_ENTRY_POINT; |
|
122 |
|
123 iLocalizer = CCalenLunarLocalizer::NewL(); |
|
124 |
|
125 TRACE_EXIT_POINT; |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // CCalenKoreanLunarPlugin::CustomPreviewPaneL() |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 MCalenPreview* CCalenKoreanLunarPlugin::CustomPreviewPaneL( TRect& aRect ) |
|
133 { |
|
134 return NULL; |
|
135 } |
|
136 |
|
137 // ----------------------------------------------------------------------------- |
|
138 // CCalenKoreanLunarPlugin::ConstructL() |
|
139 // ----------------------------------------------------------------------------- |
|
140 // |
|
141 void CCalenKoreanLunarPlugin::ConstructL() |
|
142 { |
|
143 TRACE_ENTRY_POINT; |
|
144 |
|
145 TFileName resource( KResourceDrive ); |
|
146 resource.Append( KResourcePath ); |
|
147 resource.Append( KResourceFile ); |
|
148 |
|
149 TInt err( iResourceLoader.Open( resource ) ); |
|
150 __ASSERT_ALWAYS( err == KErrNone, Panic( EPanicLunarResourceLoading ) ); |
|
151 |
|
152 LoadEnabledStatusL(); |
|
153 |
|
154 iInfoProvider = CCalenLunarInfoProvider::NewL( CEikonEnv::Static()->FsSession() ); |
|
155 iServices->RegisterForNotificationsL( this, ECalenNotifyContextChanged ); |
|
156 iServices->GetCommandRange( iStart, iEnd ); |
|
157 iConverter = CKoreanCalConv::NewL(); |
|
158 |
|
159 TRACE_EXIT_POINT; |
|
160 } |
|
161 |
|
162 // ----------------------------------------------------------------------------- |
|
163 // CCalenKoreanLunarPlugin::GetCustomViewsL() |
|
164 // ----------------------------------------------------------------------------- |
|
165 // |
|
166 void CCalenKoreanLunarPlugin::GetCustomViewsL( RPointerArray<CCalenView>& |
|
167 /*aCustomViewArray*/ ) |
|
168 { |
|
169 TRACE_ENTRY_POINT; |
|
170 TRACE_EXIT_POINT; |
|
171 } |
|
172 |
|
173 // ----------------------------------------------------------------------------- |
|
174 // CCalenKoreanLunarPlugin::GetCustomSettingsL() |
|
175 // ----------------------------------------------------------------------------- |
|
176 // |
|
177 void CCalenKoreanLunarPlugin::GetCustomSettingsL( |
|
178 RPointerArray<CAknSettingItem>& /*aCustomSettingArray*/ ) |
|
179 { |
|
180 TRACE_ENTRY_POINT; |
|
181 TRACE_EXIT_POINT; |
|
182 } |
|
183 |
|
184 // ----------------------------------------------------------------------------- |
|
185 // CCalenKoreanLunarPlugin::InfobarL() |
|
186 // ----------------------------------------------------------------------------- |
|
187 // |
|
188 CCoeControl* CCalenKoreanLunarPlugin::InfobarL( const TRect& aRect ) |
|
189 { |
|
190 TRACE_ENTRY_POINT; |
|
191 |
|
192 if ( !iLabel ) |
|
193 { |
|
194 iLabel = new ( ELeave ) CEikLabel; |
|
195 } |
|
196 iRect = aRect; |
|
197 FormatExtraRowStringL( *iLabel ); |
|
198 iLabel->SetTextL( iExtraRowText ); |
|
199 iLabel->SetRect( aRect ); |
|
200 iLabel->SetLabelAlignment( ELayoutAlignCenter ); |
|
201 |
|
202 if ( !GetColor() ) |
|
203 iLabel->OverrideColorL( EColorLabelText, iSkinColor ); |
|
204 |
|
205 TRACE_EXIT_POINT; |
|
206 return iLabel; |
|
207 } |
|
208 |
|
209 // ----------------------------------------------------------------------------- |
|
210 // CCalenKoreanLunarPlugin::InfobarL() |
|
211 // ----------------------------------------------------------------------------- |
|
212 // |
|
213 const TDesC& CCalenKoreanLunarPlugin::InfobarL() |
|
214 { |
|
215 TRACE_ENTRY_POINT; |
|
216 TRACE_EXIT_POINT; |
|
217 return iExtraRowText; |
|
218 } |
|
219 |
|
220 // ----------------------------------------------------------------------------- |
|
221 // CCalenKoreanLunarPlugin::GetColor() |
|
222 // ----------------------------------------------------------------------------- |
|
223 // |
|
224 TInt CCalenKoreanLunarPlugin::GetColor() |
|
225 { |
|
226 TRACE_ENTRY_POINT; |
|
227 // Query the text colour based on the theme |
|
228 TInt err = AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), iSkinColor, |
|
229 KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 ); |
|
230 |
|
231 TRACE_EXIT_POINT; |
|
232 return err; |
|
233 } |
|
234 |
|
235 // ----------------------------------------------------------------------------- |
|
236 // CCalenKoreanLunarPlugin::PreviewPaneL() |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 CCoeControl* CCalenKoreanLunarPlugin::PreviewPaneL( TRect& aRect ) |
|
240 { |
|
241 TRACE_ENTRY_POINT; |
|
242 |
|
243 |
|
244 if (iLabel) |
|
245 { |
|
246 delete iLabel; |
|
247 iLabel = NULL; |
|
248 } |
|
249 |
|
250 |
|
251 if ( !iLabel ) |
|
252 { |
|
253 iLabel = new ( ELeave ) CEikLabel; |
|
254 } |
|
255 FormatExtraRowStringL( *iLabel |
|
256 #ifdef RD_CALENDAR_PREVIEW |
|
257 , EFalse |
|
258 #endif // RD_CALENDAR_PREVIEW |
|
259 ); |
|
260 iLabel->SetTextL( iExtraRowText ); |
|
261 iLabel->SetRect( aRect ); |
|
262 iLabel->SetLabelAlignment( ELayoutAlignCenter ); |
|
263 |
|
264 if ( !GetColor() ) |
|
265 iLabel->OverrideColorL( EColorLabelText, iSkinColor ); |
|
266 |
|
267 TRACE_EXIT_POINT; |
|
268 return iLabel; |
|
269 } |
|
270 |
|
271 // ----------------------------------------------------------------------------- |
|
272 // CCalenKoreanLunarPlugin::RemoveViewsFromCycle() |
|
273 // ----------------------------------------------------------------------------- |
|
274 // |
|
275 void CCalenKoreanLunarPlugin::RemoveViewsFromCycle( RArray<TInt>& /*aViews*/ ) |
|
276 { |
|
277 TRACE_ENTRY_POINT; |
|
278 TRACE_EXIT_POINT; |
|
279 } |
|
280 |
|
281 // ----------------------------------------------------------------------------- |
|
282 // CCalenKoreanLunarPlugin::CustomiseMenuPaneL() |
|
283 // ----------------------------------------------------------------------------- |
|
284 // |
|
285 TBool CCalenKoreanLunarPlugin::CustomiseMenuPaneL( TInt aResourceId, |
|
286 CEikMenuPane* aMenuPane ) |
|
287 { |
|
288 TRACE_ENTRY_POINT; |
|
289 |
|
290 if ( iLunarEnabled ) |
|
291 { |
|
292 CEikMenuPaneItem* item = new ( ELeave ) CEikMenuPaneItem(); |
|
293 CleanupStack::PushL( item ); |
|
294 item->iData.iCommandId = iStart; |
|
295 |
|
296 HBufC* tmp = StringLoader::LoadLC( R_CALENDAR_SHOW_LUNAR_DATA ); |
|
297 item->iData.iText = *tmp; |
|
298 CleanupStack::PopAndDestroy( tmp ); |
|
299 |
|
300 item->iData.iCascadeId = 0; |
|
301 item->iData.iFlags = 0; |
|
302 |
|
303 TInt pos = aMenuPane->NumberOfItemsInPane()-2; |
|
304 if ( pos < 1 ) |
|
305 { |
|
306 pos = 1; |
|
307 } |
|
308 |
|
309 aMenuPane->InsertMenuItemL( item->iData, pos ); |
|
310 |
|
311 CleanupStack::Pop( item ); |
|
312 return ETrue; |
|
313 } |
|
314 TRACE_EXIT_POINT; |
|
315 return EFalse; |
|
316 } |
|
317 |
|
318 // ----------------------------------------------------------------------------- |
|
319 // CCalenKoreanLunarPlugin::CanBeEnabledDisabled() |
|
320 // ----------------------------------------------------------------------------- |
|
321 // |
|
322 TBool CCalenKoreanLunarPlugin::CanBeEnabledDisabled() |
|
323 { |
|
324 TRACE_ENTRY_POINT; |
|
325 TRACE_EXIT_POINT; |
|
326 return ETrue; |
|
327 } |
|
328 |
|
329 // ----------------------------------------------------------------------------- |
|
330 // CCalenKoreanLunarPlugin::CalenCustomisationExtensionL() |
|
331 // ----------------------------------------------------------------------------- |
|
332 // |
|
333 TAny* CCalenKoreanLunarPlugin::CalenCustomisationExtensionL( TUid aExtensionUid ) |
|
334 { |
|
335 TRACE_ENTRY_POINT; |
|
336 TRACE_EXIT_POINT; |
|
337 return NULL; |
|
338 } |
|
339 |
|
340 // ----------------------------------------------------------------------------- |
|
341 // CCalenKoreanLunarPlugin::CommandHandlerL() |
|
342 // ----------------------------------------------------------------------------- |
|
343 // |
|
344 MCalenCommandHandler* CCalenKoreanLunarPlugin::CommandHandlerL( TInt aCommand ) |
|
345 { |
|
346 TRACE_ENTRY_POINT; |
|
347 |
|
348 if ( aCommand == iStart ) |
|
349 { |
|
350 return this; |
|
351 } |
|
352 else |
|
353 { |
|
354 return NULL; |
|
355 } |
|
356 |
|
357 TRACE_EXIT_POINT; |
|
358 } |
|
359 |
|
360 // ----------------------------------------------------------------------------- |
|
361 // CCalenKoreanLunarPlugin::HandleCommandL() |
|
362 // ----------------------------------------------------------------------------- |
|
363 // |
|
364 TBool CCalenKoreanLunarPlugin::HandleCommandL( const TCalenCommand& aCommand ) |
|
365 { |
|
366 TRACE_ENTRY_POINT; |
|
367 |
|
368 TInt command( aCommand.Command() ); |
|
369 if ( command == iStart ) |
|
370 { |
|
371 ShowDetailsL(); |
|
372 } |
|
373 TRACE_EXIT_POINT; |
|
374 return EFalse; |
|
375 } |
|
376 |
|
377 // ----------------------------------------------------------------------------- |
|
378 // CCalenKoreanLunarPlugin::CalenCommandHandlerExtensionL() |
|
379 // ----------------------------------------------------------------------------- |
|
380 // |
|
381 TAny* CCalenKoreanLunarPlugin::CalenCommandHandlerExtensionL( TUid aExtensionUid ) |
|
382 { |
|
383 TRACE_ENTRY_POINT; |
|
384 TRACE_EXIT_POINT; |
|
385 return NULL; |
|
386 } |
|
387 |
|
388 // ----------------------------------------------------------------------------- |
|
389 // CCalenKoreanLunarPlugin::HandleNotification() |
|
390 // ----------------------------------------------------------------------------- |
|
391 // |
|
392 void CCalenKoreanLunarPlugin::HandleNotification( |
|
393 const TCalenNotification aNotification ) |
|
394 { |
|
395 TRACE_ENTRY_POINT; |
|
396 |
|
397 if ( aNotification == ECalenNotifyContextChanged ) |
|
398 { |
|
399 TRAP_IGNORE( UpdateInfoBarL() ); |
|
400 } |
|
401 |
|
402 TRACE_EXIT_POINT; |
|
403 } |
|
404 |
|
405 // ----------------------------------------------------------------------------- |
|
406 // GetCenRepIntL() |
|
407 // ----------------------------------------------------------------------------- |
|
408 // |
|
409 TInt GetCenRepIntL( const TUid& aCRUid, TInt aKeyId ) |
|
410 { |
|
411 TRACE_ENTRY_POINT; |
|
412 |
|
413 CRepository* repository = CRepository::NewL( aCRUid ); |
|
414 CleanupStack::PushL( repository ); |
|
415 TInt tmp = 0; |
|
416 TInt err = repository->Get( aKeyId, tmp ); |
|
417 if ( err == KErrNotFound ) |
|
418 { |
|
419 tmp = 0; |
|
420 } |
|
421 else |
|
422 { |
|
423 User::LeaveIfError( err ); |
|
424 } |
|
425 CleanupStack::PopAndDestroy( repository ); |
|
426 |
|
427 TRACE_EXIT_POINT; |
|
428 return tmp; |
|
429 } |
|
430 |
|
431 // ----------------------------------------------------------------------------- |
|
432 // CCalenKoreanLunarPlugin::LoadEnabledStatusL() |
|
433 // ----------------------------------------------------------------------------- |
|
434 // |
|
435 TBool CCalenKoreanLunarPlugin::LoadEnabledStatusL() |
|
436 { |
|
437 TRACE_ENTRY_POINT; |
|
438 |
|
439 TInt enabled = 0; |
|
440 TRAPD( err, enabled = GetCenRepIntL( KCRUidCalenKoreanPlugin, iCenRepLunarEnabledId ) ); |
|
441 if ( err == KErrNone ) |
|
442 { |
|
443 iLunarEnabled = static_cast<TBool>( enabled ); |
|
444 } |
|
445 else |
|
446 { |
|
447 iLunarEnabled = ETrue; |
|
448 } |
|
449 |
|
450 TRACE_EXIT_POINT; |
|
451 return iLunarEnabled; |
|
452 } |
|
453 |
|
454 // ----------------------------------------------------------------------------- |
|
455 // CCalenKoreanLunarPlugin::StoreEnabledStatusL() |
|
456 // ----------------------------------------------------------------------------- |
|
457 // |
|
458 void CCalenKoreanLunarPlugin::StoreEnabledStatusL( TBool aEnabled ) |
|
459 { |
|
460 TRACE_ENTRY_POINT; |
|
461 |
|
462 CRepository* repository = CRepository::NewL( KCRUidCalenKoreanPlugin ); |
|
463 CleanupStack::PushL( repository ); |
|
464 |
|
465 User::LeaveIfError( repository->Set( iCenRepLunarEnabledId, |
|
466 static_cast<TInt>( aEnabled ) ) ); |
|
467 CleanupStack::PopAndDestroy( repository ); |
|
468 |
|
469 iLunarEnabled = aEnabled; |
|
470 |
|
471 TRACE_EXIT_POINT; |
|
472 } |
|
473 |
|
474 // ----------------------------------------------------------------------------- |
|
475 // CCalenKoreanLunarPlugin::FormatExtraRowStringL() |
|
476 // ----------------------------------------------------------------------------- |
|
477 // |
|
478 void CCalenKoreanLunarPlugin::FormatExtraRowStringL( CEikLabel& aLabel |
|
479 #ifdef RD_CALENDAR_PREVIEW |
|
480 , TBool aTwoLines |
|
481 #endif // RD_CALENDAR_PREVIEW |
|
482 ) |
|
483 { |
|
484 TRACE_ENTRY_POINT; |
|
485 |
|
486 // added hero to have always lates date |
|
487 TTime focusTime = iServices->Context().FocusDateAndTimeL().TimeLocalL(); |
|
488 TCalenLunarInfo info = iInfoProvider->GetLunarInfoL( focusTime ); |
|
489 |
|
490 if ( iLocInfo ) |
|
491 { |
|
492 delete iLocInfo; |
|
493 iLocInfo = NULL; |
|
494 } |
|
495 |
|
496 iLocInfo = iLocalizer->LocalizeL( info ); |
|
497 // add end |
|
498 |
|
499 const CFont* font = NULL; |
|
500 font = AknLayoutUtils::FontFromId( EAknLogicalFontPrimarySmallFont, NULL ); |
|
501 aLabel.SetFont( font ); |
|
502 |
|
503 TInt maxWidth = iRect.Size().iWidth; |
|
504 |
|
505 if ( font && iLocInfo ) |
|
506 { |
|
507 iExtraRowText.Set( iLocalizer->GetExtraRowTextL( *iLocInfo, |
|
508 maxWidth, |
|
509 *font |
|
510 #ifdef RD_CALENDAR_PREVIEW |
|
511 , aTwoLines |
|
512 #endif // RD_CALENDAR_PREVIEW |
|
513 ) ); |
|
514 } |
|
515 else |
|
516 { |
|
517 iExtraRowText.Set( KNullDesC ); |
|
518 } |
|
519 |
|
520 TRACE_EXIT_POINT; |
|
521 } |
|
522 |
|
523 // ----------------------------------------------------------------------------- |
|
524 // CCalenKoreanLunarPlugin::ShowDetailsL() |
|
525 // ----------------------------------------------------------------------------- |
|
526 // |
|
527 void CCalenKoreanLunarPlugin::ShowDetailsL( ) |
|
528 { |
|
529 TRACE_ENTRY_POINT; |
|
530 |
|
531 HBufC* msg = HBufC::NewLC( 1000 ); |
|
532 |
|
533 if ( iLocInfo ) |
|
534 { |
|
535 // Headers |
|
536 TInt headerIds[KFieldCount] = { |
|
537 R_CALENDAR_LUNAR_INFO_DATE, |
|
538 R_CALENDAR_LUNAR_INFO_WESTERN_DATE |
|
539 }; |
|
540 |
|
541 RPointerArray<HBufC> headers; |
|
542 CleanupResetAndDestroyPushL( headers ); |
|
543 |
|
544 for ( TInt i = 0; i < KFieldCount; i++ ) |
|
545 { |
|
546 headers.Append( StringLoader::LoadL( headerIds[i] ) ); |
|
547 } |
|
548 |
|
549 CPtrCArray* fields = new ( ELeave ) CPtrCArray( KFieldCount ); |
|
550 CleanupStack::PushL( fields ); |
|
551 fields->AppendL( iLocInfo->LunarMonthAndDay() ); |
|
552 fields->AppendL( iLocInfo->GregorianDate() ); |
|
553 |
|
554 for ( TInt i = 0; i < KFieldCount; i++ ) |
|
555 { |
|
556 TPtrC field = fields->At( i ); |
|
557 if ( field != KNullDesC ) |
|
558 { |
|
559 msg->Des().Append( *( headers[i] ) ); |
|
560 msg->Des().Append( KHeaderSeparator ); |
|
561 msg->Des().Append( field ); |
|
562 if ( i < KFieldCount - 1 ) // not last |
|
563 { |
|
564 msg->Des().Append( KFieldSeparator ); |
|
565 } |
|
566 } |
|
567 } |
|
568 CleanupStack::PopAndDestroy( fields ); |
|
569 CleanupStack::PopAndDestroy( &headers ); |
|
570 } |
|
571 |
|
572 TPtrC ptr( *msg ); |
|
573 CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( ptr ); |
|
574 CleanupStack::PushL( dlg ); |
|
575 dlg->PrepareLC( R_CALEN_LUNAR_DETAILS_DIALOG ); |
|
576 CleanupStack::Pop( dlg ); |
|
577 |
|
578 dlg->RunLD(); |
|
579 CleanupStack::PopAndDestroy( msg ); |
|
580 |
|
581 TRACE_EXIT_POINT; |
|
582 } |
|
583 |
|
584 // ----------------------------------------------------------------------------- |
|
585 // CCalenKoreanLunarPlugin::DateTimeToKoreanL() |
|
586 // ----------------------------------------------------------------------------- |
|
587 // |
|
588 void CCalenKoreanLunarPlugin::DateTimeToKoreanL( const TDateTime& aDateTime, |
|
589 TKoreanDate& aKoreanDate ) |
|
590 { |
|
591 TRACE_ENTRY_POINT; |
|
592 iConverter->DateTimeToKoreanL( aDateTime, aKoreanDate ); |
|
593 TRACE_EXIT_POINT; |
|
594 } |
|
595 |
|
596 // ----------------------------------------------------------------------------- |
|
597 // CCalenKoreanLunarPlugin::KoreanToDateTimeL() |
|
598 // ----------------------------------------------------------------------------- |
|
599 // |
|
600 void CCalenKoreanLunarPlugin::KoreanToDateTimeL( TKoreanDate& aKoreanDate, |
|
601 TDateTime& aDateTime ) |
|
602 { |
|
603 TRACE_ENTRY_POINT; |
|
604 iConverter->KoreanToDateTimeL( aKoreanDate, aDateTime ); |
|
605 TRACE_EXIT_POINT; |
|
606 } |
|
607 |
|
608 // ----------------------------------------------------------------------------- |
|
609 // CCalenKoreanLunarPlugin::DateRange() |
|
610 // ----------------------------------------------------------------------------- |
|
611 // |
|
612 void CCalenKoreanLunarPlugin::DateRange( TDateTime& aLower, TDateTime& aUpper ) |
|
613 { |
|
614 TRACE_ENTRY_POINT; |
|
615 iConverter->DateRange( aLower, aUpper ); |
|
616 TRACE_EXIT_POINT; |
|
617 } |
|
618 |
|
619 // ----------------------------------------------------------------------------- |
|
620 // CCalenKoreanLunarPlugin::DateRange() |
|
621 // ----------------------------------------------------------------------------- |
|
622 // |
|
623 void CCalenKoreanLunarPlugin::DateRange( TKoreanDate& aLower, TKoreanDate& aUpper ) |
|
624 { |
|
625 TRACE_ENTRY_POINT; |
|
626 iConverter->DateRange( aLower, aUpper ); |
|
627 TRACE_EXIT_POINT; |
|
628 } |
|
629 |
|
630 // ----------------------------------------------------------------------------- |
|
631 // CCalenKoreanLunarPlugin::UpdateInfoBarL() |
|
632 // ----------------------------------------------------------------------------- |
|
633 // |
|
634 void CCalenKoreanLunarPlugin::UpdateInfoBarL() |
|
635 { |
|
636 TRACE_ENTRY_POINT; |
|
637 |
|
638 if ( iLabel ) |
|
639 { |
|
640 FormatExtraRowStringL( *iLabel ); |
|
641 iLabel->SetTextL( iExtraRowText ); |
|
642 } |
|
643 |
|
644 TRACE_EXIT_POINT; |
|
645 } |
|
646 |
|
647 // End of file |