equal
deleted
inserted
replaced
222 alarmDayIndex += mStartOfWeek; |
222 alarmDayIndex += mStartOfWeek; |
223 if(alarmDayIndex >= KDaysInWeek){ |
223 if(alarmDayIndex >= KDaysInWeek){ |
224 alarmDayIndex -= KDaysInWeek; |
224 alarmDayIndex -= KDaysInWeek; |
225 } |
225 } |
226 } |
226 } |
|
227 |
|
228 if(mAlarmId) { |
|
229 mAlarmClient.deleteAlarm(mAlarmId); |
|
230 } |
227 |
231 |
228 setAlarm( |
232 setAlarm( |
229 mAlarmTimeItem->contentWidgetData("text").toString(), |
233 mAlarmTimeItem->contentWidgetData("text").toString(), |
230 mAlarmDescription->contentWidgetData("text").toString(), |
234 mAlarmDescription->contentWidgetData("text").toString(), |
231 mAlarmOccurenceItem->contentWidgetData("currentIndex").toInt(), |
235 mAlarmOccurenceItem->contentWidgetData("currentIndex").toInt(), |
243 Handles delete action on the editor. Deletes the alarm. |
247 Handles delete action on the editor. Deletes the alarm. |
244 */ |
248 */ |
245 void ClockAlarmEditor::handleDeleteAction() |
249 void ClockAlarmEditor::handleDeleteAction() |
246 { |
250 { |
247 OstTraceFunctionEntry0( CLOCKALARMEDITOR_HANDLEDELETEACTION_ENTRY ); |
251 OstTraceFunctionEntry0( CLOCKALARMEDITOR_HANDLEDELETEACTION_ENTRY ); |
|
252 if(mAlarmId) { |
|
253 mAlarmClient.deleteAlarm(mAlarmId); |
|
254 } |
248 closeAlarmEditor(); |
255 closeAlarmEditor(); |
249 OstTraceFunctionExit0( CLOCKALARMEDITOR_HANDLEDELETEACTION_EXIT ); |
256 OstTraceFunctionExit0( CLOCKALARMEDITOR_HANDLEDELETEACTION_EXIT ); |
250 } |
257 } |
251 |
258 |
252 /*! |
259 /*! |
694 |
701 |
695 // If editor state is a reset alarm, then its an already existing alarm |
702 // If editor state is a reset alarm, then its an already existing alarm |
696 // get the alarm details and fill it in mAlarmInfo. |
703 // get the alarm details and fill it in mAlarmInfo. |
697 if (mAlarmId) { |
704 if (mAlarmId) { |
698 mAlarmClient.getAlarmInfo(mAlarmId, mAlarmInfo); |
705 mAlarmClient.getAlarmInfo(mAlarmId, mAlarmInfo); |
699 mAlarmClient.deleteAlarm(mAlarmId); |
|
700 } |
706 } |
701 |
707 |
702 // Set the value for previous alarm time. |
708 // Set the value for previous alarm time. |
703 mOldAlarmTime = mAlarmInfo.nextDueTime; |
709 mOldAlarmTime = mAlarmInfo.nextDueTime; |
704 |
710 |