-rw-r--r-- | libkcal/calendar.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 3f6895d..4b8b3ff 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -274,96 +274,98 @@ public: | |||
274 | /** | 274 | /** |
275 | Set calendar filter, which filters events for the events() functions. | 275 | Set calendar filter, which filters events for the events() functions. |
276 | The Filter object is owned by the caller. | 276 | The Filter object is owned by the caller. |
277 | */ | 277 | */ |
278 | void setFilter( CalFilter * ); | 278 | void setFilter( CalFilter * ); |
279 | /** | 279 | /** |
280 | Return calendar filter. | 280 | Return calendar filter. |
281 | */ | 281 | */ |
282 | CalFilter *filter(); | 282 | CalFilter *filter(); |
283 | virtual QDateTime nextAlarm( int daysTo ) = 0; | 283 | virtual QDateTime nextAlarm( int daysTo ) = 0; |
284 | virtual QString nextSummary( ) const = 0; | 284 | virtual QString nextSummary( ) const = 0; |
285 | virtual void reInitAlarmSettings() = 0; | 285 | virtual void reInitAlarmSettings() = 0; |
286 | virtual QDateTime nextAlarmEventDateTime() const = 0; | 286 | virtual QDateTime nextAlarmEventDateTime() const = 0; |
287 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; | 287 | virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; |
288 | /** | 288 | /** |
289 | Return all alarms, which ocur in the given time interval. | 289 | Return all alarms, which ocur in the given time interval. |
290 | */ | 290 | */ |
291 | virtual Alarm::List alarms( const QDateTime &from, | 291 | virtual Alarm::List alarms( const QDateTime &from, |
292 | const QDateTime &to ) = 0; | 292 | const QDateTime &to ) = 0; |
293 | 293 | ||
294 | class Observer { | 294 | class Observer { |
295 | public: | 295 | public: |
296 | virtual void calendarModified( bool, Calendar * ) = 0; | 296 | virtual void calendarModified( bool, Calendar * ) = 0; |
297 | }; | 297 | }; |
298 | 298 | ||
299 | void registerObserver( Observer * ); | 299 | void registerObserver( Observer * ); |
300 | 300 | ||
301 | void setModified( bool ); | 301 | void setModified( bool ); |
302 | 302 | ||
303 | /** | 303 | /** |
304 | Set product id returned by loadedProductId(). This function is only | 304 | Set product id returned by loadedProductId(). This function is only |
305 | useful for the calendar loading code. | 305 | useful for the calendar loading code. |
306 | */ | 306 | */ |
307 | void setLoadedProductId( const QString & ); | 307 | void setLoadedProductId( const QString & ); |
308 | /** | 308 | /** |
309 | Return product id taken from file that has been loaded. Returns | 309 | Return product id taken from file that has been loaded. Returns |
310 | QString::null, if no calendar has been loaded. | 310 | QString::null, if no calendar has been loaded. |
311 | */ | 311 | */ |
312 | QString loadedProductId(); | 312 | QString loadedProductId(); |
313 | int defaultCalendar(); | 313 | int defaultCalendar(); |
314 | void setDontDeleteIncidencesOnClose (); | 314 | void setDontDeleteIncidencesOnClose (); |
315 | public slots: | 315 | public slots: |
316 | void setDefaultCalendar( int ); | 316 | void setDefaultCalendar( int ); |
317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; | 317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; |
318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; | 318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; |
319 | virtual void setReadOnly( int id, bool enable ) = 0; | 319 | virtual void setReadOnly( int id, bool enable ) = 0; |
320 | virtual void setDefaultCalendarEnabledOnly() = 0; | 320 | virtual void setDefaultCalendarEnabledOnly() = 0; |
321 | virtual void setCalendarRemove( int id ) = 0; | 321 | virtual void setCalendarRemove( int id ) = 0; |
322 | virtual void getIncidenceCount( int calId, int& events, int & todos, int & journals) = 0; | ||
323 | |||
322 | signals: | 324 | signals: |
323 | void calendarChanged(); | 325 | void calendarChanged(); |
324 | void calendarSaved(); | 326 | void calendarSaved(); |
325 | void calendarLoaded(); | 327 | void calendarLoaded(); |
326 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 328 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
327 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 329 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
328 | 330 | ||
329 | protected: | 331 | protected: |
330 | /** | 332 | /** |
331 | Get unfiltered events, which occur on the given date. | 333 | Get unfiltered events, which occur on the given date. |
332 | */ | 334 | */ |
333 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; | 335 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; |
334 | /** | 336 | /** |
335 | Get unfiltered events, which occur on the given date. | 337 | Get unfiltered events, which occur on the given date. |
336 | */ | 338 | */ |
337 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, | 339 | virtual QPtrList<Event> rawEventsForDate( const QDate &date, |
338 | bool sorted = false ) = 0; | 340 | bool sorted = false ) = 0; |
339 | /** | 341 | /** |
340 | Get events in a range of dates. If inclusive is set to true, only events | 342 | Get events in a range of dates. If inclusive is set to true, only events |
341 | are returned, which are completely included in the range. | 343 | are returned, which are completely included in the range. |
342 | */ | 344 | */ |
343 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 345 | virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
344 | bool inclusive = false ) = 0; | 346 | bool inclusive = false ) = 0; |
345 | 347 | ||
346 | Incidence *mNextAlarmIncidence; | 348 | Incidence *mNextAlarmIncidence; |
347 | Incidence *mUndoIncidence; | 349 | Incidence *mUndoIncidence; |
348 | int mDefaultCalendar; | 350 | int mDefaultCalendar; |
349 | bool mDeleteIncidencesOnClose; | 351 | bool mDeleteIncidencesOnClose; |
350 | 352 | ||
351 | private: | 353 | private: |
352 | void init(); | 354 | void init(); |
353 | 355 | ||
354 | QString mOwner; // who the calendar belongs to | 356 | QString mOwner; // who the calendar belongs to |
355 | QString mOwnerEmail; // email address of the owner | 357 | QString mOwnerEmail; // email address of the owner |
356 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) | 358 | int mTimeZone; // timezone OFFSET from GMT (MINUTES) |
357 | bool mLocalTime; // use local time, not UTC or a time zone | 359 | bool mLocalTime; // use local time, not UTC or a time zone |
358 | 360 | ||
359 | 361 | ||
360 | CalFilter *mFilter; | 362 | CalFilter *mFilter; |
361 | CalFilter *mDefaultFilter; | 363 | CalFilter *mDefaultFilter; |
362 | 364 | ||
363 | 365 | ||
364 | QString mTimeZoneId; | 366 | QString mTimeZoneId; |
365 | 367 | ||
366 | Observer *mObserver; | 368 | Observer *mObserver; |
367 | bool mNewObserver; | 369 | bool mNewObserver; |
368 | 370 | ||
369 | bool mModified; | 371 | bool mModified; |