summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.h
Unidiff
Diffstat (limited to 'libkcal/calendar.h') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendar.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 4c6760f..73f82bb 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -65,24 +65,26 @@ public:
65 Calendar(); 65 Calendar();
66 Calendar(const QString &timeZoneId); 66 Calendar(const QString &timeZoneId);
67 virtual ~Calendar(); 67 virtual ~Calendar();
68 Incidence * undoIncidence() { return mUndoIncidence; }; 68 Incidence * undoIncidence() { return mUndoIncidence; };
69 bool undoDeleteIncidence(); 69 bool undoDeleteIncidence();
70 void deleteIncidence(Incidence *in); 70 void deleteIncidence(Incidence *in);
71 void resetTempSyncStat(); 71 void resetTempSyncStat();
72 void resetPilotStat(int id); 72 void resetPilotStat(int id);
73 /** 73 /**
74 Clears out the current calendar, freeing all used memory etc. 74 Clears out the current calendar, freeing all used memory etc.
75 */ 75 */
76 virtual void close() = 0; 76 virtual void close() = 0;
77 virtual void addCalendar( Calendar* ) = 0;
78 virtual bool addCalendarFile( QString name, int id ) = 0;
77 79
78 /** 80 /**
79 Sync changes in memory to persistant storage. 81 Sync changes in memory to persistant storage.
80 */ 82 */
81 virtual void save() = 0; 83 virtual void save() = 0;
82 virtual QPtrList<Event> getExternLastSyncEvents() = 0; 84 virtual QPtrList<Event> getExternLastSyncEvents() = 0;
83 virtual void removeSyncInfo( QString syncProfile) = 0; 85 virtual void removeSyncInfo( QString syncProfile) = 0;
84 virtual bool isSaving() { return false; } 86 virtual bool isSaving() { return false; }
85 87
86 /** 88 /**
87 Return the owner of the calendar's full name. 89 Return the owner of the calendar's full name.
88 */ 90 */
@@ -293,28 +295,31 @@ public:
293 void setModified( bool ); 295 void setModified( bool );
294 296
295 /** 297 /**
296 Set product id returned by loadedProductId(). This function is only 298 Set product id returned by loadedProductId(). This function is only
297 useful for the calendar loading code. 299 useful for the calendar loading code.
298 */ 300 */
299 void setLoadedProductId( const QString & ); 301 void setLoadedProductId( const QString & );
300 /** 302 /**
301 Return product id taken from file that has been loaded. Returns 303 Return product id taken from file that has been loaded. Returns
302 QString::null, if no calendar has been loaded. 304 QString::null, if no calendar has been loaded.
303 */ 305 */
304 QString loadedProductId(); 306 QString loadedProductId();
305 void setDefaultCalendar( int );
306 int defaultCalendar(); 307 int defaultCalendar();
308 void setDontDeleteIncidencesOnClose ();
309 public slots:
310 void setDefaultCalendar( int );
307 virtual void setCalendarEnabled( int id, bool enable ) = 0; 311 virtual void setCalendarEnabled( int id, bool enable ) = 0;
308 virtual void setAlarmEnabled( int id, bool enable ) = 0; 312 virtual void setAlarmEnabled( int id, bool enable ) = 0;
313 virtual void setReadOnly( int id, bool enable ) = 0;
309 virtual void setDefaultCalendarEnabledOnly() = 0; 314 virtual void setDefaultCalendarEnabledOnly() = 0;
310 signals: 315 signals:
311 void calendarChanged(); 316 void calendarChanged();
312 void calendarSaved(); 317 void calendarSaved();
313 void calendarLoaded(); 318 void calendarLoaded();
314 void addAlarm(const QDateTime &qdt, const QString &noti ); 319 void addAlarm(const QDateTime &qdt, const QString &noti );
315 void removeAlarm(const QDateTime &qdt, const QString &noti ); 320 void removeAlarm(const QDateTime &qdt, const QString &noti );
316 321
317 protected: 322 protected:
318 /** 323 /**
319 Get unfiltered events, which occur on the given date. 324 Get unfiltered events, which occur on the given date.
320 */ 325 */
@@ -325,33 +330,35 @@ public:
325 virtual QPtrList<Event> rawEventsForDate( const QDate &date, 330 virtual QPtrList<Event> rawEventsForDate( const QDate &date,
326 bool sorted = false ) = 0; 331 bool sorted = false ) = 0;
327 /** 332 /**
328 Get events in a range of dates. If inclusive is set to true, only events 333 Get events in a range of dates. If inclusive is set to true, only events
329 are returned, which are completely included in the range. 334 are returned, which are completely included in the range.
330 */ 335 */
331 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 336 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
332 bool inclusive = false ) = 0; 337 bool inclusive = false ) = 0;
333 338
334 Incidence *mNextAlarmIncidence; 339 Incidence *mNextAlarmIncidence;
335 Incidence *mUndoIncidence; 340 Incidence *mUndoIncidence;
336 int mDefaultCalendar; 341 int mDefaultCalendar;
342 bool mDeleteIncidencesOnClose;
337 343
338private: 344private:
339 void init(); 345 void init();
340 346
341 QString mOwner; // who the calendar belongs to 347 QString mOwner; // who the calendar belongs to
342 QString mOwnerEmail; // email address of the owner 348 QString mOwnerEmail; // email address of the owner
343 int mTimeZone; // timezone OFFSET from GMT (MINUTES) 349 int mTimeZone; // timezone OFFSET from GMT (MINUTES)
344 bool mLocalTime; // use local time, not UTC or a time zone 350 bool mLocalTime; // use local time, not UTC or a time zone
345 351
352
346 CalFilter *mFilter; 353 CalFilter *mFilter;
347 CalFilter *mDefaultFilter; 354 CalFilter *mDefaultFilter;
348 355
349 356
350 QString mTimeZoneId; 357 QString mTimeZoneId;
351 358
352 Observer *mObserver; 359 Observer *mObserver;
353 bool mNewObserver; 360 bool mNewObserver;
354 361
355 bool mModified; 362 bool mModified;
356 363
357 QString mLoadedProductId; 364 QString mLoadedProductId;