-rw-r--r-- | libkcal/calendar.h | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 14 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 7d23619..df5bbcf 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -76,5 +76,5 @@ public: */ virtual void save() = 0; - + virtual QPtrList<Event> getExternLastSyncEvents() = 0; virtual bool isSaving() { return false; } diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 3c572f0..09ce9f0 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -223,4 +223,17 @@ Todo *CalendarLocal::todo( int id ) } +QPtrList<Event> CalendarLocal::getExternLastSyncEvents() +{ + QPtrList<Event> el; + Event *todo; + for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { + if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) + if ( todo->summary().left(3) == "E: " ) + el.append( todo ); + } + + return el; + +} Event *CalendarLocal::event( int id ) { @@ -321,5 +334,4 @@ QString CalendarLocal:: getAlarmNotification() return ret; } - void CalendarLocal::registerAlarm() { diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index a2e50e3..3257198 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -86,5 +86,5 @@ class CalendarLocal : public Calendar */ QPtrList<Event> rawEvents(); - + QPtrList<Event> getExternLastSyncEvents(); /** Add a todo to the todolist. |