calendar.cpp
Go to the documentation of this file.
843 // kdDebug(5850) << "Calendar::setupRelations for incidence " << forincidence << " with UID " << forincidence->uid() << ", summary: " << forincidence->summary() << endl;
881 // kdDebug(5850) << "Calendar::removeRelations for incidence " << forincidence << " with UID " << forincidence->uid() << ", summary: " << forincidence->summary() << endl;
Provides the main "calendar" object class.
void apply(Event::List *eventlist) const
Apply filter to eventlist, all events not matching filter criterias are removed from the list.
Definition: calfilter.cpp:49
virtual void calendarIncidenceAdded(Incidence *)
Notify the Observer that an Incidence has been inserted.
Definition: calendar.h:887
virtual void calendarIncidenceDeleted(Incidence *)
Notify the Observer that an Incidence has been removed.
Definition: calendar.h:901
virtual void calendarModified(bool, Calendar *)
Notify the Observer that a Calendar has been modified.
Definition: calendar.h:879
virtual void calendarIncidenceChanged(Incidence *)
Notify the Observer that an Incidence has been modified.
Definition: calendar.h:894
static Todo::List sortTodos(Todo::List *todoList, TodoSortField sortField, SortDirection sortDirection)
Sort a list of Todos.
Definition: calendar.cpp:611
Calendar(const TQString &timeZoneId)
Construct Calendar object using a Time Zone.
Definition: calendar.cpp:43
void setLocalTime()
Set to store calendar Incidences without a time zone.
Definition: calendar.cpp:117
Incidence * dissociateOccurrence(Incidence *incidence, TQDate date, bool single=true)
Dissociate an Incidence from a recurring Incidence.
Definition: calendar.cpp:508
void setTimeZoneId(const TQString &timeZoneId)
Set the Time Zone Id for the Calendar.
Definition: calendar.cpp:103
virtual void doSetTimeZoneId(const TQString &)
Let Calendar subclasses set the Time Zone ID.
Definition: calendar.h:974
virtual Journal::List rawJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Return a sorted, unfiltered list of all Journals for this Calendar.
virtual Journal::List rawJournalsForDate(const TQDate &date)=0
Return an unfiltered list of all Journals for on the specifed date.
TQStringList categories()
Return a list of all categories used by Incidences in this Calendar.
Definition: calendar.cpp:154
virtual bool addIncidence(Incidence *incidence)
Insert an Incidence into the Calendar.
Definition: calendar.cpp:466
virtual bool beginChange(Incidence *incidence)
Flag that a change to a Calendar Incidence is starting.
Definition: calendar.cpp:1049
bool isLocalTime() const
Determine if Calendar Incidences are to be written without a time zone.
Definition: calendar.cpp:125
virtual Event::List rawEventsForDate(const TQDateTime &qdt)=0
Return an unfiltered list of all Events which occur on the given timestamp.
virtual Incidence::List rawIncidences()
Return an unfiltered list of all Incidences for this Calendar.
Definition: calendar.cpp:183
void incidenceUpdated(IncidenceBase *incidenceBase)
The Observer interface.
Definition: calendar.cpp:963
virtual Incidence::List incidences()
Return a filtered list of all Incidences for this Calendar.
Definition: calendar.cpp:178
static Incidence::List mergeIncidenceList(const Event::List &events, const Todo::List &todos, const Journal::List &journals)
Create a merged list of Events, Todos, and Journals.
Definition: calendar.cpp:1028
Incidence * incidenceFromSchedulingID(const TQString &sid)
Returns the Incidence associated with the given scheduling identifier.
Definition: calendar.cpp:599
virtual void setupRelations(Incidence *incidence)
Setup Relations for an Incidence.
Definition: calendar.cpp:840
virtual Todo * todo(const TQString &uid)=0
Returns the Todo associated with the given unique identifier.
void notifyIncidenceDeleted(Incidence *incidence)
Let Calendar subclasses notify that they removed an Incidence.
Definition: calendar.cpp:1001
void registerObserver(Observer *observer)
Register an Observer for this Calendar.
Definition: calendar.cpp:938
virtual Event * event(const TQString &uid)=0
Returns the Event associated with the given unique identifier.
virtual bool deleteIncidence(Incidence *incidence)
Remove an Incidence from the Calendar.
Definition: calendar.cpp:473
static Event::List sortEvents(Event::List *eventList, EventSortField sortField, SortDirection sortDirection)
Sort a list of Events.
Definition: calendar.cpp:188
void notifyIncidenceChanged(Incidence *incidence)
Let Calendar subclasses notify that they modified an Incidence.
Definition: calendar.cpp:989
ErrorFormat * exception() const
Returns an exception, if there is any, containing information about the last error that occurred.
Definition: calendar.cpp:80
virtual Journal * journal(const TQString &uid)=0
Returns the Journal associated with the given unique identifier.
virtual void customPropertyUpdated()
Definition: calendar.cpp:1013
void unregisterObserver(Observer *observer)
Unregister an Observer for this Calendar.
Definition: calendar.cpp:945
virtual void removeRelations(Incidence *incidence)
Remove all Relations from an Incidence.
Definition: calendar.cpp:874
static Event::List sortEventsForDate(Event::List *eventList, const TQDate &date, EventSortField sortField, SortDirection sortDirection)
Sort a list of Events that occur on a specified date.
Definition: calendar.cpp:291
virtual bool endChange(Incidence *incidence)
Flag that a change to a Calendar Incidence has completed.
Definition: calendar.cpp:1054
void setProductId(const TQString &productId)
Set the Calendar Product ID.
Definition: calendar.cpp:1018
void setObserversEnabled(bool enabled)
Let Calendar subclasses notify that they enabled an Observer.
Definition: calendar.cpp:1059
virtual Event::List rawEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Return a sorted, unfiltered list of all Events for this Calendar.
virtual Event::List events(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Return a sorted, filtered list of all Events for this Calendar.
Definition: calendar.cpp:458
Incidence::List incidencesFromSchedulingID(const TQString &UID)
Searches all events and todos for (an incidence with this scheduling ID.
Definition: calendar.cpp:588
void setException(ErrorFormat *e)
Sets information about the last error occurred.
Definition: calendar.cpp:85
void notifyIncidenceAdded(Incidence *incidence)
Let Calendar subclasses notify that they inserted an Incidence.
Definition: calendar.cpp:977
virtual Journal::List journals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Return a sorted, filtered list of all Journals for this Calendar.
Definition: calendar.cpp:823
virtual Todo::List rawTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Return a sorted, unfiltered list of all Todos for this Calendar.
void batchAddingEnds()
virtual Todo::List rawTodosForDate(const TQDate &date)=0
Return an unfiltered list of all Todos which due on the specified date.
void batchAddingBegins()
Incidence * incidence(const TQString &uid)
Returns the Incidence associated with the given unique identifier.
Definition: calendar.cpp:576
virtual Todo::List todos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Return a sorted, filtered list of all Todos for this Calendar.
Definition: calendar.cpp:755
static Journal::List sortJournals(Journal::List *journalList, JournalSortField sortField, SortDirection sortDirection)
Sort a list of Journals.
Definition: calendar.cpp:770
This class provides the base class common to all calendar components.
Definition: incidencebase.h:46
virtual TQDateTime dtStart() const
returns an event's starting date/time as a TQDateTime.
Definition: incidencebase.cpp:201
void setLastModified(const TQDateTime &lm)
Sets the time the incidence was last modified.
Definition: incidencebase.cpp:145
This class implements a visitor for adding an Incidence to a resource supporting addEvent(),...
Definition: incidence.h:56
This class implements a visitor for deleting an Incidence from a resource supporting deleteEvent(),...
Definition: incidence.h:104
This class provides the base class common to all calendar components.
Definition: incidence.h:48
TQString relatedToUid() const
What event does this one relate to? This function should only be used when constructing a calendar be...
Definition: incidence.cpp:340
void setRelatedTo(Incidence *relatedTo)
Point at some other event to which the event relates.
Definition: incidence.cpp:345
IncidenceList childIncidences() const
Returns an EventList of all child incidences.
Definition: incidence.cpp:934
void removeRelation(Incidence *)
Remove event that is related to this event.
Definition: incidence.cpp:377
void setRelatedToUid(const TQString &)
Point at some other event to which the event relates.
Definition: incidence.cpp:333
virtual void setDtStart(const TQDateTime &dtStart)
Set starting date/time.
Definition: incidence.cpp:264
bool hasRecurrenceID() const
Returns true if the incidence has recurrenceID, otherwise return false.
Definition: incidence.cpp:893
Incidence::List relations() const
All events that are related to this event.
Definition: incidence.cpp:365
Recurrence * recurrence() const
Return the recurrence rule associated with this incidence.
Definition: incidence.cpp:390
void deleteChildIncidence(TQString childIncidence)
Detach a child incidence from its parent incidence.
Definition: incidence.cpp:929
void addRelation(Incidence *)
Add an event which is related to this event.
Definition: incidence.cpp:370
void setHasRecurrenceID(bool hasRecurrenceID)
Sets if the incidence has recurrenceID.
Definition: incidence.cpp:898
This class represents a recurrence rule for a calendar incidence.
Definition: recurrence.h:90
int durationTo(const TQDateTime &) const
Returns the number of recurrences up to and including the date/time specified.
Definition: recurrence.cpp:407
int duration() const
Returns -1 if the event recurs infinitely, 0 if the end date is set, otherwise the total number of re...
Definition: recurrence.cpp:395
void setEndDate(const TQDate &endDate)
Sets the date of the last recurrence.
Definition: recurrence.cpp:378
void setDuration(int duration)
Sets the total number of times the event is to occur, including both the first and last.
Definition: recurrence.cpp:415
bool hasDueDate() const
Returns true if the todo has a due date, otherwise return false.
Definition: todo.cpp:144
bool hasStartDate() const
Returns true if the todo has a start date, otherwise return false.
Definition: todo.cpp:157
void setDtDue(const TQDateTime &dtDue, bool first=false)
Sets due date and time.
Definition: todo.cpp:85
TQDateTime dtStart(bool first=false) const
Returns the startdate of the todo.
Definition: todo.cpp:177
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38