KCalendarCore::Calendar

Search for usage in LXR

#include <calendar.h>

Inheritance diagram for KCalendarCore::Calendar:

Classes

class  CalendarObserver
 

Public Types

typedef QSharedPointer< CalendarPtr
 

Properties

KCalendarCore::AccessMode accessMode
 
QIcon icon
 
QString id
 
bool isLoading
 
QString name
 
KCalendarCore::Person owner
 
QString productId
 
- Properties inherited from QObject
 objectName
 

Signals

void accessModeChanged ()
 
void filterChanged ()
 
void iconChanged ()
 
void idChanged ()
 
void isLoadingChanged ()
 
void nameChanged ()
 
void ownerChanged ()
 

Public Member Functions

 Calendar (const QByteArray &timeZoneId)
 
 Calendar (const QTimeZone &timeZone)
 
 ~Calendar () override
 
AccessMode accessMode () const
 
virtual bool addEvent (const Event::Ptr &event)=0
 
virtual bool addIncidence (const Incidence::Ptr &incidence)
 
virtual bool addJournal (const Journal::Ptr &journal)=0
 
virtual bool addTodo (const Todo::Ptr &todo)=0
 
virtual Alarm::List alarms (const QDateTime &from, const QDateTime &to, bool excludeBlockedAlarms=false) const =0
 
Alarm::List alarmsTo (const QDateTime &to) const
 
bool batchAdding () const
 
virtual bool beginChange (const Incidence::Ptr &incidence)
 
QStringList categories () const
 
virtual bool deleteEvent (const Event::Ptr &event)=0
 
virtual bool deleteEventInstances (const Event::Ptr &event)=0
 
virtual bool deleteIncidence (const Incidence::Ptr &incidence)
 
virtual bool deleteIncidenceInstances (const Incidence::Ptr &incidence)=0
 
virtual bool deleteJournal (const Journal::Ptr &journal)=0
 
virtual bool deleteJournalInstances (const Journal::Ptr &journal)=0
 
virtual bool deleteTodo (const Todo::Ptr &todo)=0
 
virtual bool deleteTodoInstances (const Todo::Ptr &todo)=0
 
virtual void endBatchAdding ()
 
virtual bool endChange (const Incidence::Ptr &incidence)
 
virtual Event::Ptr event (const QString &uid, const QDateTime &recurrenceId={}) const =0
 
virtual bool event (QEvent *e)
 
virtual Event::List eventInstances (const Incidence::Ptr &event, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
Event::List events (const QDate &date, const QTimeZone &timeZone={}, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Event::List events (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const
 
Event::List events (const QDateTime &dt) const
 
virtual Event::List events (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
CalFilterfilter () const
 
QIcon icon () const
 
QString id () const
 
Incidence::Ptr incidence (const QString &uid, const QDateTime &recurrenceId={}) const
 
virtual Incidence::Ptr incidenceFromSchedulingID (const QString &sid) const
 
virtual Incidence::List incidences () const
 
virtual Incidence::List incidences (const QDate &date) const
 
virtual Incidence::List incidencesFromSchedulingID (const QString &sid) const
 
virtual Incidence::List instances (const Incidence::Ptr &incidence) const
 
bool isLoading () const
 
bool isModified () const
 
virtual Journal::Ptr journal (const QString &uid, const QDateTime &recurrenceId={}) const =0
 
virtual Journal::List journalInstances (const Incidence::Ptr &journal, JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Journal::List journals (const QDate &date) const
 
virtual Journal::List journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
QString name () const
 
Person owner () const
 
QString productId () const
 
virtual Event::List rawEvents (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const =0
 
virtual Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Event::List rawEventsForDate (const QDate &date, const QTimeZone &timeZone={}, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Incidence::List rawIncidences () const
 
virtual Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Journal::List rawJournalsForDate (const QDate &date) const =0
 
virtual Todo::List rawTodos (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const =0
 
virtual Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Todo::List rawTodosForDate (const QDate &date) const =0
 
void registerObserver (CalendarObserver *observer)
 
void setAccessMode (const AccessMode mode)
 
void setFilter (CalFilter *filter)
 
void setIcon (const QIcon &icon)
 
void setId (const QString &id)
 
void setModified (bool modified)
 
void setName (const QString &name)
 
void setOwner (const Person &owner)
 
void setProductId (const QString &id)
 
void setTimeZone (const QTimeZone &timeZone)
 
void setTimeZoneId (const QByteArray &timeZoneId)
 
void shiftTimes (const QTimeZone &oldZone, const QTimeZone &newZone)
 
virtual void startBatchAdding ()
 
QTimeZone timeZone () const
 
QByteArray timeZoneId () const
 
virtual Todo::Ptr todo (const QString &uid, const QDateTime &recurrenceId={}) const =0
 
virtual Todo::List todoInstances (const Incidence::Ptr &todo, TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
 
virtual Todo::List todos (const QDate &date) const
 
virtual Todo::List todos (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const
 
virtual Todo::List todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
void unregisterObserver (CalendarObserver *observer)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from KCalendarCore::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QStringcustomProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
QString nonKDECustomPropertyParameters (const QByteArray &name) const
 
CustomPropertiesoperator= (const CustomProperties &other)
 
bool operator== (const CustomProperties &properties) const
 
void removeCustomProperty (const QByteArray &app, const QByteArray &key)
 
void removeNonKDECustomProperty (const QByteArray &name)
 
void setCustomProperties (const QMap< QByteArray, QString > &properties)
 
void setCustomProperty (const QByteArray &app, const QByteArray &key, const QString &value)
 
void setNonKDECustomProperty (const QByteArray &name, const QString &value, const QString &parameters=QString())
 
- Public Member Functions inherited from KCalendarCore::IncidenceBase::IncidenceObserver
virtual ~IncidenceObserver ()
 
virtual void incidenceUpdate (const QString &uid, const QDateTime &recurrenceId)=0
 

Static Public Member Functions

static Incidence::Ptr createException (const Incidence::Ptr &incidence, const QDateTime &recurrenceId, bool thisAndFuture=false)
 
static Incidence::List mergeIncidenceList (const Event::List &events, const Todo::List &todos, const Journal::List &journals)
 
static Event::List sortEvents (Event::List &&eventList, EventSortField sortField, SortDirection sortDirection)
 
static Journal::List sortJournals (Journal::List &&journalList, JournalSortField sortField, SortDirection sortDirection)
 
static Todo::List sortTodos (Todo::List &&todoList, TodoSortField sortField, SortDirection sortDirection)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Static Public Member Functions inherited from KCalendarCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Protected Member Functions

void appendAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const
 
void appendRecurringAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const
 
void customPropertyUpdated () override
 
virtual void doSetTimeZone (const QTimeZone &timeZone)
 
void incidenceUpdated (const QString &uid, const QDateTime &recurrenceId) override
 
void notifyIncidenceAboutToBeDeleted (const Incidence::Ptr &incidence)
 
void notifyIncidenceAdded (const Incidence::Ptr &incidence)
 
void notifyIncidenceAdditionCanceled (const Incidence::Ptr &incidence)
 
void notifyIncidenceChanged (const Incidence::Ptr &incidence)
 
void notifyIncidenceDeleted (const Incidence::Ptr &incidence)
 
void setIsLoading (bool isLoading)
 
void setObserversEnabled (bool enabled)
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Protected Member Functions inherited from KCalendarCore::CustomProperties
virtual void customPropertyUpdate ()
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

Represents the main calendar class.

A calendar contains information like incidences (events, to-dos, journals), alarms, time zones, and other useful information.

This is an abstract base class defining the interface to a calendar. It is implemented by subclasses like MemoryCalendar, which use different methods to store and access the data.

Ownership of Incidences:

Incidence ownership is handled by the following policy: as soon as an incidence (or any other subclass of IncidenceBase) is added to the Calendar by an add...() method it is owned by the Calendar object. The Calendar takes care of deleting the incidence using the delete...() methods. All Incidences returned by the query functions are returned as pointers so that changes to the returned Incidences are immediately visible in the Calendar. Do Not attempt to 'delete' any Incidence object you get from Calendar – use the delete...() methods.

Definition at line 132 of file calendar.h.

Member Typedef Documentation

◆ Ptr

A shared pointer to a Calendar.

Definition at line 147 of file calendar.h.

Property Documentation

◆ accessMode

KCalendarCore::AccessMode KCalendarCore::Calendar::accessMode
readwrite

Definition at line 140 of file calendar.h.

◆ icon

QIcon KCalendarCore::Calendar::icon
readwrite

Definition at line 139 of file calendar.h.

◆ id

QString KCalendarCore::Calendar::id
readwrite

Definition at line 137 of file calendar.h.

◆ isLoading

bool KCalendarCore::Calendar::isLoading
read

Definition at line 141 of file calendar.h.

◆ name

QString KCalendarCore::Calendar::name
readwrite

Definition at line 138 of file calendar.h.

◆ owner

KCalendarCore::Person KCalendarCore::Calendar::owner
readwrite

Definition at line 136 of file calendar.h.

◆ productId

QString KCalendarCore::Calendar::productId
readwrite

Definition at line 135 of file calendar.h.

Constructor & Destructor Documentation

◆ Calendar() [1/2]

Calendar::Calendar ( const QTimeZone & timeZone)
explicit

Constructs a calendar with a specified time zone timeZone.

The time zone is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.

Parameters
timeZonetime specification

Definition at line 117 of file calendar.cpp.

◆ Calendar() [2/2]

Calendar::Calendar ( const QByteArray & timeZoneId)
explicit

Construct Calendar object using a time zone ID.

The time zone ID is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.

Parameters
timeZoneIdis a string containing a time zone ID, which is assumed to be valid. If no time zone is found, the viewing time specification is set to local time zone. Example: "Europe/Berlin"

Definition at line 127 of file calendar.cpp.

◆ ~Calendar()

Calendar::~Calendar ( )
override

Destroys the calendar.

Definition at line 133 of file calendar.cpp.

Member Function Documentation

◆ accessMode()

AccessMode Calendar::accessMode ( ) const

This calendar's AccessMode, i.e.

whether it is writable or read-only. Defaults to ReadWrite.

Since
5.85
See also
setAccessMode()

Definition at line 987 of file calendar.cpp.

◆ accessModeChanged

void KCalendarCore::Calendar::accessModeChanged ( )
signal

Emitted when the AccessMode changes.

Since
5.85
See also
accessMode()

◆ addEvent()

virtual bool KCalendarCore::Calendar::addEvent ( const Event::Ptr & event)
pure virtual

Inserts an Event into the calendar.

Parameters
eventis a pointer to the Event to insert.
Returns
true if the Event was successfully inserted; false otherwise.
See also
deleteEvent()

Implemented in KCalendarCore::MemoryCalendar, Akonadi::CalendarBase, and Akonadi::CollectionCalendar.

◆ addIncidence()

bool Calendar::addIncidence ( const Incidence::Ptr & incidence)
virtual

Inserts an Incidence into the calendar.

Parameters
incidenceis a pointer to the Incidence to insert.
Returns
true if the Incidence was successfully inserted; false otherwise.
See also
deleteIncidence()

Reimplemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.

Definition at line 346 of file calendar.cpp.

◆ addJournal()

virtual bool KCalendarCore::Calendar::addJournal ( const Journal::Ptr & journal)
pure virtual

Inserts a Journal into the calendar.

Parameters
journalis a pointer to the Journal to insert.
Returns
true if the Journal was successfully inserted; false otherwise.
See also
deleteJournal()

Implemented in KCalendarCore::MemoryCalendar, Akonadi::CalendarBase, and Akonadi::CollectionCalendar.

◆ addTodo()

virtual bool KCalendarCore::Calendar::addTodo ( const Todo::Ptr & todo)
pure virtual

Inserts a Todo into the calendar.

Parameters
todois a pointer to the Todo to insert.
Returns
true if the Todo was successfully inserted; false otherwise.
See also
deleteTodo()

Implemented in Akonadi::CalendarBase, Akonadi::CollectionCalendar, and KCalendarCore::MemoryCalendar.

◆ alarms()

virtual Alarm::List KCalendarCore::Calendar::alarms ( const QDateTime & from,
const QDateTime & to,
bool excludeBlockedAlarms = false ) const
pure virtual

Returns a list of Alarms within a time range for this Calendar.

Parameters
fromis the starting timestamp.
tois the ending timestamp.
excludeBlockedAlarmsif true, alarms belonging to blocked collections aren't returned.
Returns
the list of Alarms for the for the specified time range.

Implemented in Akonadi::ETMCalendar, and KCalendarCore::MemoryCalendar.

◆ alarmsTo()

Alarm::List Calendar::alarmsTo ( const QDateTime & to) const

Return a list of Alarms that occur before the specified timestamp.

Parameters
tois the ending timestamp.
Returns
the list of Alarms occurring before the specified QDateTime.
Since
5.77

Definition at line 938 of file calendar.cpp.

◆ appendAlarms()

void Calendar::appendAlarms ( Alarm::List & alarms,
const Incidence::Ptr & incidence,
const QDateTime & from,
const QDateTime & to ) const
protected

Appends alarms of incidence in interval to list of alarms.

Parameters
alarmsis a List of Alarms to be appended onto.
incidenceis a pointer to an Incidence containing the Alarm to be appended.
fromis the lower range of the next Alarm repetition.
tois the upper range of the next Alarm repetition.

Definition at line 808 of file calendar.cpp.

◆ appendRecurringAlarms()

void Calendar::appendRecurringAlarms ( Alarm::List & alarms,
const Incidence::Ptr & incidence,
const QDateTime & from,
const QDateTime & to ) const
protected

Appends alarms of recurring events in interval to list of alarms.

Parameters
alarmsis a List of Alarms to be appended onto.
incidenceis a pointer to an Incidence containing the Alarm to be appended.
fromis the lower range of the next Alarm repetition.
tois the upper range of the next Alarm repetition.

Definition at line 824 of file calendar.cpp.

◆ batchAdding()

bool Calendar::batchAdding ( ) const
Returns
true if batch adding is in progress

Definition at line 933 of file calendar.cpp.

◆ beginChange()

bool Calendar::beginChange ( const Incidence::Ptr & incidence)
virtual

Flag that a change to a Calendar Incidence is starting.

Parameters
incidenceis a pointer to the Incidence that will be changing.

Definition at line 791 of file calendar.cpp.

◆ categories()

QStringList Calendar::categories ( ) const

Returns a list of all categories used by Incidences in this Calendar.

Returns
a QStringList containing all the categories.

Definition at line 231 of file calendar.cpp.

◆ createException()

Incidence::Ptr Calendar::createException ( const Incidence::Ptr & incidence,
const QDateTime & recurrenceId,
bool thisAndFuture = false )
static

Creates an exception for an occurrence from a recurring Incidence.

The returned exception is not automatically inserted into the calendar.

Parameters
incidenceis a pointer to a recurring Incidence.
recurrenceIdspecifies the specific occurrence for which the exception applies.
thisAndFuturespecifies if the exception applies only this specific occcurrence or also to all future occurrences.
Returns
a pointer to a new exception incidence with
Parameters
recurrenceIdset.
Since
4.11

Definition at line 372 of file calendar.cpp.

◆ customPropertyUpdated()

void Calendar::customPropertyUpdated ( )
overrideprotectedvirtual

◆ deleteEvent()

virtual bool KCalendarCore::Calendar::deleteEvent ( const Event::Ptr & event)
pure virtual

Removes an Event from the calendar.

Parameters
eventis a pointer to the Event to remove.
Returns
true if the Event was successfully remove; false otherwise.
See also
addEvent()

Implemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.

◆ deleteEventInstances()

virtual bool KCalendarCore::Calendar::deleteEventInstances ( const Event::Ptr & event)
pure virtual

Delete all events that are instances of recurring event event.

Parameters
eventis a pointer to a deleted Event
Returns
true if delete was successful; false otherwise

Implemented in KCalendarCore::MemoryCalendar.

◆ deleteIncidence()

bool Calendar::deleteIncidence ( const Incidence::Ptr & incidence)
virtual

Removes an Incidence from the calendar.

Parameters
incidenceis a pointer to the Incidence to remove.
Returns
true if the Incidence was successfully removed; false otherwise.
See also
addIncidence()

Reimplemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.

Definition at line 356 of file calendar.cpp.

◆ deleteIncidenceInstances()

virtual bool KCalendarCore::Calendar::deleteIncidenceInstances ( const Incidence::Ptr & incidence)
pure virtual

Delete all incidences that are instances of recurring incidence incidence.

Parameters
incidenceis a pointer to a deleted Incidence
Returns
true if delete was successful; false otherwise

Implemented in KCalendarCore::MemoryCalendar.

◆ deleteJournal()

virtual bool KCalendarCore::Calendar::deleteJournal ( const Journal::Ptr & journal)
pure virtual

Removes a Journal from the calendar.

Parameters
journalis a pointer to the Journal to remove.
Returns
true if the Journal was successfully removed; false otherwise.
See also
addJournal()

Implemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.

◆ deleteJournalInstances()

virtual bool KCalendarCore::Calendar::deleteJournalInstances ( const Journal::Ptr & journal)
pure virtual

Delete all journals that are instances of recurring journal journal.

Parameters
journalis a pointer to a deleted Journal
Returns
true if delete was successful; false otherwise

Implemented in KCalendarCore::MemoryCalendar.

◆ deleteTodo()

virtual bool KCalendarCore::Calendar::deleteTodo ( const Todo::Ptr & todo)
pure virtual

Removes a Todo from the calendar.

Parameters
todois a pointer to the Todo to remove.
Returns
true if the Todo was successfully removed; false otherwise.
See also
addTodo()

Implemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.

◆ deleteTodoInstances()

virtual bool KCalendarCore::Calendar::deleteTodoInstances ( const Todo::Ptr & todo)
pure virtual

Delete all to-dos that are instances of recurring to-do todo.

Parameters
todois a pointer to a deleted Todo
Returns
true if delete was successful; false otherwise

Implemented in KCalendarCore::MemoryCalendar.

◆ doSetTimeZone()

void Calendar::doSetTimeZone ( const QTimeZone & timeZone)
protectedvirtual

Let Calendar subclasses set the time specification.

Parameters
timeZoneis the time specification (time zone, etc.) for viewing Incidence dates.

Reimplemented in KCalendarCore::MemoryCalendar.

Definition at line 664 of file calendar.cpp.

◆ endBatchAdding()

void Calendar::endBatchAdding ( )
virtual

Tells the Calendar that you stopped adding a batch of incidences.

See also
startBatchAdding()

Reimplemented in Akonadi::CalendarBase.

Definition at line 928 of file calendar.cpp.

◆ endChange()

bool Calendar::endChange ( const Incidence::Ptr & incidence)
virtual

Flag that a change to a Calendar Incidence has completed.

Parameters
incidenceis a pointer to the Incidence that was changed.

Definition at line 797 of file calendar.cpp.

◆ event() [1/2]

virtual Event::Ptr KCalendarCore::Calendar::event ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
pure virtual

Returns the Event associated with the given unique identifier.

Parameters
uidis a unique identifier string.
recurrenceIdis possible recurrenceId of event, default is null
Returns
a pointer to the Event. A null pointer is returned if no such Event exists.

Implemented in KCalendarCore::MemoryCalendar.

◆ event() [2/2]

virtual bool QObject::event ( QEvent * e)
virtual

Reimplemented from QObject.

◆ eventInstances()

virtual Event::List KCalendarCore::Calendar::eventInstances ( const Incidence::Ptr & event,
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all possible instances for this recurring Event.

Parameters
eventevent to check for. Caller guarantees it's of type Event.
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered event instances sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ events() [1/4]

Event::List Calendar::events ( const QDate & date,
const QTimeZone & timeZone = {},
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const

Returns a sorted, filtered list of all Events which occur on the given date.

The Events are sorted according to sortField and sortDirection.

Parameters
daterequest filtered Event list for this QDate only.
timeZonetime zone to interpret start and end, or the calendar's default time zone if none is specified
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of sorted, filtered Events occurring on date.

Definition at line 318 of file calendar.cpp.

◆ events() [2/4]

Event::List Calendar::events ( const QDate & start,
const QDate & end,
const QTimeZone & timeZone = {},
bool inclusive = false ) const

Returns a filtered list of all Events occurring within a date range.

Parameters
startis the starting date.
endis the ending date.
timeZonetime zone to interpret start and end, or the calendar's default time zone if none is specified
inclusiveif true only Events which are completely included within the date range are returned.
Returns
the list of filtered Events occurring within the specified date range.

Definition at line 332 of file calendar.cpp.

◆ events() [3/4]

Event::List Calendar::events ( const QDateTime & dt) const

Returns a filtered list of all Events which occur on the given timestamp.

Parameters
dtrequest filtered Event list for this QDateTime only.
Returns
the list of filtered Events occurring on the specified timestamp.

Definition at line 325 of file calendar.cpp.

◆ events() [4/4]

Event::List Calendar::events ( EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
virtual

Returns a sorted, filtered list of all Events for this Calendar.

Parameters
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all filtered Events sorted as specified.

Definition at line 339 of file calendar.cpp.

◆ filter()

CalFilter * Calendar::filter ( ) const

Returns the calendar filter.

Returns
a pointer to the calendar CalFilter. A null pointer is returned if no such CalFilter exists.
See also
setFilter()

Definition at line 226 of file calendar.cpp.

◆ filterChanged

void KCalendarCore::Calendar::filterChanged ( )
signal

Emitted when setFilter() is called.

Since
4.11

◆ icon()

QIcon Calendar::icon ( ) const

This calendar's icon.

Since
5.85
See also
setIconName()

Definition at line 976 of file calendar.cpp.

◆ iconChanged

void KCalendarCore::Calendar::iconChanged ( )
signal

Emitted when the icon name changes.

Since
5.85
See also
icon()

◆ id()

QString Calendar::id ( ) const

A unique identifier for this calendar.

Since
5.85
See also
setId()

Definition at line 950 of file calendar.cpp.

◆ idChanged

void KCalendarCore::Calendar::idChanged ( )
signal

Emitted when the id changes.

Since
5.85
See also
id()

◆ incidence()

Incidence::Ptr Calendar::incidence ( const QString & uid,
const QDateTime & recurrenceId = {} ) const

Returns the Incidence associated with the given unique identifier.

Parameters
uidis a unique identifier string.
recurrenceIdis possible recurrenceid of incidence, default is null
Returns
a pointer to the Incidence. A null pointer is returned if no such Incidence exists.

Definition at line 407 of file calendar.cpp.

◆ incidenceFromSchedulingID()

Incidence::Ptr Calendar::incidenceFromSchedulingID ( const QString & sid) const
virtual

Returns the Incidence associated with the given scheduling identifier.

Parameters
sidis a unique scheduling identifier string.
Returns
a pointer to the Incidence. A null pointer is returned if no such Incidence exists.

Definition at line 433 of file calendar.cpp.

◆ incidences() [1/2]

Incidence::List Calendar::incidences ( ) const
virtual

Returns a filtered list of all Incidences for this Calendar.

Returns
the list of all filtered Incidences.

Definition at line 254 of file calendar.cpp.

◆ incidences() [2/2]

Incidence::List Calendar::incidences ( const QDate & date) const
virtual

Returns a filtered list of all Incidences which occur on the given date.

Parameters
daterequest filtered Incidence list for this QDate only.
Returns
the list of filtered Incidences occurring on the specified date.

Definition at line 249 of file calendar.cpp.

◆ incidencesFromSchedulingID()

Incidence::List Calendar::incidencesFromSchedulingID ( const QString & sid) const
virtual

Searches all events and todos for an incidence with this scheduling identifier.

Returns a list of matching results.

Parameters
sidis a unique scheduling identifier string.

Definition at line 423 of file calendar.cpp.

◆ incidenceUpdated()

void Calendar::incidenceUpdated ( const QString & uid,
const QDateTime & recurrenceId )
overrideprotectedvirtual

The Observer interface.

So far not implemented.

Parameters
uidis the UID for the Incidence that has been updated.
recurrenceIdis possible recurrenceid of incidence.

Implements KCalendarCore::IncidenceBase::IncidenceObserver.

Reimplemented in KCalendarCore::MemoryCalendar.

Definition at line 646 of file calendar.cpp.

◆ instances()

Incidence::List Calendar::instances ( const Incidence::Ptr & incidence) const
virtual

Returns an unfiltered list of all exceptions of this recurring incidence.

Parameters
incidenceincidence to check
Returns
the list of all unfiltered exceptions.

Definition at line 264 of file calendar.cpp.

◆ isLoading()

bool Calendar::isLoading ( ) const

Returns true if the calendar is still loading its data and thus read access will not return complete (or even any) results.

Since
5.96

Definition at line 1000 of file calendar.cpp.

◆ isLoadingChanged

void KCalendarCore::Calendar::isLoadingChanged ( )
signal

Emitted when the loading state changed.

Since
5.96
See also
isLoading()

◆ isModified()

bool Calendar::isModified ( ) const

Determine the calendar's modification status.

Returns
true if the calendar has been modified since open or last save.
See also
setModified()

Definition at line 641 of file calendar.cpp.

◆ journal()

virtual Journal::Ptr KCalendarCore::Calendar::journal ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
pure virtual

Returns the Journal associated with the given unique identifier.

Parameters
uidis a unique identifier string.
recurrenceIdis possible recurrenceId of journal, default is null
Returns
a pointer to the Journal. A null pointer is returned if no such Journal exists.

Implemented in KCalendarCore::MemoryCalendar.

◆ journalInstances()

virtual Journal::List KCalendarCore::Calendar::journalInstances ( const Incidence::Ptr & journal,
JournalSortField sortField = JournalSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all instances for this recurring Journal.

Parameters
journaljournal to check for. Caller guarantees it's of type Journal.
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered journal instances sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ journals() [1/2]

Journal::List Calendar::journals ( const QDate & date) const
virtual

Returns a filtered list of all Journals for on the specified date.

Parameters
daterequest filtered Journals for this QDate only.
Returns
the list of filtered Journals for the specified date.

Definition at line 565 of file calendar.cpp.

◆ journals() [2/2]

Journal::List Calendar::journals ( JournalSortField sortField = JournalSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
virtual

Returns a sorted, filtered list of all Journals for this Calendar.

Parameters
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all filtered Journals sorted as specified.

Definition at line 558 of file calendar.cpp.

◆ mergeIncidenceList()

Incidence::List Calendar::mergeIncidenceList ( const Event::List & events,
const Todo::List & todos,
const Journal::List & journals )
static

Create a merged list of Events, Todos, and Journals.

static

Parameters
eventsis an Event list to merge.
todosis a Todo list to merge.
journalsis a Journal list to merge.
Returns
a list of merged Incidences.

Definition at line 769 of file calendar.cpp.

◆ name()

QString Calendar::name ( ) const

The user-visible name for this calendar.

Since
5.85
See also
setName()

Definition at line 963 of file calendar.cpp.

◆ nameChanged

void KCalendarCore::Calendar::nameChanged ( )
signal

Emitted when the name changes.

Since
5.85
See also
name()

◆ notifyIncidenceAboutToBeDeleted()

void Calendar::notifyIncidenceAboutToBeDeleted ( const Incidence::Ptr & incidence)
protected

Let Calendar subclasses notify that they will remove an Incidence.

Parameters
incidenceis a pointer to the Incidence object that will be removed.

Definition at line 708 of file calendar.cpp.

◆ notifyIncidenceAdded()

void Calendar::notifyIncidenceAdded ( const Incidence::Ptr & incidence)
protected

Let Calendar subclasses notify that they inserted an Incidence.

Parameters
incidenceis a pointer to the Incidence object that was inserted.

Definition at line 669 of file calendar.cpp.

◆ notifyIncidenceAdditionCanceled()

void Calendar::notifyIncidenceAdditionCanceled ( const Incidence::Ptr & incidence)
protected

Let Calendar subclasses notify that they canceled addition of an Incidence.

Parameters
incidenceis a pointer to the Incidence object that addition as canceled.

Definition at line 738 of file calendar.cpp.

◆ notifyIncidenceChanged()

void Calendar::notifyIncidenceChanged ( const Incidence::Ptr & incidence)
protected

Let Calendar subclasses notify that they modified an Incidence.

Parameters
incidenceis a pointer to the Incidence object that was modified.

Definition at line 693 of file calendar.cpp.

◆ notifyIncidenceDeleted()

void Calendar::notifyIncidenceDeleted ( const Incidence::Ptr & incidence)
protected

Let Calendar subclasses notify that they removed an Incidence.

Parameters
incidenceis a pointer to the Incidence object that has been removed.

Definition at line 723 of file calendar.cpp.

◆ owner()

Person Calendar::owner ( ) const

Returns the owner of the calendar.

Returns
the owner Person object.
See also
setOwner()

Definition at line 138 of file calendar.cpp.

◆ ownerChanged

void KCalendarCore::Calendar::ownerChanged ( )
signal

Emitted when the owner changes.

Since
5.85
See also
owner()

◆ productId()

QString Calendar::productId ( ) const

Returns the calendar's Product ID.

See also
setProductId()

Definition at line 763 of file calendar.cpp.

◆ rawEvents() [1/2]

virtual Event::List KCalendarCore::Calendar::rawEvents ( const QDate & start,
const QDate & end,
const QTimeZone & timeZone = {},
bool inclusive = false ) const
pure virtual

Returns an unfiltered list of all Events occurring within a date range.

Parameters
startis the starting date
endis the ending date
timeZonetime zone to interpret start and end, or the calendar's default time zone if none is specified
inclusiveif true only Events which are completely included within the date range are returned.
Returns
the list of unfiltered Events occurring within the specified date range.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawEvents() [2/2]

virtual Event::List KCalendarCore::Calendar::rawEvents ( EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all Events for this Calendar.

Parameters
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Events sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawEventsForDate()

virtual Event::List KCalendarCore::Calendar::rawEventsForDate ( const QDate & date,
const QTimeZone & timeZone = {},
EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all Events which occur on the given date.

The Events are sorted according to sortField and sortDirection.

Parameters
daterequest unfiltered Event list for this QDate only
timeZonetime zone to interpret date, or the calendar's default time zone if none is specified
sortFieldspecifies the EventSortField
sortDirectionspecifies the SortDirection
Returns
the list of sorted, unfiltered Events occurring on date

Implemented in KCalendarCore::MemoryCalendar.

◆ rawIncidences()

Incidence::List Calendar::rawIncidences ( ) const
virtual

Returns an unfiltered list of all Incidences for this Calendar.

Returns
the list of all unfiltered Incidences.

Definition at line 259 of file calendar.cpp.

◆ rawJournals()

virtual Journal::List KCalendarCore::Calendar::rawJournals ( JournalSortField sortField = JournalSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all Journals for this Calendar.

Parameters
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Journals sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawJournalsForDate()

virtual Journal::List KCalendarCore::Calendar::rawJournalsForDate ( const QDate & date) const
pure virtual

Returns an unfiltered list of all Journals for on the specified date.

Parameters
daterequest unfiltered Journals for this QDate only.
Returns
the list of unfiltered Journals for the specified date.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawTodos() [1/2]

virtual Todo::List KCalendarCore::Calendar::rawTodos ( const QDate & start,
const QDate & end,
const QTimeZone & timeZone = {},
bool inclusive = false ) const
pure virtual

Returns an unfiltered list of all Todos occurring within a date range.

Parameters
startis the starting date
endis the ending date
timeZonetime zone to interpret start and end, or the calendar's default time zone if none is specified
inclusiveif true only Todos which are completely included within the date range are returned.
Returns
the list of unfiltered Todos occurring within the specified date range.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawTodos() [2/2]

virtual Todo::List KCalendarCore::Calendar::rawTodos ( TodoSortField sortField = TodoSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all Todos for this Calendar.

Parameters
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered Todos sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ rawTodosForDate()

virtual Todo::List KCalendarCore::Calendar::rawTodosForDate ( const QDate & date) const
pure virtual

Returns an unfiltered list of all Todos which due on the specified date.

Parameters
daterequest unfiltered Todos due on this QDate.
Returns
the list of unfiltered Todos due on the specified date.

Implemented in KCalendarCore::MemoryCalendar.

◆ registerObserver()

void Calendar::registerObserver ( CalendarObserver * observer)

Registers an Observer for this Calendar.

Parameters
observeris a pointer to an Observer object that will be watching this Calendar.
See also
unregisterObserver()

Definition at line 608 of file calendar.cpp.

◆ setAccessMode()

void Calendar::setAccessMode ( const AccessMode mode)

Set this calendar's AccessMode, i.e.

whether it is writable or read-only.

Since
5.85
See also
accessMode()

Definition at line 992 of file calendar.cpp.

◆ setFilter()

void Calendar::setFilter ( CalFilter * filter)

Sets the calendar filter.

Parameters
filtera pointer to a CalFilter object which will be used to filter Calendar Incidences. The Calendar takes ownership of filter.
See also
filter()

Definition at line 216 of file calendar.cpp.

◆ setIcon()

void Calendar::setIcon ( const QIcon & icon)

Set this calendar's icon.

Since
5.85
See also
icon()

Definition at line 981 of file calendar.cpp.

◆ setId()

void Calendar::setId ( const QString & id)

set a unique identifier for this calendar.

Since
5.85
See also
id()

Definition at line 955 of file calendar.cpp.

◆ setIsLoading()

void Calendar::setIsLoading ( bool isLoading)
protected

Sets the loading state of this calendar.

This is false by default and only needs to be called for calendars that implement asynchronous loading.

Since
5.96
See also
isLoading()

Definition at line 1005 of file calendar.cpp.

◆ setModified()

void Calendar::setModified ( bool modified)

Sets if the calendar has been modified.

Parameters
modifiedis true if the calendar has been modified since open or last save.
See also
isModified()

Definition at line 630 of file calendar.cpp.

◆ setName()

void Calendar::setName ( const QString & name)

Set the user-visible name for this calendar.

Since
5.85
See also
name()

Definition at line 968 of file calendar.cpp.

◆ setObserversEnabled()

void Calendar::setObserversEnabled ( bool enabled)
protected

Let Calendar subclasses notify that they enabled an Observer.

Parameters
enabledif true tells the calendar that a subclass has enabled an Observer.

Definition at line 803 of file calendar.cpp.

◆ setOwner()

void Calendar::setOwner ( const Person & owner)

Sets the owner of the calendar to owner.

Parameters
owneris a Person object. Must be a non-null pointer.
See also
owner()

Definition at line 143 of file calendar.cpp.

◆ setProductId()

void Calendar::setProductId ( const QString & id)

Sets the calendar Product ID to id.

Parameters
idis a string containing the Product ID.
See also
productId() const

Definition at line 758 of file calendar.cpp.

◆ setTimeZone()

void Calendar::setTimeZone ( const QTimeZone & timeZone)

Sets the default time specification zone used for creating or modifying incidences in the Calendar.

Parameters
timeZoneThe time zone

Definition at line 152 of file calendar.cpp.

◆ setTimeZoneId()

void Calendar::setTimeZoneId ( const QByteArray & timeZoneId)

Sets the time zone ID used for creating or modifying incidences in the Calendar.

This method has no effect on existing incidences.

Parameters
timeZoneIdis a string containing a time zone ID, which is assumed to be valid. The time zone ID is used to set the time zone for viewing Incidence date/times. If no time zone is found, the viewing time specification is set to local time zone. Example: "Europe/Berlin"
See also
setTimeZone()

Definition at line 168 of file calendar.cpp.

◆ shiftTimes()

void Calendar::shiftTimes ( const QTimeZone & oldZone,
const QTimeZone & newZone )

Shifts the times of all incidences so that they appear at the same clock time as before but in a new time zone.

The shift is done from a viewing time zone rather than from the actual incidence time zone.

For example, shifting an incidence whose start time is 09:00 America/New York, using an old viewing time zone (oldSpec) of Europe/London, to a new time zone (newSpec) of Europe/Paris, will result in the time being shifted from 14:00 (which is the London time of the incidence start) to 14:00 Paris time.

Parameters
oldZonethe time zone which provides the clock times
newZonethe new time zone

Definition at line 194 of file calendar.cpp.

◆ sortEvents()

Event::List Calendar::sortEvents ( Event::List && eventList,
EventSortField sortField,
SortDirection sortDirection )
static

Sort a list of Events.

Parameters
eventListthe list of events that should be sorted. The list is sorted in place and returned.
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
a list of Events sorted as specified.
Since
5.95

Definition at line 284 of file calendar.cpp.

◆ sortJournals()

Journal::List Calendar::sortJournals ( Journal::List && journalList,
JournalSortField sortField,
SortDirection sortDirection )
static

Sort a list of Journals.

Parameters
journalListthe list of journals that should be sorted. The list is sorted in place and returned.
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
a list of Journals sorted as specified.
Since
5.95

Definition at line 532 of file calendar.cpp.

◆ sortTodos()

Todo::List Calendar::sortTodos ( Todo::List && todoList,
TodoSortField sortField,
SortDirection sortDirection )
static

Sort a list of Todos.

Parameters
todoListthe list of todos that should be sorted. The list is sorted in place and returned.
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
a list of Todos sorted as specified.
Since
5.95

Definition at line 444 of file calendar.cpp.

◆ startBatchAdding()

void Calendar::startBatchAdding ( )
virtual

Call this to tell the calendar that you're adding a batch of incidences.

So it doesn't, for example, ask the destination for each incidence.

See also
endBatchAdding()

Reimplemented in Akonadi::CalendarBase.

Definition at line 923 of file calendar.cpp.

◆ timeZone()

QTimeZone Calendar::timeZone ( ) const

Get the time zone used for creating or modifying incidences in the Calendar.

Returns
time specification

Definition at line 163 of file calendar.cpp.

◆ timeZoneId()

QByteArray Calendar::timeZoneId ( ) const

Returns the time zone ID used for creating or modifying incidences in the calendar.

Returns
the string containing the time zone ID, or empty string if the creation/modification time specification is not a time zone.

Definition at line 189 of file calendar.cpp.

◆ todo()

virtual Todo::Ptr KCalendarCore::Calendar::todo ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
pure virtual

Returns the Todo associated with the given unique identifier.

Parameters
uidis a unique identifier string.
recurrenceIdis possible recurrenceId of todo, default is null
Returns
a pointer to the Todo. A null pointer is returned if no such Todo exists.

Implemented in KCalendarCore::MemoryCalendar.

◆ todoInstances()

virtual Todo::List KCalendarCore::Calendar::todoInstances ( const Incidence::Ptr & todo,
TodoSortField sortField = TodoSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
pure virtual

Returns a sorted, unfiltered list of all possible instances for this recurring Todo.

Parameters
todotodo to check for. Caller guarantees it's of type Todo.
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered todo instances sorted as specified.

Implemented in KCalendarCore::MemoryCalendar.

◆ todos() [1/3]

Todo::List Calendar::todos ( const QDate & date) const
virtual

Returns a filtered list of all Todos which are due on the specified date.

Parameters
daterequest filtered Todos due on this QDate.
Returns
the list of filtered Todos due on the specified date.

Definition at line 518 of file calendar.cpp.

◆ todos() [2/3]

Todo::List Calendar::todos ( const QDate & start,
const QDate & end,
const QTimeZone & timeZone = {},
bool inclusive = false ) const
virtual

Returns a filtered list of all Todos occurring within a date range.

Parameters
startis the starting date
endis the ending date
timeZonetime zone to interpret start and end, or the calendar's default time zone if none is specified
inclusiveif true only Todos which are completely included within the date range are returned.
Returns
the list of filtered Todos occurring within the specified date range.

Definition at line 525 of file calendar.cpp.

◆ todos() [3/3]

Todo::List Calendar::todos ( TodoSortField sortField = TodoSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
virtual

Returns a sorted, filtered list of all Todos for this Calendar.

Parameters
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all filtered Todos sorted as specified.

Definition at line 511 of file calendar.cpp.

◆ unregisterObserver()

void Calendar::unregisterObserver ( CalendarObserver * observer)

Unregisters an Observer for this Calendar.

Parameters
observeris a pointer to an Observer object that has been watching this Calendar.
See also
registerObserver()

Definition at line 621 of file calendar.cpp.

◆ virtual_hook()

void Calendar::virtual_hook ( int id,
void * data )
protectedvirtual

IncidenceBase::virtual_hook()

Reimplemented in KCalendarCore::MemoryCalendar.

Definition at line 943 of file calendar.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:55:37 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.