summaryrefslogtreecommitdiffabout
path: root/libkcal
Unidiff
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.h2
-rw-r--r--libkcal/calendarlocal.cpp14
-rw-r--r--libkcal/calendarlocal.h2
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
@@ -72,13 +72,13 @@ public:
72 virtual void close() = 0; 72 virtual void close() = 0;
73 73
74 /** 74 /**
75 Sync changes in memory to persistant storage. 75 Sync changes in memory to persistant storage.
76 */ 76 */
77 virtual void save() = 0; 77 virtual void save() = 0;
78 78 virtual QPtrList<Event> getExternLastSyncEvents() = 0;
79 virtual bool isSaving() { return false; } 79 virtual bool isSaving() { return false; }
80 80
81 /** 81 /**
82 Return the owner of the calendar's full name. 82 Return the owner of the calendar's full name.
83 */ 83 */
84 const QString &getOwner() const; 84 const QString &getOwner() const;
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 3c572f0..09ce9f0 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -219,12 +219,25 @@ Todo *CalendarLocal::todo( int id )
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 }
@@ -317,13 +330,12 @@ QString CalendarLocal:: getAlarmNotification()
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
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index a2e50e3..3257198 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -82,13 +82,13 @@ class CalendarLocal : public Calendar
82 */ 82 */
83 Event *event( const QString &uid ); 83 Event *event( const QString &uid );
84 /** 84 /**
85 Return unfiltered list of all events in calendar. 85 Return unfiltered list of all events in calendar.
86 */ 86 */
87 QPtrList<Event> rawEvents(); 87 QPtrList<Event> rawEvents();
88 88 QPtrList<Event> getExternLastSyncEvents();
89 /** 89 /**
90 Add a todo to the todolist. 90 Add a todo to the todolist.
91 */ 91 */
92 bool addTodo( Todo *todo ); 92 bool addTodo( Todo *todo );
93 bool addTodoNoDup( Todo *todo ); 93 bool addTodoNoDup( Todo *todo );
94 /** 94 /**