author | zautrix <zautrix> | 2004-08-10 19:41:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-10 19:41:31 (UTC) |
commit | 2f1b58e344b882578977dd3786f7a94495096d22 (patch) (unidiff) | |
tree | 6658bef546b6feac1688aa465ca94344e15704d7 /libkcal/calendar.cpp | |
parent | 467e50111dfd6d66aca205501b6bf369b7f0a166 (diff) | |
download | kdepimpi-2f1b58e344b882578977dd3786f7a94495096d22.zip kdepimpi-2f1b58e344b882578977dd3786f7a94495096d22.tar.gz kdepimpi-2f1b58e344b882578977dd3786f7a94495096d22.tar.bz2 |
More syncing stuff
-rw-r--r-- | libkcal/calendar.cpp | 15 |
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 | ||
34 | using namespace KCal; | 35 | using namespace KCal; |
35 | 36 | ||
36 | Calendar::Calendar() | 37 | Calendar::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 | ||
43 | Calendar::Calendar( const QString &timeZoneId ) | 44 | Calendar::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 | } |
251 | void 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 ); | ||
250 | 259 | ||
260 | QPtrList<Todo> t = rawTodos(); | ||
261 | for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | ||
262 | |||
263 | QPtrList<Journal> j = journals(); | ||
264 | for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | ||
265 | } | ||
251 | QPtrList<Incidence> Calendar::rawIncidences() | 266 | QPtrList<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 | ||