equal
deleted
inserted
replaced
34 #include "CalenLunarPanic.h" |
34 #include "CalenLunarPanic.h" |
35 #include "CalenLunarLocalizedInfo.h" |
35 #include "CalenLunarLocalizedInfo.h" |
36 #include "CalenLunarLocalizer.h" |
36 #include "CalenLunarLocalizer.h" |
37 #include "CalenLunarInfoProvider.h" |
37 #include "CalenLunarInfoProvider.h" |
38 #include "CalendarPrivateCRKeys.h" |
38 #include "CalendarPrivateCRKeys.h" |
|
39 #include "calenRegionalInfoData.h" |
39 #include "hb_calencommands.hrh" |
40 #include "hb_calencommands.hrh" |
40 |
41 |
41 //CONSTANTS |
42 //CONSTANTS |
42 static const QString fieldSeparator("\n"); |
43 static const QString fieldSeparator("\n"); |
43 static const QString headerSeparator("\n "); |
44 static const QString headerSeparator("\n "); |
97 if(iInfoBarText) |
98 if(iInfoBarText) |
98 { |
99 { |
99 delete iInfoBarText; |
100 delete iInfoBarText; |
100 iInfoBarText = NULL; |
101 iInfoBarText = NULL; |
101 } |
102 } |
102 |
103 if(iRegionalInfo) |
|
104 { |
|
105 delete iRegionalInfo; |
|
106 iRegionalInfo = NULL; |
|
107 } |
103 delete iInfoProvider; |
108 delete iInfoProvider; |
104 iInfoProvider = NULL; |
109 iInfoProvider = NULL; |
105 delete iLocalizer; |
110 delete iLocalizer; |
106 iLocalizer = NULL; |
111 iLocalizer = NULL; |
107 delete iLocInfo; |
112 delete iLocInfo; |
130 |
135 |
131 iLocalizer = CCalenLunarLocalizer::NewL(); |
136 iLocalizer = CCalenLunarLocalizer::NewL(); |
132 |
137 |
133 iInfoProvider = CCalenLunarInfoProvider::NewL( |
138 iInfoProvider = CCalenLunarInfoProvider::NewL( |
134 CEikonEnv::Static()->FsSession() ); |
139 CEikonEnv::Static()->FsSession() ); |
135 |
140 //Qt class having a slot ,calls when user clicked show lunar data option |
|
141 iRegionalInfo = new CalenRegionalInfo(*this); |
136 |
142 |
137 TRACE_EXIT_POINT; |
143 TRACE_EXIT_POINT; |
138 } |
144 } |
139 |
145 |
140 // ----------------------------------------------------------------------------- |
146 // ----------------------------------------------------------------------------- |
201 |
207 |
202 void CCalenLunarChinesePlugin::CustomiseMenu(HbMenu* aHbMenu) |
208 void CCalenLunarChinesePlugin::CustomiseMenu(HbMenu* aHbMenu) |
203 { |
209 { |
204 HbAction* lunarAction = new HbAction("Show Lunar Data"); |
210 HbAction* lunarAction = new HbAction("Show Lunar Data"); |
205 QList<QAction*> actionList = aHbMenu->actions(); |
211 QList<QAction*> actionList = aHbMenu->actions(); |
206 TInt count = actionList.count() - 1; |
212 TInt count = actionList.count() - 1; //To show the option "show lunar data" |
|
213 //as a second last action item for all |
|
214 //Menu |
207 if(count >= 0) |
215 if(count >= 0) |
208 aHbMenu->insertAction(actionList[count], lunarAction); |
216 aHbMenu->insertAction(actionList[count], lunarAction); |
|
217 //calls a slot whenever user clicked "show lunar data" option |
|
218 QObject::connect(lunarAction,SIGNAL(triggered()), iRegionalInfo,SLOT(showRegionalDetails())); |
209 } |
219 } |
210 |
220 |
211 // ----------------------------------------------------------------------------- |
221 // ----------------------------------------------------------------------------- |
212 // CCalenLunarChinesePlugin::HandleCommandL |
222 // CCalenLunarChinesePlugin::HandleCommandL |
213 // ----------------------------------------------------------------------------- |
223 // ----------------------------------------------------------------------------- |