equal
deleted
inserted
replaced
63 CleanupClosePushL(notificationArray); |
63 CleanupClosePushL(notificationArray); |
64 |
64 |
65 notificationArray.Append(ECalenNotifySystemTimeChanged); |
65 notificationArray.Append(ECalenNotifySystemTimeChanged); |
66 notificationArray.Append(ECalenNotifySystemLocaleChanged); |
66 notificationArray.Append(ECalenNotifySystemLocaleChanged); |
67 notificationArray.Append(ECalenNotifyContextChanged); |
67 notificationArray.Append(ECalenNotifyContextChanged); |
|
68 notificationArray.Append(ECalenNotifyCloseDialogs); |
68 |
69 |
69 mServices.RegisterForNotificationsL(this, notificationArray); |
70 mServices.RegisterForNotificationsL(this, notificationArray); |
70 |
71 |
71 CleanupStack::PopAndDestroy(¬ificationArray); |
72 CleanupStack::PopAndDestroy(¬ificationArray); |
72 |
73 |
128 { |
129 { |
129 OstTraceFunctionEntry0( CALENNATIVEVIEW_GOTODATE_ENTRY ); |
130 OstTraceFunctionEntry0( CALENNATIVEVIEW_GOTODATE_ENTRY ); |
130 |
131 |
131 // Create a popup with datepicker for the user to select date. |
132 // Create a popup with datepicker for the user to select date. |
132 HbDialog *popUp = new HbDialog(); |
133 HbDialog *popUp = new HbDialog(); |
|
134 popUp->setParent(this); |
133 popUp->setDismissPolicy(HbDialog::NoDismiss); |
135 popUp->setDismissPolicy(HbDialog::NoDismiss); |
134 popUp->setTimeout(HbDialog::NoTimeout); |
136 popUp->setTimeout(HbDialog::NoTimeout); |
135 popUp->setAttribute( Qt::WA_DeleteOnClose, true ); |
137 popUp->setAttribute( Qt::WA_DeleteOnClose, true ); |
136 popUp->setHeadingWidget(new HbLabel(hbTrId("txt_calendar_opt_go_to_date"))); |
138 popUp->setHeadingWidget(new HbLabel(hbTrId("txt_calendar_opt_go_to_date"))); |
137 |
139 |
147 popUp->setContentWidget(mDatePicker); |
149 popUp->setContentWidget(mDatePicker); |
148 HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok")); |
150 HbAction *okAction = new HbAction(hbTrId("txt_common_button_ok")); |
149 popUp->addAction(okAction); |
151 popUp->addAction(okAction); |
150 connect(okAction, SIGNAL(triggered()), this, SLOT(goToSelectedDate())); |
152 connect(okAction, SIGNAL(triggered()), this, SLOT(goToSelectedDate())); |
151 popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popUp)); |
153 popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popUp)); |
|
154 |
|
155 // Close the popup once closeDialogs() is received |
|
156 connect(this, SIGNAL(closeDialogs()), popUp, SLOT(close())); |
|
157 |
152 popUp->open(); |
158 popUp->open(); |
153 |
159 |
154 OstTraceFunctionExit0( CALENNATIVEVIEW_GOTODATE_EXIT ); |
160 OstTraceFunctionExit0( CALENNATIVEVIEW_GOTODATE_EXIT ); |
155 } |
161 } |
156 |
162 |
232 onLocaleChanged(EChangesSystemTime); |
238 onLocaleChanged(EChangesSystemTime); |
233 } |
239 } |
234 break; |
240 break; |
235 case ECalenNotifyContextChanged: { |
241 case ECalenNotifyContextChanged: { |
236 onContextChanged(); |
242 onContextChanged(); |
|
243 } |
|
244 break; |
|
245 case ECalenNotifyCloseDialogs: { |
|
246 // Emit the signal to close the dialogs which are already opened |
|
247 emit closeDialogs(); |
237 } |
248 } |
238 break; |
249 break; |
239 default: |
250 default: |
240 break; |
251 break; |
241 } |
252 } |