|
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 #ifndef __CALENLUNARLOCALIZER_H__ |
|
19 #define __CALENLUNARLOCALIZER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <badesca.h> |
|
24 #include "CalenLunarLocalizedInfo.h" |
|
25 #include "CalendarVariant.hrh" |
|
26 |
|
27 // FORWARD DECLARATION |
|
28 class CEikonEnv; |
|
29 class TCalenLunarInfo; |
|
30 class TChineseDate; |
|
31 class CFont; |
|
32 class CCalenExtraRowFormatter; |
|
33 |
|
34 /** |
|
35 * Class declaration for Lunar localizer |
|
36 */ |
|
37 class CCalenLunarLocalizer : public CBase |
|
38 { |
|
39 public: // public API |
|
40 static CCalenLunarLocalizer* NewL(); |
|
41 |
|
42 virtual ~CCalenLunarLocalizer(); |
|
43 |
|
44 virtual CCalenLunarLocalizedInfo* LocalizeL( TCalenLunarInfo& aInfo ); |
|
45 |
|
46 virtual TPtrC GetExtraRowTextL( CCalenLunarLocalizedInfo& aLocInfo, |
|
47 TInt aMaxWidth, |
|
48 const CFont& aFont |
|
49 #ifdef RD_CALENDAR_PREVIEW |
|
50 , TBool aTwoLines |
|
51 #endif // RD_CALENDAR_PREVIEW |
|
52 ); |
|
53 |
|
54 protected: |
|
55 CCalenLunarLocalizer(); |
|
56 |
|
57 void ConstructL(); |
|
58 |
|
59 TBool TryToFitL( const TDesC& aStr ); |
|
60 virtual void LocalizeMonthAndDayL(CCalenLunarLocalizedInfo* aLocInfo, |
|
61 TCalenLunarInfo& aInfo); |
|
62 private: |
|
63 |
|
64 protected: // data |
|
65 CEikonEnv* iEikEnv; |
|
66 |
|
67 /** |
|
68 * Localized names of lunar festivals |
|
69 * Own. |
|
70 */ |
|
71 CDesCArray* iLunarFestivalNames; |
|
72 |
|
73 /** |
|
74 * Localized names of solar festivals |
|
75 * Own. |
|
76 */ |
|
77 CDesCArray* iSolarFestivalNames; |
|
78 |
|
79 /** |
|
80 * Localized names of solar terms |
|
81 * Own. |
|
82 */ |
|
83 CDesCArray* iSolarTermNames; |
|
84 |
|
85 /** |
|
86 * Format string for western date. |
|
87 * Own. |
|
88 */ |
|
89 HBufC* iGregorianDateFormat; |
|
90 |
|
91 TBuf<1000> iLunarExtraRowText; |
|
92 |
|
93 |
|
94 /** |
|
95 * Language independent formatter of extra row information. |
|
96 */ |
|
97 CCalenExtraRowFormatter* iRowFormatter; |
|
98 |
|
99 }; |
|
100 |
|
101 #endif // __CALENLUNARLOCALIZER_H__ |