31 #ifndef KCAL_CALENDAR_H
32 #define KCAL_CALENDAR_H
34 #include "exceptions.h"
35 #include "customproperties.h"
39 #include "kcalversion.h"
42 #include <kdemacros.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;
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;
JournalSortField
How Journals are to be sorted.
Journals are to be unsorted.
Sort Journals alphabetically, by summary.
This class represents custom calendar properties.
Sort Todos by percentage completed.
This class provides a Todo in the sense of RFC2445.
This is the main "calendar" object class.
This class provides the base class common to all calendar components.
Filter for calendar objects.
This class provides an Event in the sense of RFC2445.
virtual void calendarIncidenceChanged(Incidence *)
Notify the Observer that an Incidence has been modified.
Sort Todos alphabetically, by summary.
Sort Journals chronologically by date.
Sort Events chronologically, by end date.
This class represents a person.
virtual bool isSaving()
Determine if the Calendar is currently being saved.
bool isModified() const
Determine the Calendar's modification status.
Sort in ascending order (first to last)
This class provides the base class common to all calendar components.
This class provides a Journal in the sense of RFC2445.
virtual void calendarIncidenceDeleted(Incidence *)
Notify the Observer that an Incidence has been removed.
Todos are to be unsorted.
Sort Events alphabetically, by summary.
Sort Todos chronologically, by start date.
Events are to be unsorted.
Namespace KCal is for global classes, objects and/or functions in libkcal.
virtual void calendarModified(bool, Calendar *)
Notify the Observer that a Calendar has been modified.
Sort Events chronologically, by start date.
SortDirection
Sort direction.
virtual void doSetTimeZoneId(const TQString &)
Let Calendar subclasses set the Time Zone ID.
Sort Todos chronologically, by due date.
Sort in descending order (last to first)
TodoSortField
How Todos are to be sorted.
EventSortField
How Events are to be sorted.
virtual void calendarIncidenceAdded(Incidence *)
Notify the Observer that an Incidence has been inserted.