summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Unidiff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 3c572f0..09ce9f0 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -217,16 +217,29 @@ Todo *CalendarLocal::todo( int id )
217 Todo *todo; 217 Todo *todo;
218 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 218 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
219 if ( todo->zaurusId() == id ) return todo; 219 if ( todo->zaurusId() == id ) return todo;
220 } 220 }
221 221
222 return 0; 222 return 0;
223} 223}
224 224
225QPtrList<Event> CalendarLocal::getExternLastSyncEvents()
226{
227 QPtrList<Event> el;
228 Event *todo;
229 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
230 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") )
231 if ( todo->summary().left(3) == "E: " )
232 el.append( todo );
233 }
234
235 return el;
236
237}
225Event *CalendarLocal::event( int id ) 238Event *CalendarLocal::event( int id )
226{ 239{
227 Event *todo; 240 Event *todo;
228 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 241 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
229 if ( todo->zaurusId() == id ) return todo; 242 if ( todo->zaurusId() == id ) return todo;
230 } 243 }
231 244
232 return 0; 245 return 0;
@@ -315,17 +328,16 @@ QString CalendarLocal:: getAlarmNotification()
315 ret = "audio_alarm" +alarm->audioFile() +"+++"; 328 ret = "audio_alarm" +alarm->audioFile() +"+++";
316 } 329 }
317 ret += "cal_alarm"+ mNextSummary.left( 25 ); 330 ret += "cal_alarm"+ mNextSummary.left( 25 );
318 if ( mNextSummary.length() > 25 ) 331 if ( mNextSummary.length() > 25 )
319 ret += "\n" + mNextSummary.mid(25, 25 ); 332 ret += "\n" + mNextSummary.mid(25, 25 );
320 ret+= "\n"+mNextAlarmEventDateTimeString; 333 ret+= "\n"+mNextAlarmEventDateTimeString;
321 return ret; 334 return ret;
322} 335}
323
324void CalendarLocal::registerAlarm() 336void CalendarLocal::registerAlarm()
325{ 337{
326 mLastAlarmNotificationString = getAlarmNotification(); 338 mLastAlarmNotificationString = getAlarmNotification();
327 // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() ); 339 // qDebug("++ register Alarm %s %s",mNextAlarmDateTime.toString().latin1(), mLastAlarmNotificationString.latin1() );
328 emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString ); 340 emit addAlarm ( mNextAlarmDateTime, mLastAlarmNotificationString );
329// #ifndef DESKTOP_VERSION 341// #ifndef DESKTOP_VERSION
330// AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() ); 342// AlarmServer::addAlarm ( mNextAlarmDateTime,"koalarm", mLastAlarmNotificationString.latin1() );
331// #endif 343// #endif