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