summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.cpp
Unidiff
Diffstat (limited to 'libkcal/calendar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendar.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 32aac7a..a3977d7 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -21,24 +21,25 @@
21 21
22#include <stdlib.h> 22#include <stdlib.h>
23#include <time.h> 23#include <time.h>
24 24
25#include <kdebug.h> 25#include <kdebug.h>
26#include <kglobal.h> 26#include <kglobal.h>
27#include <klocale.h> 27#include <klocale.h>
28 28
29#include "exceptions.h" 29#include "exceptions.h"
30#include "calfilter.h" 30#include "calfilter.h"
31 31
32#include "calendar.h" 32#include "calendar.h"
33#include "syncdefines.h"
33 34
34using namespace KCal; 35using namespace KCal;
35 36
36Calendar::Calendar() 37Calendar::Calendar()
37{ 38{
38 39
39 init(); 40 init();
40 setTimeZoneId( i18n (" 00:00 Europe/London(UTC)") ); 41 setTimeZoneId( i18n (" 00:00 Europe/London(UTC)") );
41} 42}
42 43
43Calendar::Calendar( const QString &timeZoneId ) 44Calendar::Calendar( const QString &timeZoneId )
44{ 45{
@@ -238,25 +239,39 @@ QPtrList<Incidence> Calendar::incidences()
238 239
239 QPtrList<Event> e = events(); 240 QPtrList<Event> e = events();
240 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 241 for( i = e.first(); i; i = e.next() ) incidences.append( i );
241 242
242 QPtrList<Todo> t = todos(); 243 QPtrList<Todo> t = todos();
243 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 244 for( i = t.first(); i; i = t.next() ) incidences.append( i );
244 245
245 QPtrList<Journal> j = journals(); 246 QPtrList<Journal> j = journals();
246 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 247 for( i = j.first(); i; i = j.next() ) incidences.append( i );
247 248
248 return incidences; 249 return incidences;
249} 250}
251void Calendar::resetTempSyncStat()
252{
253 QPtrList<Incidence> incidences;
254
255 Incidence *i;
256
257 QPtrList<Event> e = rawEvents();
258 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
259
260 QPtrList<Todo> t = rawTodos();
261 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
250 262
263 QPtrList<Journal> j = journals();
264 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
265}
251QPtrList<Incidence> Calendar::rawIncidences() 266QPtrList<Incidence> Calendar::rawIncidences()
252{ 267{
253 QPtrList<Incidence> incidences; 268 QPtrList<Incidence> incidences;
254 269
255 Incidence *i; 270 Incidence *i;
256 271
257 QPtrList<Event> e = rawEvents(); 272 QPtrList<Event> e = rawEvents();
258 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 273 for( i = e.first(); i; i = e.next() ) incidences.append( i );
259 274
260 QPtrList<Todo> t = rawTodos(); 275 QPtrList<Todo> t = rawTodos();
261 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 276 for( i = t.first(); i; i = t.next() ) incidences.append( i );
262 277