15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 #ifndef __CALENLUNARCHINESEPLUGIN_H__ |
20 #ifndef __CALENLUNARPLUGIN_H__ |
21 #define __CALENLUNARCHINESEPLUGIN_H__ |
21 #define __CALENLUNARPLUGIN_H__ |
22 |
22 |
23 //SYSTEM INCLUDES |
23 //SYSTEM INCLUDES |
|
24 #include <e32base.h> |
24 #include <ecom.h> |
25 #include <ecom.h> |
|
26 #include <ConeResLoader.h> |
25 |
27 |
26 //CALENDAR INCLUDES |
28 //CALENDAR INCLUDES |
27 #include <calencommandhandler.h> |
29 #include <calencommandhandler.h> |
28 #include <calennotificationhandler.h> |
30 #include <calennotificationhandler.h> |
29 #include <calenservices.h> |
31 #include <calenservices.h> |
|
32 #include <eiklabel.h> |
|
33 #include <coecntrl.h> |
30 #include <calencustomisation.h> |
34 #include <calencustomisation.h> |
31 |
35 |
32 #include "CalendarVariant.hrh" |
36 #include "CalendarVariant.hrh" |
33 |
37 |
34 |
38 |
35 //FORWARD DECLARE |
39 //FORWARD DECLARE |
36 class QString; |
40 class CEikonEnv; |
37 class HbTranslator; |
|
38 class HbWidget; |
|
39 class HbMenu; |
|
40 |
|
41 class CCalenLunarInfoProvider; |
41 class CCalenLunarInfoProvider; |
42 class CCalenLunarLocalizer; |
42 class CCalenLunarLocalizer; |
43 class CCalenLunarLocalizedInfo; |
43 class CCalenLunarLocalizedInfo; |
44 class CalenRegionalInfo; |
44 class CEikLabel; |
45 |
45 class MCalenPreview; |
46 |
|
47 |
46 |
48 |
47 |
49 //CLASS DECLARATION |
48 //CLASS DECLARATION |
50 class CCalenLunarChinesePlugin :public CCalenCustomisation, |
49 NONSHARABLE_CLASS(CCalenLunarChinesePlugin) : public CCalenCustomisation, |
51 public MCalenCommandHandler, |
50 public MCalenCommandHandler, |
52 public MCalenNotificationHandler |
51 public MCalenNotificationHandler |
53 |
|
54 |
52 |
55 { |
53 { |
56 |
|
57 public: |
54 public: |
58 |
55 |
59 static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices ); |
56 static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices ); |
60 virtual ~CCalenLunarChinesePlugin(); |
57 virtual ~CCalenLunarChinesePlugin(); |
61 |
58 |
62 private: |
59 private: |
63 CCalenLunarChinesePlugin( MCalenServices* aServices); |
60 CCalenLunarChinesePlugin( MCalenServices* aServices); |
64 void ConstructL(); |
61 void ConstructL(); |
65 |
62 |
66 public: //From CCalenCustomisation |
63 public: //From CCalenCustomisation |
67 HbWidget* InfobarL( ); |
64 void GetCustomViewsL( RPointerArray<CCalenView>& aCustomViewArray ); |
68 QString* InfobarTextL(); |
65 void GetCustomSettingsL( RPointerArray<CAknSettingItem>& aCustomSettingArray ); |
|
66 CCoeControl* InfobarL( const TRect& aRect ); |
|
67 const TDesC& InfobarL(); |
|
68 MCalenPreview* CustomPreviewPaneL( TRect& aRect ); |
|
69 CCoeControl* PreviewPaneL( TRect& aRect ); |
69 MCalenCommandHandler* CommandHandlerL( TInt aCommand ); |
70 MCalenCommandHandler* CommandHandlerL( TInt aCommand ); |
70 void CustomiseMenu(HbMenu* aHbMenu); |
71 void RemoveViewsFromCycle( RArray<TInt>& aViews ); |
|
72 TBool CustomiseMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
73 TBool CanBeEnabledDisabled(); |
|
74 TAny* CalenCustomisationExtensionL( TUid aExtensionUid ); |
71 |
75 |
72 public:// From MCalenCommandHandler |
76 public:// From MCalenCommandHandler |
73 TBool HandleCommandL( const TCalenCommand& aCommand ); |
77 TBool HandleCommandL( const TCalenCommand& aCommand ); |
74 TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid ); |
78 TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid ); |
75 |
79 |
76 public://From MCalenNotificationHandler |
80 public://From MCalenNotificationHandler |
77 void HandleNotification( const TCalenNotification aNotification ); |
81 void HandleNotification( const TCalenNotification aNotification ); |
78 |
82 |
79 private: |
83 private: |
80 void FormatExtraRowStringL(); |
84 void SetLabelContentL( CEikLabel& aLabel ,const TRect& aRect); |
|
85 void SetLabelContentExtraL( CEikLabel& aLabel, TRect& aRect); |
|
86 void FormatExtraRowStringL( CEikLabel& aLabel,TBool aTwoLines); |
81 void UpdateLocalizerInfoL(); |
87 void UpdateLocalizerInfoL(); |
82 void ExecuteMessageDialogL( QString aMsgText ); |
88 void ExecuteMessageDialogL( TDesC& aMsgText ); |
83 |
89 |
84 public: |
90 public: |
85 void ShowDetailsL(); |
91 void ShowDetailsL(); |
86 |
92 |
87 private: |
93 private: |
109 /** |
115 /** |
110 * This text object is used for hitchcock |
116 * This text object is used for hitchcock |
111 * infobar in Month/Day/Week. |
117 * infobar in Month/Day/Week. |
112 */ |
118 */ |
113 HBufC* iInfoBarText; |
119 HBufC* iInfoBarText; |
|
120 |
|
121 /** |
|
122 * This control is used in avkon view. |
|
123 */ |
|
124 CEikLabel* iLabelControl; |
114 TInt iStart; |
125 TInt iStart; |
115 TInt iEnd; |
126 TInt iEnd; |
116 HbTranslator* iTranslator; |
127 TRect iRect; |
|
128 TInt iResourceFileOffset; |
117 |
129 |
118 CalenRegionalInfo* iRegionalInfo ; |
|
119 }; |
130 }; |
120 |
131 |
121 #endif //__CALENLUNARCHINESEPLUGIN_H__ |
132 |
|
133 NONSHARABLE_CLASS(CCalenPluginLabel) : public CEikLabel |
|
134 { |
|
135 public: |
|
136 static CCalenPluginLabel* NewL(CCalenLunarChinesePlugin& iPlugin); |
|
137 |
|
138 private: |
|
139 ~CCalenPluginLabel(); |
|
140 CCalenPluginLabel(CCalenLunarChinesePlugin& iPlugin); |
|
141 void ConstructL(); |
|
142 |
|
143 private: //CCoeControl |
|
144 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
145 void Draw( const TRect& aRect) const; |
|
146 |
|
147 private: |
|
148 CCalenLunarChinesePlugin& iPlugin; |
|
149 |
|
150 }; |
|
151 |
|
152 #endif //__CALENLUNARPLUGIN_H__ |
|
153 |
|
154 |
|
155 |
|
156 |