KCal Library
calendar.cpp
Go to the documentation of this file.
This file is part of the API for handling calendar data and defines the Calendar class.
This file is part of the API for handling calendar data and defines the CalFilter class.
bool hasStartOffset() const
Returns whether the alarm is defined in terms of an offset relative to the start of the parent Incide...
Definition: alarm.cpp:606
Duration endOffset() const
Returns offset of alarm in time relative to the end of the event.
Definition: alarm.cpp:626
bool hasEndOffset() const
Returns whether the alarm is defined in terms of an offset relative to the end of the event.
Definition: alarm.cpp:611
Duration startOffset() const
Returns offset of alarm in time relative to the start of the parent Incidence.
Definition: alarm.cpp:601
Duration duration() const
Returns the interval between the alarm's initial occurrence and its final repetition.
Definition: alarm.cpp:493
bool enabled() const
Returns the alarm enabled status: true (enabled) or false (disabled).
Definition: alarm.cpp:586
KDateTime nextRepetition(const KDateTime &preTime) const
Returns the date/time of the alarm's initial occurrence or its next repetition after a given time.
Definition: alarm.cpp:499
int repeatCount() const
Returns how many times an alarm may repeats after its initial occurrence.
Definition: alarm.cpp:488
virtual void calendarModified(bool modified, Calendar *calendar)
Notify the Observer that a Calendar has been modified.
Definition: calendar.cpp:1086
virtual void calendarIncidenceAdded(Incidence *incidence)
Notify the Observer that an Incidence has been inserted.
Definition: calendar.cpp:1092
virtual void calendarIncidenceDeleted(Incidence *incidence)
Notify the Observer that an Incidence has been removed.
Definition: calendar.cpp:1102
virtual void calendarIncidenceChanged(Incidence *incidence)
Notify the Observer that an Incidence has been modified.
Definition: calendar.cpp:1097
void setTimeZoneId(const QString &timeZoneId)
Sets the time zone ID used for creating or modifying incidences in the Calendar.
Definition: calendar.cpp:150
void setViewTimeZoneId(const QString &timeZoneId) const
Notes the time zone Id which the client application intends to use for viewing the incidences in this...
Definition: calendar.cpp:201
static Todo::List sortTodos(Todo::List *todoList, TodoSortField sortField, SortDirection sortDirection)
Sort a list of Todos.
Definition: calendar.cpp:712
virtual Todo::List rawTodosForDate(const QDate &date)=0
Returns an unfiltered list of all Todos which due on the specified date.
void appendRecurringAlarms(Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to)
Appends alarms of recurring events in interval to list of alarms.
Definition: calendar.cpp:1263
virtual Journal::List rawJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Returns a sorted, unfiltered list of all Journals for this Calendar.
virtual bool isSaving()
Determine if the calendar is currently being saved.
Definition: calendar.cpp:1120
void setTimeSpec(const KDateTime::Spec &timeSpec)
Sets the default time specification (time zone, etc.) used for creating or modifying incidences in th...
Definition: calendar.cpp:136
void appendAlarms(Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to)
Appends alarms of incidence in interval to list of alarms.
Definition: calendar.cpp:1246
virtual bool addIncidence(Incidence *incidence)
Inserts an Incidence into the calendar.
Definition: calendar.cpp:573
virtual Event * event(const QString &uid)=0
Returns the Event associated with the given unique identifier.
virtual bool beginChange(Incidence *incidence)
Flag that a change to a Calendar Incidence is starting.
Definition: calendar.cpp:1229
virtual Incidence::List rawIncidences()
Returns an unfiltered list of all Incidences for this Calendar.
Definition: calendar.cpp:287
void incidenceUpdated(IncidenceBase *incidenceBase)
The Observer interface.
Definition: calendar.cpp:1141
QString viewTimeZoneId() const
Returns the time zone Id used for viewing the incidences in this calendar.
Definition: calendar.cpp:211
ICalTimeZones * timeZones() const
Returns the time zone collection used by the calendar.
Definition: calendar.cpp:217
virtual Incidence::List incidences()
Returns a filtered list of all Incidences for this Calendar.
Definition: calendar.cpp:282
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:1207
virtual void setupRelations(Incidence *incidence)
Setup Relations for an Incidence.
Definition: calendar.cpp:951
Incidence * dissociateOccurrence(Incidence *incidence, const QDate &date, const KDateTime::Spec &spec, bool single=true)
Dissociate an Incidence from a recurring Incidence.
Definition: calendar.cpp:595
void notifyIncidenceDeleted(Incidence *incidence)
Let Calendar subclasses notify that they removed an Incidence.
Definition: calendar.cpp:1181
virtual bool deleteIncidence(Incidence *incidence)
Removes an Incidence from the calendar.
Definition: calendar.cpp:580
static Event::List sortEvents(Event::List *eventList, EventSortField sortField, SortDirection sortDirection)
Sort a list of Events.
Definition: calendar.cpp:292
virtual Event::List rawEventsForDate(const KDateTime &dt)=0
Returns an unfiltered list of all Events which occur on the given timestamp.
QStringList categories()
Returns a list of all categories used by Incidences in this Calendar.
Definition: calendar.cpp:258
Calendar(const KDateTime::Spec &timeSpec)
Constructs a calendar with a specified time zone timeZoneid.
Definition: calendar.cpp:106
void notifyIncidenceChanged(Incidence *incidence)
Let Calendar subclasses notify that they modified an Incidence.
Definition: calendar.cpp:1170
virtual void doSetTimeSpec(const KDateTime::Spec &timeSpec)
Let Calendar subclasses set the time specification.
Definition: calendar.cpp:1154
virtual void customPropertyUpdated()
Definition: calendar.cpp:1192
KDateTime::Spec viewTimeSpec() const
Returns the time specification used for viewing the incidences in this calendar.
Definition: calendar.cpp:206
virtual void removeRelations(Incidence *incidence)
Removes all Relations from an Incidence.
Definition: calendar.cpp:997
void setProductId(const QString &id)
Sets the calendar Product ID to id.
Definition: calendar.cpp:1197
virtual Todo * todo(const QString &uid)=0
Returns the Todo associated with the given unique identifier.
QString timeZoneId() const
Returns the time zone ID used for creating or modifying incidences in the calendar.
Definition: calendar.cpp:189
virtual bool endChange(Incidence *incidence)
Flag that a change to a Calendar Incidence has completed.
Definition: calendar.cpp:1235
void shiftTimes(const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
Shifts the times of all incidences so that they appear at the same clock time as before but in a new ...
Definition: calendar.cpp:222
static Event::List sortEventsForDate(Event::List *eventList, const QDate &date, const KDateTime::Spec &timeSpec, EventSortField sortField, SortDirection sortDirection)
Sort a list of Events that occur on a specified date.
Definition: calendar.cpp:395
void setOwner(const Person &owner)
Sets the owner of the calendar to owner.
Definition: calendar.cpp:129
void setObserversEnabled(bool enabled)
Let Calendar subclasses notify that they enabled an Observer.
Definition: calendar.cpp:1241
virtual Event::List rawEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Returns a sorted, unfiltered list of all Events for this Calendar.
virtual Journal * journal(const QString &uid)=0
Returns the Journal associated with the given unique identifier.
virtual Event::List events(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Returns a sorted, filtered list of all Events for this Calendar.
Definition: calendar.cpp:565
Incidence::List incidencesFromSchedulingID(const QString &sid)
Searches all events and todos for an incidence with this scheduling identifiere.
Definition: calendar.cpp:685
void notifyIncidenceAdded(Incidence *incidence)
Let Calendar subclasses notify that they inserted an Incidence.
Definition: calendar.cpp:1159
void setViewTimeSpec(const KDateTime::Spec &timeSpec) const
Notes the time specification which the client application intends to use for viewing the incidences i...
Definition: calendar.cpp:195
virtual Journal::List journals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Returns a sorted, filtered list of all Journals for this Calendar.
Definition: calendar.cpp:924
virtual Todo::List rawTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)=0
Returns a sorted, unfiltered list of all Todos for this Calendar.
void batchAddingEnds()
Incidence * incidenceFromSchedulingID(const QString &sid)
Returns the Incidence associated with the given scheduling identifier.
Definition: calendar.cpp:698
void registerObserver(CalendarObserver *observer)
Registers an Observer for this Calendar.
Definition: calendar.cpp:1107
Incidence * incidence(const QString &uid)
Returns the Incidence associated with the given unique identifier.
Definition: calendar.cpp:669
void batchAddingBegins()
virtual Journal::List rawJournalsForDate(const QDate &date)=0
Returns an unfiltered list of all Journals for on the specified date.
void unregisterObserver(CalendarObserver *observer)
Unregisters an Observer for this Calendar.
Definition: calendar.cpp:1115
bool isAncestorOf(Incidence *ancestor, Incidence *incidence)
Checks if ancestor is an ancestor of incidence.
Definition: calendar.cpp:1075
KDateTime::Spec timeSpec() const
Get the time specification (time zone etc.) used for creating or modifying incidences in the Calendar...
Definition: calendar.cpp:145
virtual Alarm::List alarms(const KDateTime &from, const KDateTime &to)=0
Returns a list of Alarms within a time range for this Calendar.
virtual Todo::List todos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Returns a sorted, filtered list of all Todos for this Calendar.
Definition: calendar.cpp:856
static Journal::List sortJournals(Journal::List *journalList, JournalSortField sortField, SortDirection sortDirection)
Sort a list of Journals.
Definition: calendar.cpp:871
bool isDaily() const
Returns whether the duration is specified in terms of days rather than seconds.
Definition: duration.cpp:194
KDateTime end(const KDateTime &start) const
Computes a duration end time by adding the number of seconds or days in the duration to the specified...
Definition: duration.cpp:183
A class which reads and parses iCalendar VTIMEZONE components, and accesses libical time zone data.
Definition: icaltimezones.h:329
ICalTimeZone parse(icalcomponent *vtimezone)
Creates an ICalTimeZone instance containing the detailed information parsed from a VTIMEZONE componen...
Definition: icaltimezones.cpp:753
The ICalTimeZone class represents an iCalendar VTIMEZONE component.
Definition: icaltimezones.h:144
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition: icaltimezones.h:65
An abstract class that provides a common base for all calendar incidence classes.
Definition: incidencebase.h:103
void setLastModified(const KDateTime &lm)
Sets the time the incidence was last modified to lm.
Definition: incidencebase.cpp:189
virtual QByteArray type() const =0
Prints the type of Incidence as a string.
virtual KDateTime dtStart() const
Returns an incidence's starting date/time as a KDateTime.
Definition: incidencebase.cpp:248
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:70
QString relatedToUid() const
Returns a UID string for the incidence that is related to this one.
Definition: incidence.cpp:492
const Alarm::List & alarms() const
Returns a list of all incidence alarms.
Definition: incidence.cpp:906
void addRelation(Incidence *incidence)
Adds an incidence that is related to this one.
Definition: incidence.cpp:526
Incidence * relatedTo() const
Returns a pointer for the incidence that is related to this one.
Definition: incidence.cpp:516
void setRelatedTo(Incidence *incidence)
Relates another incidence to this one.
Definition: incidence.cpp:497
Incidence::List relations() const
Returns a list of all incidences related to this one.
Definition: incidence.cpp:521
void removeRelation(Incidence *incidence)
Removes an incidence that is related to this one.
Definition: incidence.cpp:533
Recurrence * recurrence() const
Returns the recurrence rule associated with this incidence.
Definition: incidence.cpp:545
void setRelatedToUid(const QString &uid)
Relates another incidence to this one, by UID.
Definition: incidence.cpp:483
virtual void setDtStart(const KDateTime &dt)
Sets the incidence starting date/time.
Definition: incidence.cpp:349
This class represents a recurrence rule for a calendar incidence.
Definition: recurrence.h:92
KDateTime getPreviousDateTime(const KDateTime &afterDateTime) const
Returns the date and time of the last previous recurrence, before the specified date/time.
Definition: recurrence.cpp:1087
void setEndDate(const QDate &endDate)
Sets the date of the last recurrence.
Definition: recurrence.cpp:463
int durationTo(const KDateTime &dt) const
Returns the number of recurrences up to and including the date/time specified.
Definition: recurrence.cpp:491
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:485
KDateTime getNextDateTime(const KDateTime &preDateTime) const
Returns the date and time of the next recurrence, after the specified date/time.
Definition: recurrence.cpp:1012
void setDuration(int duration)
Sets the total number of times the event is to occur, including both the first and last.
Definition: recurrence.cpp:503
bool hasDueDate() const
Returns true if the todo has a due date, otherwise return false.
Definition: todo.cpp:252
bool hasStartDate() const
Returns true if the todo has a start date, otherwise return false.
Definition: todo.cpp:266
This file is part of the API for handling calendar data and defines the Exception and ErrorFormat cla...
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.