equal
deleted
inserted
replaced
57 :QObject(parent), |
57 :QObject(parent), |
58 mCalenEditor(calenEditor), |
58 mCalenEditor(calenEditor), |
59 mEditorForm(form), |
59 mEditorForm(form), |
60 mCalenEditorModel(model), |
60 mCalenEditorModel(model), |
61 mCustomReminderTimeItem(0), |
61 mCustomReminderTimeItem(0), |
|
62 mTimePicker(0), |
62 mReminderTimeAdded(false) |
63 mReminderTimeAdded(false) |
63 { |
64 { |
64 OstTraceFunctionEntry0( CALENEDITORREMINDERFIELD_CALENEDITORREMINDERFIELD_ENTRY ); |
65 OstTraceFunctionEntry0( CALENEDITORREMINDERFIELD_CALENEDITORREMINDERFIELD_ENTRY ); |
65 mReminderItem = new HbDataFormModelItem(); |
66 mReminderItem = new HbDataFormModelItem(); |
66 mReminderItem->setType(HbDataFormModelItem::ComboBoxItem); |
67 mReminderItem->setType(HbDataFormModelItem::ComboBoxItem); |
243 |
244 |
244 //TODO: Still need confirmation for proper behaviour when entry is edited after alarm has expired. |
245 //TODO: Still need confirmation for proper behaviour when entry is edited after alarm has expired. |
245 if (!repeatingEntry && sameDay && (currentTime.addSecs(offsetInMins * 60) >= mCalenEditor->editedEntry()->startTime().time())) { |
246 if (!repeatingEntry && sameDay && (currentTime.addSecs(offsetInMins * 60) >= mCalenEditor->editedEntry()->startTime().time())) { |
246 setCurrentIndex(ReminderOff); //Alarm has expired already, so making it off. |
247 setCurrentIndex(ReminderOff); //Alarm has expired already, so making it off. |
247 //The slot for index 0 is not called, since after UpdateReminderChoicesForSameDay() |
248 //The slot for index 0 is not called, since after UpdateReminderChoicesForSameDay() |
248 //index is 0 itself and there is no change. So explicitly calling it here. |
249 //index is 0 itself and there is no change. So explicitly setting the reminder here. |
249 handleReminderIndexChanged(0); |
250 reminder.setTimeOffset(mReminderHash.value(ReminderOff)); |
|
251 reminder.setAlarmSoundName(QString(" ")); |
|
252 mCalenEditor->editedEntry()->setAlarm(reminder); |
250 } |
253 } |
251 else { |
254 else { |
252 setSavedMeetingReminderIndex(); |
255 setSavedMeetingReminderIndex(); |
253 } |
256 } |
254 } else { |
257 } else { |
708 HbExtendedLocale locale = HbExtendedLocale::system(); |
711 HbExtendedLocale locale = HbExtendedLocale::system(); |
709 QString timeString = locale.format( |
712 QString timeString = locale.format( |
710 mReminderTimeForAllDay, |
713 mReminderTimeForAllDay, |
711 r_qtn_time_usual_with_zero); |
714 r_qtn_time_usual_with_zero); |
712 mCustomReminderTimeItem->setContentWidgetData("text", timeString); |
715 mCustomReminderTimeItem->setContentWidgetData("text", timeString); |
|
716 |
|
717 // If the reminder time picker is open and locale changes happen, |
|
718 // we need to refresh them dynamically with proper time formats |
|
719 if(!(mTimePicker.isNull())) { |
|
720 if(locale.timeStyle() == HbExtendedLocale::Time12) { |
|
721 mTimePicker->setDisplayFormat("hh:mm ap"); |
|
722 }else { |
|
723 mTimePicker->setDisplayFormat("hh:mm"); |
|
724 } |
|
725 mTimePicker->setTime(mReminderTimeForAllDay); |
|
726 } |
713 OstTraceFunctionExit0( CALENEDITORREMINDERFIELD_SETDISPLAYTIME_EXIT ); |
727 OstTraceFunctionExit0( CALENEDITORREMINDERFIELD_SETDISPLAYTIME_EXIT ); |
714 } |
728 } |
715 |
729 |
716 /*! |
730 /*! |
717 Remove the reminder time field if its not an all day event. |
731 Remove the reminder time field if its not an all day event. |