105 OstTraceFunctionEntry0( CALENDELETEUI_CONSTRUCTL_ENTRY ); |
105 OstTraceFunctionEntry0( CALENDELETEUI_CONSTRUCTL_ENTRY ); |
106 |
106 |
107 RArray<TCalenNotification> notifications; |
107 RArray<TCalenNotification> notifications; |
108 notifications.Append(ECalenNotifyCancelDelete); |
108 notifications.Append(ECalenNotifyCancelDelete); |
109 notifications.Append(ECalenNotifyCloseDialogs); |
109 notifications.Append(ECalenNotifyCloseDialogs); |
|
110 notifications.Append(ECalenNotifySystemLocaleChanged); |
110 |
111 |
111 iController.RegisterForNotificationsL( this, notifications ); |
112 iController.RegisterForNotificationsL( this, notifications ); |
112 |
113 |
113 notifications.Close(); |
114 notifications.Close(); |
114 |
115 |
115 iMoreEntriesToDelete = EFalse; |
116 iMoreEntriesToDelete = EFalse; |
116 iDisplayQuery = EFalse; |
117 iDisplayQuery = EFalse; |
117 iEntriesToDelete = KEntriesToDelete; |
118 iEntriesToDelete = KEntriesToDelete; |
|
119 mDatePicker = 0; |
118 |
120 |
119 OstTraceFunctionExit0( CALENDELETEUI_CONSTRUCTL_EXIT ); |
121 OstTraceFunctionExit0( CALENDELETEUI_CONSTRUCTL_EXIT ); |
120 } |
122 } |
121 |
123 |
122 // ---------------------------------------------------------------------------- |
124 // ---------------------------------------------------------------------------- |
126 // ---------------------------------------------------------------------------- |
128 // ---------------------------------------------------------------------------- |
127 // |
129 // |
128 void CalenDeleteUi::HandleNotification(const TCalenNotification aNotification ) |
130 void CalenDeleteUi::HandleNotification(const TCalenNotification aNotification ) |
129 { |
131 { |
130 OstTraceFunctionEntry0( CALENDELETEUI_HANDLENOTIFICATION_ENTRY ); |
132 OstTraceFunctionEntry0( CALENDELETEUI_HANDLENOTIFICATION_ENTRY ); |
131 |
133 switch(aNotification) { |
132 if( aNotification == ECalenNotifyCancelDelete) |
134 case ECalenNotifyCancelDelete: { |
133 { |
135 if(iMutlipleContextIdsCount) |
134 if(iMutlipleContextIdsCount) |
136 { |
135 { |
137 // get the context |
136 // get the context |
138 MCalenContext& context = iController.context(); |
137 MCalenContext& context = iController.context(); |
139 // reset the multiple contexts |
138 // reset the multiple contexts |
140 context.resetMultipleContextIds(); |
139 context.resetMultipleContextIds(); |
141 } |
140 |
142 break; |
141 } |
|
142 } |
143 } |
143 else if (aNotification == ECalenNotifyCloseDialogs ) |
144 case ECalenNotifyCloseDialogs: { |
144 { |
145 // Emit the signal to close all the dialogs which are already opened |
145 // Emit the signal to close all the dialogs which are already opened |
146 emit closeDialogs(); |
146 emit closeDialogs(); |
147 break; |
147 } |
148 } |
148 |
149 case ECalenNotifySystemLocaleChanged: { |
|
150 //Refresh the date picker of Date query when deleting entries before date |
|
151 if(!(mDatePicker.isNull())) { |
|
152 mDatePicker->setDisplayFormat(CalenDateUtils::dateFormatString()); |
|
153 mDatePicker->setDate(QDate::currentDate()); |
|
154 } |
|
155 break; |
|
156 } |
|
157 default: |
|
158 break; |
|
159 } |
149 OstTraceFunctionExit0( CALENDELETEUI_HANDLENOTIFICATION_EXIT ); |
160 OstTraceFunctionExit0( CALENDELETEUI_HANDLENOTIFICATION_EXIT ); |
150 } |
161 } |
151 |
162 |
152 // ---------------------------------------------------------------------------- |
163 // ---------------------------------------------------------------------------- |
153 // CalenDeleteUi::HandleCommandL |
164 // CalenDeleteUi::HandleCommandL |
409 mDatePicker = NULL; |
420 mDatePicker = NULL; |
410 } |
421 } |
411 mDatePicker = new HbDateTimePicker(popUp); |
422 mDatePicker = new HbDateTimePicker(popUp); |
412 mDatePicker->setMinimumDate(CalenDateUtils::minTime().date()); |
423 mDatePicker->setMinimumDate(CalenDateUtils::minTime().date()); |
413 mDatePicker->setMaximumDate(currentDate); |
424 mDatePicker->setMaximumDate(currentDate); |
|
425 mDatePicker->setDisplayFormat(CalenDateUtils::dateFormatString()); |
414 mDatePicker->setDate(currentDate); |
426 mDatePicker->setDate(currentDate); |
415 |
427 |
416 popUp->setContentWidget(mDatePicker); |
428 popUp->setContentWidget(mDatePicker); |
417 mDeleteAction = new HbAction( |
429 mDeleteAction = new HbAction( |
418 hbTrId("txt_common_button_delete"), popUp); |
430 hbTrId("txt_common_button_delete"), popUp); |