-rw-r--r-- | libkcal/calendar.cpp | 8 | ||||
-rw-r--r-- | libkcal/calendar.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index eeb5f48..52daaaa 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -228,62 +228,62 @@ void Calendar::setFilter(CalFilter *filter) | |||
228 | 228 | ||
229 | CalFilter *Calendar::filter() | 229 | CalFilter *Calendar::filter() |
230 | { | 230 | { |
231 | return mFilter; | 231 | return mFilter; |
232 | } | 232 | } |
233 | 233 | ||
234 | QPtrList<Incidence> Calendar::incidences() | 234 | QPtrList<Incidence> Calendar::incidences() |
235 | { | 235 | { |
236 | QPtrList<Incidence> incidences; | 236 | QPtrList<Incidence> incidences; |
237 | 237 | ||
238 | Incidence *i; | 238 | Incidence *i; |
239 | 239 | ||
240 | QPtrList<Event> e = events(); | 240 | QPtrList<Event> e = events(); |
241 | for( i = e.first(); i; i = e.next() ) incidences.append( i ); | 241 | for( i = e.first(); i; i = e.next() ) incidences.append( i ); |
242 | 242 | ||
243 | QPtrList<Todo> t = todos(); | 243 | QPtrList<Todo> t = todos(); |
244 | for( i = t.first(); i; i = t.next() ) incidences.append( i ); | 244 | for( i = t.first(); i; i = t.next() ) incidences.append( i ); |
245 | 245 | ||
246 | QPtrList<Journal> j = journals(); | 246 | QPtrList<Journal> j = journals(); |
247 | for( i = j.first(); i; i = j.next() ) incidences.append( i ); | 247 | for( i = j.first(); i; i = j.next() ) incidences.append( i ); |
248 | 248 | ||
249 | return incidences; | 249 | return incidences; |
250 | } | 250 | } |
251 | 251 | ||
252 | void Calendar::resetPilotStat() | 252 | void Calendar::resetPilotStat(int id ) |
253 | { | 253 | { |
254 | QPtrList<Incidence> incidences; | 254 | QPtrList<Incidence> incidences; |
255 | 255 | ||
256 | Incidence *i; | 256 | Incidence *i; |
257 | 257 | ||
258 | QPtrList<Event> e = rawEvents(); | 258 | QPtrList<Event> e = rawEvents(); |
259 | for( i = e.first(); i; i = e.next() ) i->setPilotId( 0 ); | 259 | for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); |
260 | 260 | ||
261 | QPtrList<Todo> t = rawTodos(); | 261 | QPtrList<Todo> t = rawTodos(); |
262 | for( i = t.first(); i; i = t.next() ) i->setPilotId( 0 ); | 262 | for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); |
263 | 263 | ||
264 | QPtrList<Journal> j = journals(); | 264 | QPtrList<Journal> j = journals(); |
265 | for( i = j.first(); i; i = j.next() ) i->setPilotId( 0 ); | 265 | for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); |
266 | } | 266 | } |
267 | void Calendar::resetTempSyncStat() | 267 | void Calendar::resetTempSyncStat() |
268 | { | 268 | { |
269 | QPtrList<Incidence> incidences; | 269 | QPtrList<Incidence> incidences; |
270 | 270 | ||
271 | Incidence *i; | 271 | Incidence *i; |
272 | 272 | ||
273 | QPtrList<Event> e = rawEvents(); | 273 | QPtrList<Event> e = rawEvents(); |
274 | for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 274 | for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
275 | 275 | ||
276 | QPtrList<Todo> t = rawTodos(); | 276 | QPtrList<Todo> t = rawTodos(); |
277 | for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 277 | for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
278 | 278 | ||
279 | QPtrList<Journal> j = journals(); | 279 | QPtrList<Journal> j = journals(); |
280 | for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 280 | for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
281 | } | 281 | } |
282 | QPtrList<Incidence> Calendar::rawIncidences() | 282 | QPtrList<Incidence> Calendar::rawIncidences() |
283 | { | 283 | { |
284 | QPtrList<Incidence> incidences; | 284 | QPtrList<Incidence> incidences; |
285 | 285 | ||
286 | Incidence *i; | 286 | Incidence *i; |
287 | 287 | ||
288 | QPtrList<Event> e = rawEvents(); | 288 | QPtrList<Event> e = rawEvents(); |
289 | for( i = e.first(); i; i = e.next() ) incidences.append( i ); | 289 | for( i = e.first(); i; i = e.next() ) incidences.append( i ); |
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index d5294eb..b801186 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -46,49 +46,49 @@ namespace KCal { | |||
46 | information like all appointments/events, user information, etc. etc. | 46 | information like all appointments/events, user information, etc. etc. |
47 | one calendar is associated with each CalendarView (@see calendarview.h). | 47 | one calendar is associated with each CalendarView (@see calendarview.h). |
48 | This is an abstract base class defining the interface to a calendar. It is | 48 | This is an abstract base class defining the interface to a calendar. It is |
49 | implemented by subclasses like @see CalendarLocal, which use different | 49 | implemented by subclasses like @see CalendarLocal, which use different |
50 | methods to store and access the data. | 50 | methods to store and access the data. |
51 | 51 | ||
52 | Ownership of events etc. is handled by the following policy: As soon as an | 52 | Ownership of events etc. is handled by the following policy: As soon as an |
53 | event (or any other subclass of IncidenceBase) object is added to the | 53 | event (or any other subclass of IncidenceBase) object is added to the |
54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes | 54 | Calendar by addEvent() it is owned by the Calendar object. The Calendar takes |
55 | care of deleting it. All Events returned by the query functions are returned | 55 | care of deleting it. All Events returned by the query functions are returned |
56 | as pointers, that means all changes to the returned events are immediately | 56 | as pointers, that means all changes to the returned events are immediately |
57 | visible in the Calendar. You shouldn't delete any Event object you get from | 57 | visible in the Calendar. You shouldn't delete any Event object you get from |
58 | Calendar. | 58 | Calendar. |
59 | */ | 59 | */ |
60 | class Calendar : public QObject, public CustomProperties, | 60 | class Calendar : public QObject, public CustomProperties, |
61 | public IncidenceBase::Observer | 61 | public IncidenceBase::Observer |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | Calendar(); | 65 | Calendar(); |
66 | Calendar(const QString &timeZoneId); | 66 | Calendar(const QString &timeZoneId); |
67 | virtual ~Calendar(); | 67 | virtual ~Calendar(); |
68 | void deleteIncidence(Incidence *in); | 68 | void deleteIncidence(Incidence *in); |
69 | void resetTempSyncStat(); | 69 | void resetTempSyncStat(); |
70 | void resetPilotStat(); | 70 | void resetPilotStat(int id); |
71 | /** | 71 | /** |
72 | Clears out the current calendar, freeing all used memory etc. | 72 | Clears out the current calendar, freeing all used memory etc. |
73 | */ | 73 | */ |
74 | virtual void close() = 0; | 74 | virtual void close() = 0; |
75 | 75 | ||
76 | /** | 76 | /** |
77 | Sync changes in memory to persistant storage. | 77 | Sync changes in memory to persistant storage. |
78 | */ | 78 | */ |
79 | virtual void save() = 0; | 79 | virtual void save() = 0; |
80 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; | 80 | virtual QPtrList<Event> getExternLastSyncEvents() = 0; |
81 | virtual bool isSaving() { return false; } | 81 | virtual bool isSaving() { return false; } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | Return the owner of the calendar's full name. | 84 | Return the owner of the calendar's full name. |
85 | */ | 85 | */ |
86 | const QString &getOwner() const; | 86 | const QString &getOwner() const; |
87 | /** | 87 | /** |
88 | Set the owner of the calendar. Should be owner's full name. | 88 | Set the owner of the calendar. Should be owner's full name. |
89 | */ | 89 | */ |
90 | void setOwner( const QString &os ); | 90 | void setOwner( const QString &os ); |
91 | /** | 91 | /** |
92 | Return the email address of the calendar owner. | 92 | Return the email address of the calendar owner. |
93 | */ | 93 | */ |
94 | const QString &getEmail(); | 94 | const QString &getEmail(); |