KCalendarCore::MemoryCalendar

Search for usage in LXR

KCalendarCore::MemoryCalendar Class Reference

#include <memorycalendar.h>

Inheritance diagram for KCalendarCore::MemoryCalendar:

Public Types

typedef QSharedPointer< MemoryCalendarPtr
 
- Public Types inherited from KCalendarCore::Calendar
typedef QSharedPointer< CalendarPtr
 
- Public Types inherited from QObject
typedef  QObjectList
 

Public Member Functions

 MemoryCalendar (const QByteArray &timeZoneId)
 
 MemoryCalendar (const QTimeZone &timeZone)
 
 ~MemoryCalendar () override
 
bool addEvent (const Event::Ptr &event) override
 
bool addIncidence (const Incidence::Ptr &incidence) override
 
bool addJournal (const Journal::Ptr &journal) override
 
bool addTodo (const Todo::Ptr &todo) override
 
Alarm::List alarms (const QDateTime &from, const QDateTime &to, bool excludeBlockedAlarms=false) const override
 
bool deleteEvent (const Event::Ptr &event) override
 
bool deleteEventInstances (const Event::Ptr &event) override
 
bool deleteIncidence (const Incidence::Ptr &incidence) override
 
bool deleteIncidenceInstances (const Incidence::Ptr &incidence) override
 
bool deleteJournal (const Journal::Ptr &journal) override
 
bool deleteJournalInstances (const Journal::Ptr &journal) override
 
bool deleteTodo (const Todo::Ptr &todo) override
 
bool deleteTodoInstances (const Todo::Ptr &todo) override
 
void doSetTimeZone (const QTimeZone &timeZone) override
 
Event::Ptr event (const QString &uid, const QDateTime &recurrenceId={}) const override
 
virtual bool event (QEvent *e)
 
Event::List eventInstances (const Incidence::Ptr &event, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
void incidenceUpdate (const QString &uid, const QDateTime &recurrenceId) override
 
void incidenceUpdated (const QString &uid, const QDateTime &recurrenceId) override
 
Incidence::Ptr instance (const QString &identifier) const
 
Journal::Ptr journal (const QString &uid, const QDateTime &recurrenceId={}) const override
 
Journal::List journalInstances (const Incidence::Ptr &journal, JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Event::List rawEvents (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const override
 
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Event::List rawEventsForDate (const QDate &date, const QTimeZone &timeZone={}, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Journal::List rawJournalsForDate (const QDate &date) const override
 
Todo::List rawTodos (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const override
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Todo::List rawTodosForDate (const QDate &date) const override
 
void setUpdateLastModifiedOnChange (bool update)
 
Todo::Ptr todo (const QString &uid, const QDateTime &recurrenceId={}) const override
 
Todo::List todoInstances (const Incidence::Ptr &todo, TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
bool updateLastModifiedOnChange () const
 
- Public Member Functions inherited from KCalendarCore::Calendar
 Calendar (const QByteArray &timeZoneId)
 
 Calendar (const QTimeZone &timeZone)
 
 ~Calendar () override
 
AccessMode accessMode () const
 
Alarm::List alarmsTo (const QDateTime &to) const
 
bool batchAdding () const
 
virtual bool beginChange (const Incidence::Ptr &incidence)
 
QStringList categories () const
 
virtual void endBatchAdding ()
 
virtual bool endChange (const Incidence::Ptr &incidence)
 
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::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 Incidence::List rawIncidences () const
 
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::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 ()
 

Protected Member Functions

void virtual_hook (int id, void *data) override
 
- Protected Member Functions inherited from KCalendarCore::Calendar
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
 
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)
 
- 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

- Properties inherited from KCalendarCore::Calendar
KCalendarCore::AccessMode accessMode
 
QIcon icon
 
QString id
 
bool isLoading
 
QString name
 
KCalendarCore::Person owner
 
QString productId
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from KCalendarCore::Calendar
void accessModeChanged ()
 
void filterChanged ()
 
void iconChanged ()
 
void idChanged ()
 
void isLoadingChanged ()
 
void nameChanged ()
 
void ownerChanged ()
 
- Static Public Member Functions inherited from KCalendarCore::Calendar
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)
 

Detailed Description

This class provides a calendar stored in memory.

Definition at line 31 of file memorycalendar.h.

Member Typedef Documentation

◆ Ptr

Constructor & Destructor Documentation

◆ MemoryCalendar() [1/2]

KCalendarCore::MemoryCalendar::MemoryCalendar ( 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

◆ MemoryCalendar() [2/2]

KCalendarCore::MemoryCalendar::MemoryCalendar ( const QByteArray & timeZoneId)
explicit

◆ ~MemoryCalendar()

KCalendarCore::MemoryCalendar::~MemoryCalendar ( )
override

Destroys the calendar.

Member Function Documentation

◆ addEvent()

bool KCalendarCore::MemoryCalendar::addEvent ( const Event::Ptr & event)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ addIncidence()

bool KCalendarCore::MemoryCalendar::addIncidence ( const Incidence::Ptr & incidence)
overridevirtual

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 from KCalendarCore::Calendar.

◆ addJournal()

bool KCalendarCore::MemoryCalendar::addJournal ( const Journal::Ptr & journal)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ addTodo()

bool KCalendarCore::MemoryCalendar::addTodo ( const Todo::Ptr & todo)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ alarms()

Alarm::List KCalendarCore::MemoryCalendar::alarms ( const QDateTime & from,
const QDateTime & to,
bool excludeBlockedAlarms = false ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ deleteEvent()

bool KCalendarCore::MemoryCalendar::deleteEvent ( const Event::Ptr & event)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ deleteEventInstances()

bool KCalendarCore::MemoryCalendar::deleteEventInstances ( const Event::Ptr & event)
overridevirtual

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

Implements KCalendarCore::Calendar.

◆ deleteIncidence()

bool KCalendarCore::MemoryCalendar::deleteIncidence ( const Incidence::Ptr & incidence)
overridevirtual

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 from KCalendarCore::Calendar.

◆ deleteIncidenceInstances()

bool KCalendarCore::MemoryCalendar::deleteIncidenceInstances ( const Incidence::Ptr & incidence)
overridevirtual

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

Implements KCalendarCore::Calendar.

◆ deleteJournal()

bool KCalendarCore::MemoryCalendar::deleteJournal ( const Journal::Ptr & journal)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ deleteJournalInstances()

bool KCalendarCore::MemoryCalendar::deleteJournalInstances ( const Journal::Ptr & journal)
overridevirtual

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

Implements KCalendarCore::Calendar.

◆ deleteTodo()

bool KCalendarCore::MemoryCalendar::deleteTodo ( const Todo::Ptr & todo)
overridevirtual

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()

Implements KCalendarCore::Calendar.

◆ deleteTodoInstances()

bool KCalendarCore::MemoryCalendar::deleteTodoInstances ( const Todo::Ptr & todo)
overridevirtual

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

Implements KCalendarCore::Calendar.

◆ doSetTimeZone()

void KCalendarCore::MemoryCalendar::doSetTimeZone ( const QTimeZone & timeZone)
overridevirtual

Let Calendar subclasses set the time specification.

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

Reimplemented from KCalendarCore::Calendar.

◆ event() [1/2]

Event::Ptr KCalendarCore::MemoryCalendar::event ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ event() [2/2]

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

Reimplemented from KCalendarCore::Calendar.

◆ eventInstances()

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

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.

Implements KCalendarCore::Calendar.

◆ incidenceUpdate()

void KCalendarCore::MemoryCalendar::incidenceUpdate ( const QString & uid,
const QDateTime & recurrenceId )
overridevirtual

The IncidenceObserver interface.

This function is called before any changes are made.

Parameters
uidis the string containing the incidence uid.
recurrenceIdis possible recurrenceid of incidence.

Implements KCalendarCore::IncidenceBase::IncidenceObserver.

◆ incidenceUpdated()

void KCalendarCore::MemoryCalendar::incidenceUpdated ( const QString & uid,
const QDateTime & recurrenceId )
overridevirtual

The Observer interface.

So far not implemented.

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

Reimplemented from KCalendarCore::Calendar.

◆ instance()

Incidence::Ptr KCalendarCore::MemoryCalendar::instance ( const QString & identifier) const

Returns an incidence by identifier.

See also
Incidence::instanceIdentifier()
Since
4.11

◆ journal()

Journal::Ptr KCalendarCore::MemoryCalendar::journal ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ journalInstances()

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

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.

Implements KCalendarCore::Calendar.

◆ rawEvents() [1/2]

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

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.

Implements KCalendarCore::Calendar.

◆ rawEvents() [2/2]

Event::List KCalendarCore::MemoryCalendar::rawEvents ( EventSortField sortField = EventSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ rawEventsForDate()

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

Returns an unfiltered list of all Events which occur on the given date.

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 unfiltered Events occurring on the specified QDate.

Implements KCalendarCore::Calendar.

◆ rawJournals()

Journal::List KCalendarCore::MemoryCalendar::rawJournals ( JournalSortField sortField = JournalSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ rawJournalsForDate()

Journal::List KCalendarCore::MemoryCalendar::rawJournalsForDate ( const QDate & date) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ rawTodos() [1/2]

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

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.

Implements KCalendarCore::Calendar.

◆ rawTodos() [2/2]

Todo::List KCalendarCore::MemoryCalendar::rawTodos ( TodoSortField sortField = TodoSortUnsorted,
SortDirection sortDirection = SortDirectionAscending ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ rawTodosForDate()

Todo::List KCalendarCore::MemoryCalendar::rawTodosForDate ( const QDate & date) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ setUpdateLastModifiedOnChange()

void KCalendarCore::MemoryCalendar::setUpdateLastModifiedOnChange ( bool update)

Govern if the memory calendar is changing the lastModified field of incidence it owns, on incidence updates.

Parameters
update,whentrue, the lastModified field of an incidence owned by the calendar is set to the current date time on any change of the incidence.
Since
5.80

◆ todo()

Todo::Ptr KCalendarCore::MemoryCalendar::todo ( const QString & uid,
const QDateTime & recurrenceId = {} ) const
overridevirtual

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.

Implements KCalendarCore::Calendar.

◆ todoInstances()

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

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.

Implements KCalendarCore::Calendar.

◆ updateLastModifiedOnChange()

bool KCalendarCore::MemoryCalendar::updateLastModifiedOnChange ( ) const

Return true if the memory calendar is updating the lastModified field of incidence owned by the calendar on any incidence change.

Since
5.80

◆ virtual_hook()

void KCalendarCore::MemoryCalendar::virtual_hook ( int id,
void * data )
overrideprotectedvirtual

Standard trick to add virtuals later.

Parameters
idis any integer unique to this class which we will use to identify the method to be called.
datais a pointer to some glob of data, typically a struct.

Reimplemented from KCalendarCore::Calendar.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.