|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #if !defined(__KOREANLUNARDATEEDITOR_H_) |
|
19 #define __KOREANLUNARDATEEDITOR_H_ |
|
20 |
|
21 // INCLUDES |
|
22 #include <eikmfne.h> |
|
23 #include <calencustomisationmanager.h> |
|
24 |
|
25 //Forward Declarations |
|
26 class CKoreanCalConv; |
|
27 class CKoreanLunarDateUtil; |
|
28 |
|
29 NONSHARABLE_CLASS( CKoreanLunarDateEditor ) : public CEikMfne//CEikDateEditor// |
|
30 { |
|
31 public: // public constructors |
|
32 |
|
33 /** |
|
34 * C++ default constructor. |
|
35 */ |
|
36 CKoreanLunarDateEditor(MCalenServices* aServices); |
|
37 |
|
38 /** |
|
39 * Two phased constructor. |
|
40 */ |
|
41 void ConstructL( const TInt aFlags=0 ); |
|
42 |
|
43 /** |
|
44 * Two phased constructor. |
|
45 */ |
|
46 static CKoreanLunarDateEditor* NewL(MCalenServices* aServices); |
|
47 |
|
48 public: // Methods for getting and setting values |
|
49 |
|
50 /** |
|
51 * Set's the date. |
|
52 * @param aDate date to set |
|
53 * |
|
54 */ |
|
55 void SetDate( const TTime& aDate, TBool newEntry ); |
|
56 |
|
57 /** |
|
58 * Gets the editor's value. |
|
59 * @return TTime struct including the date. |
|
60 */ |
|
61 TTime Date(); |
|
62 |
|
63 /** |
|
64 * Sets the editor's leap mode dynamically. |
|
65 * @param aLeap indicates if leap mode should be enabled (ETrue) |
|
66 * or disabled (EFalse) |
|
67 */ |
|
68 void SetLeap( const TBool aLeap ); |
|
69 |
|
70 /** |
|
71 * Method for reading the leap mode status. |
|
72 * |
|
73 */ |
|
74 /** |
|
75 * Gets the editor's leap mode. |
|
76 * @return TBool indicating leap mode state. |
|
77 */ |
|
78 TBool Leap() const; |
|
79 |
|
80 |
|
81 |
|
82 public: // from CCoeControl |
|
83 |
|
84 /** |
|
85 * From @c CCoeControl. Constructs controls from a resource file. |
|
86 * Essential for Dialog/Form construction. |
|
87 * @param aResourceReader The resource reader with which to access |
|
88 * @c LUNAR_DATE_EDITOR |
|
89 * resource. |
|
90 */ |
|
91 void ConstructFromResourceL(TResourceReader& aResourceReader); |
|
92 /** |
|
93 * Prepares For FocusLoss |
|
94 */ |
|
95 void PrepareForFocusLossL(); |
|
96 |
|
97 /** |
|
98 * Handles Control State Change |
|
99 */ |
|
100 void HandleControlStateChangeL( TInt aControlId ); |
|
101 |
|
102 private: |
|
103 /** |
|
104 * From CAknControl |
|
105 */ |
|
106 void* ExtensionInterface( TUid aInterface ); |
|
107 |
|
108 private: |
|
109 virtual void CEikMfne_Reserved(); |
|
110 |
|
111 private: |
|
112 HBufC* iIndicatorField; |
|
113 CEikMfneNumber* iMonthField; |
|
114 CEikMfneNumber* iDayField; |
|
115 TDateTime iDate; |
|
116 TBool iLeap; |
|
117 |
|
118 MCalenServices* iServices; |
|
119 |
|
120 CKoreanCalConv* iConverter; |
|
121 CKoreanLunarDateUtil* iDateUtil; |
|
122 }; |
|
123 |
|
124 #endif /* __KOREANLUNARDATEEDITOR_H_ */ |