Go to the documentation of this file.
31 #ifndef KCAL_CALENDAR_H
32 #define KCAL_CALENDAR_H
34 #include "exceptions.h"
35 #include "customproperties.h"
39 #include "kcalversion.h"
42 #include <tdepimmacros.h>
46 #include <tqdatetime.h>
47 #include <tqptrlist.h>
170 public IncidenceBase::Observer
191 Calendar( const TQString &timeZoneId );
203 void setProductId( const TQString &productId );
210 TQString productId();
215 void clearException();
228 void setOwner( const Person &owner );
235 const Person &getOwner() const;
251 void setTimeZoneId( const TQString &timeZoneId );
259 virtual void setTimeZoneIdViewOnly( const TQString &timeZoneId ) = 0;
266 TQString timeZoneId() const;
279 bool isLocalTime() const;
287 void setModified( bool modified );
299 virtual void close() = 0;
304 virtual void closeEvents() = 0;
309 virtual void closeTodos() = 0;
314 virtual void closeJournals() = 0;
319 virtual void save() = 0;
326 virtual bool reload( const TQString &tz ) = 0;
340 TQStringList categories();
351 virtual bool addIncidence( Incidence *incidence );
360 virtual bool deleteIncidence( Incidence *incidence );
393 Incidence *incidence( const TQString &uid );
403 Incidence *incidenceFromSchedulingID( const TQString &sid );
429 virtual bool beginChange( Incidence *incidence );
436 virtual bool endChange( Incidence *incidence );
455 bool single = true );
466 virtual bool addEvent( Event *event ) = 0;
475 virtual bool deleteEvent( Event *event ) = 0;
537 Event::List events( const TQDate &start, const TQDate &end,
538 bool inclusive = false);
577 virtual Event::List rawEventsForDate( const TQDateTime &qdt ) = 0;
590 virtual Event::List rawEvents( const TQDate &start, const TQDate &end,
591 bool inclusive = false ) = 0;
617 virtual Event *event( const TQString &uid ) = 0;
628 virtual bool addTodo( Todo *todo ) = 0;
637 virtual bool deleteTodo( Todo *todo ) = 0;
671 virtual Todo::List todos( const TQDate &date );
692 virtual Todo::List rawTodosForDate( const TQDate &date ) = 0;
702 virtual Todo *todo( const TQString &uid ) = 0;
713 virtual bool addJournal( Journal *journal ) = 0;
722 virtual bool deleteJournal( Journal *journal ) = 0;
776 virtual Journal::List rawJournalsForDate( const TQDate &date ) = 0;
786 virtual Journal *journal( const TQString &uid ) = 0;
800 void beginBatchAdding();
810 void endBatchAdding();
820 virtual void setupRelations( Incidence *incidence );
828 virtual void removeRelations( Incidence *incidence );
858 virtual Alarm::List alarms( const TQDateTime &from,
859 const TQDateTime &to ) = 0;
879 virtual void calendarModified( bool ,
910 void registerObserver( Observer *observer );
918 void unregisterObserver( Observer *observer );
924 void calendarChanged();
929 void calendarSaved();
934 void calendarLoaded();
940 void batchAddingBegins();
946 void batchAddingEnds();
981 void notifyIncidenceAdded( Incidence *incidence );
988 void notifyIncidenceChanged( Incidence *incidence );
995 void notifyIncidenceDeleted( Incidence *incidence );
1001 virtual void customPropertyUpdated();
1009 void setObserversEnabled( bool enabled );
1022 TQString mProductId;
1024 TQString mTimeZoneId;
1032 TQPtrList<Observer> mObservers;
1034 bool mObserversEnabled;
1037 TQDict<Incidence> mOrphans;
1038 TQDict<Incidence> mOrphanUids;
|