summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.h
Unidiff
Diffstat (limited to 'libkcal/calendar.h') (more/less context) (ignore 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 73f82bb..2243e28 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -219,155 +219,156 @@ public:
219 /** 219 /**
220 Searches todolist for an event with this unique string identifier, 220 Searches todolist for an event with this unique string identifier,
221 returns a pointer or null. 221 returns a pointer or null.
222 */ 222 */
223 virtual Todo *todo( const QString &uid ) = 0; 223 virtual Todo *todo( const QString &uid ) = 0;
224 virtual Todo *todo( QString, QString ) = 0; 224 virtual Todo *todo( QString, QString ) = 0;
225 /** 225 /**
226 Returns list of todos due on the specified date. 226 Returns list of todos due on the specified date.
227 */ 227 */
228 virtual QPtrList<Todo> todos( const QDate &date ) = 0; 228 virtual QPtrList<Todo> todos( const QDate &date ) = 0;
229 /** 229 /**
230 Return unfiltered list of todos. 230 Return unfiltered list of todos.
231 */ 231 */
232 virtual QPtrList<Todo> rawTodos() = 0; 232 virtual QPtrList<Todo> rawTodos() = 0;
233 233
234 /** 234 /**
235 Add a Journal entry to calendar. 235 Add a Journal entry to calendar.
236 236
237 @return true on success, false on error. 237 @return true on success, false on error.
238 */ 238 */
239 virtual bool addJournal( Journal * ) = 0; 239 virtual bool addJournal( Journal * ) = 0;
240 /** 240 /**
241 Return Journal for given date. 241 Return Journal for given date.
242 */ 242 */
243 virtual Journal *journal( const QDate & ) = 0; 243 virtual Journal *journal( const QDate & ) = 0;
244 /** 244 /**
245 Return Journal with given UID. 245 Return Journal with given UID.
246 */ 246 */
247 virtual Journal *journal( const QString &UID ) = 0; 247 virtual Journal *journal( const QString &UID ) = 0;
248 /** 248 /**
249 Return list of all Journal entries. 249 Return list of all Journal entries.
250 */ 250 */
251 virtual QPtrList<Journal> journals() = 0; 251 virtual QPtrList<Journal> journals() = 0;
252 252
253 /** 253 /**
254 Searches all incidence types for an incidence with this unique 254 Searches all incidence types for an incidence with this unique
255 string identifier, returns a pointer or null. 255 string identifier, returns a pointer or null.
256 */ 256 */
257 Incidence* incidence( const QString&UID ); 257 Incidence* incidence( const QString&UID );
258 258
259 /** 259 /**
260 Setup relations for an incidence. 260 Setup relations for an incidence.
261 */ 261 */
262 virtual void setupRelations( Incidence * ); 262 virtual void setupRelations( Incidence * );
263 /** 263 /**
264 Remove all relations to an incidence 264 Remove all relations to an incidence
265 */ 265 */
266 virtual void removeRelations( Incidence * ); 266 virtual void removeRelations( Incidence * );
267 267
268 /** 268 /**
269 Set calendar filter, which filters events for the events() functions. 269 Set calendar filter, which filters events for the events() functions.
270 The Filter object is owned by the caller. 270 The Filter object is owned by the caller.
271 */ 271 */
272 void setFilter( CalFilter * ); 272 void setFilter( CalFilter * );
273 /** 273 /**
274 Return calendar filter. 274 Return calendar filter.
275 */ 275 */
276 CalFilter *filter(); 276 CalFilter *filter();
277 virtual QDateTime nextAlarm( int daysTo ) = 0; 277 virtual QDateTime nextAlarm( int daysTo ) = 0;
278 virtual QString nextSummary( ) const = 0; 278 virtual QString nextSummary( ) const = 0;
279 virtual void reInitAlarmSettings() = 0; 279 virtual void reInitAlarmSettings() = 0;
280 virtual QDateTime nextAlarmEventDateTime() const = 0; 280 virtual QDateTime nextAlarmEventDateTime() const = 0;
281 virtual void checkAlarmForIncidence( Incidence *, bool ) = 0; 281 virtual void checkAlarmForIncidence( Incidence *, bool ) = 0;
282 /** 282 /**
283 Return all alarms, which ocur in the given time interval. 283 Return all alarms, which ocur in the given time interval.
284 */ 284 */
285 virtual Alarm::List alarms( const QDateTime &from, 285 virtual Alarm::List alarms( const QDateTime &from,
286 const QDateTime &to ) = 0; 286 const QDateTime &to ) = 0;
287 287
288 class Observer { 288 class Observer {
289 public: 289 public:
290 virtual void calendarModified( bool, Calendar * ) = 0; 290 virtual void calendarModified( bool, Calendar * ) = 0;
291 }; 291 };
292 292
293 void registerObserver( Observer * ); 293 void registerObserver( Observer * );
294 294
295 void setModified( bool ); 295 void setModified( bool );
296 296
297 /** 297 /**
298 Set product id returned by loadedProductId(). This function is only 298 Set product id returned by loadedProductId(). This function is only
299 useful for the calendar loading code. 299 useful for the calendar loading code.
300 */ 300 */
301 void setLoadedProductId( const QString & ); 301 void setLoadedProductId( const QString & );
302 /** 302 /**
303 Return product id taken from file that has been loaded. Returns 303 Return product id taken from file that has been loaded. Returns
304 QString::null, if no calendar has been loaded. 304 QString::null, if no calendar has been loaded.
305 */ 305 */
306 QString loadedProductId(); 306 QString loadedProductId();
307 int defaultCalendar(); 307 int defaultCalendar();
308 void setDontDeleteIncidencesOnClose (); 308 void setDontDeleteIncidencesOnClose ();
309 public slots: 309 public slots:
310 void setDefaultCalendar( int ); 310 void setDefaultCalendar( int );
311 virtual void setCalendarEnabled( int id, bool enable ) = 0; 311 virtual void setCalendarEnabled( int id, bool enable ) = 0;
312 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; 313 virtual void setReadOnly( int id, bool enable ) = 0;
314 virtual void setDefaultCalendarEnabledOnly() = 0; 314 virtual void setDefaultCalendarEnabledOnly() = 0;
315 virtual void setCalendarRemove( int id ) = 0;
315 signals: 316 signals:
316 void calendarChanged(); 317 void calendarChanged();
317 void calendarSaved(); 318 void calendarSaved();
318 void calendarLoaded(); 319 void calendarLoaded();
319 void addAlarm(const QDateTime &qdt, const QString &noti ); 320 void addAlarm(const QDateTime &qdt, const QString &noti );
320 void removeAlarm(const QDateTime &qdt, const QString &noti ); 321 void removeAlarm(const QDateTime &qdt, const QString &noti );
321 322
322 protected: 323 protected:
323 /** 324 /**
324 Get unfiltered events, which occur on the given date. 325 Get unfiltered events, which occur on the given date.
325 */ 326 */
326 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; 327 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0;
327 /** 328 /**
328 Get unfiltered events, which occur on the given date. 329 Get unfiltered events, which occur on the given date.
329 */ 330 */
330 virtual QPtrList<Event> rawEventsForDate( const QDate &date, 331 virtual QPtrList<Event> rawEventsForDate( const QDate &date,
331 bool sorted = false ) = 0; 332 bool sorted = false ) = 0;
332 /** 333 /**
333 Get events in a range of dates. If inclusive is set to true, only events 334 Get events in a range of dates. If inclusive is set to true, only events
334 are returned, which are completely included in the range. 335 are returned, which are completely included in the range.
335 */ 336 */
336 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 337 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
337 bool inclusive = false ) = 0; 338 bool inclusive = false ) = 0;
338 339
339 Incidence *mNextAlarmIncidence; 340 Incidence *mNextAlarmIncidence;
340 Incidence *mUndoIncidence; 341 Incidence *mUndoIncidence;
341 int mDefaultCalendar; 342 int mDefaultCalendar;
342 bool mDeleteIncidencesOnClose; 343 bool mDeleteIncidencesOnClose;
343 344
344private: 345private:
345 void init(); 346 void init();
346 347
347 QString mOwner; // who the calendar belongs to 348 QString mOwner; // who the calendar belongs to
348 QString mOwnerEmail; // email address of the owner 349 QString mOwnerEmail; // email address of the owner
349 int mTimeZone; // timezone OFFSET from GMT (MINUTES) 350 int mTimeZone; // timezone OFFSET from GMT (MINUTES)
350 bool mLocalTime; // use local time, not UTC or a time zone 351 bool mLocalTime; // use local time, not UTC or a time zone
351 352
352 353
353 CalFilter *mFilter; 354 CalFilter *mFilter;
354 CalFilter *mDefaultFilter; 355 CalFilter *mDefaultFilter;
355 356
356 357
357 QString mTimeZoneId; 358 QString mTimeZoneId;
358 359
359 Observer *mObserver; 360 Observer *mObserver;
360 bool mNewObserver; 361 bool mNewObserver;
361 362
362 bool mModified; 363 bool mModified;
363 364
364 QString mLoadedProductId; 365 QString mLoadedProductId;
365 366
366 // This list is used to put together related todos 367 // This list is used to put together related todos
367 QDict<Incidence> mOrphans; 368 QDict<Incidence> mOrphans;
368 QDict<Incidence> mOrphanUids; 369 QDict<Incidence> mOrphanUids;
369}; 370};
370 371
371} 372}
372 373
373#endif 374#endif