KCalendarCore::MemoryCalendar

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 Member Functions

 MemoryCalendar (const QTimeZone &timeZone)
 
 MemoryCalendar (const QByteArray &timeZoneId)
 
 ~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
 
Alarm::List alarmsTo (const QDateTime &to) const
 
void close () override
 
Event::Ptr deletedEvent (const QString &uid, const QDateTime &recurrenceId={}) const override
 
Event::List deletedEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Journal::Ptr deletedJournal (const QString &uid, const QDateTime &recurrenceId={}) const override
 
Journal::List deletedJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Todo::Ptr deletedTodo (const QString &uid, const QDateTime &recurrenceId={}) const override
 
Todo::List deletedTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) 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
 
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 (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Event::List rawEvents (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const override
 
Event::List rawEventsForDate (const QDate &date, const QTimeZone &timeZone={}, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Event::List rawEventsForDate (const QDateTime &dt) const override
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Journal::List rawJournalsForDate (const QDate &date) const override
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const override
 
Todo::List rawTodos (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const override
 
Todo::List rawTodosForDate (const QDate &date) const override
 
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
 
- Public Member Functions inherited from KCalendarCore::Calendar
 Calendar (const QTimeZone &timeZone)
 
 Calendar (const QByteArray &timeZoneId)
 
 ~Calendar () override
 
bool addNotebook (const QString &notebook, bool isVisible)
 
Alarm::List alarmsTo (const QDateTime &to) const
 
bool batchAdding () const
 
virtual bool beginChange (const Incidence::Ptr &incidence)
 
QStringList categories () const
 
virtual void clearNotebookAssociations ()
 
QString defaultNotebook () const
 
Incidence::Ptr deleted (const QString &uid, const QDateTime &recurrenceId={}) const
 
bool deleteNotebook (const QString &notebook)
 
virtual Incidence::List duplicates (const Incidence::Ptr &incidence)
 
virtual void endBatchAdding ()
 
virtual bool endChange (const Incidence::Ptr &incidence)
 
virtual Event::List events (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Event::List events (const QDateTime &dt) const
 
Event::List events (const QDate &start, const QDate &end, const QTimeZone &timeZone={}, bool inclusive=false) const
 
Event::List events (const QDate &date, const QTimeZone &timeZone={}, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
CalFilterfilter () const
 
bool hasValidNotebook (const QString &notebook) 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 incidences (const QString &notebook) const
 
virtual Incidence::List incidencesFromSchedulingID (const QString &sid) const
 
virtual Incidence::List instances (const Incidence::Ptr &incidence) const
 
bool isAncestorOf (const Incidence::Ptr &ancestor, const Incidence::Ptr &incidence) const
 
bool isModified () const
 
virtual bool isSaving () const
 
bool isVisible (const Incidence::Ptr &incidence) const
 
bool isVisible (const QString &notebook) const
 
virtual Journal::List journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
virtual Journal::List journals (const QDate &date) const
 
virtual QString notebook (const Incidence::Ptr &incidence) const
 
virtual QString notebook (const QString &uid) const
 
virtual QStringList notebooks () const
 
Person owner () const
 
QString productId () const
 
virtual Incidence::List rawIncidences () const
 
void registerObserver (CalendarObserver *observer)
 
Incidence::List relations (const QString &uid) const
 
virtual bool reload ()
 
virtual void removeRelations (const Incidence::Ptr &incidence)
 
virtual bool save ()
 
bool setDefaultNotebook (const QString &notebook)
 
void setFilter (CalFilter *filter)
 
void setModified (bool modified)
 
virtual bool setNotebook (const Incidence::Ptr &incidence, const QString &notebook)
 
void setOwner (const Person &owner)
 
void setProductId (const QString &id)
 
void setTimeZone (const QTimeZone &timeZone)
 
void setTimeZoneId (const QByteArray &timeZoneId)
 
virtual void setupRelations (const Incidence::Ptr &incidence)
 
void shiftTimes (const QTimeZone &oldZone, const QTimeZone &newZone)
 
virtual void startBatchAdding ()
 
QTimeZone timeZone () const
 
QByteArray timeZoneId () const
 
virtual Todo::List todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) 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
 
void unregisterObserver (CalendarObserver *observer)
 
bool updateNotebook (const QString &notebook, bool isVisible)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
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 ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
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_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 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
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, 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
 
bool deletionTracking () const
 
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 setDeletionTracking (bool enable)
 
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::Person owner
 
QString productId
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from KCalendarCore::Calendar
void filterChanged ()
 
- 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 (const Event::List &eventList, EventSortField sortField, SortDirection sortDirection)
 
static Journal::List sortJournals (const Journal::List &journalList, JournalSortField sortField, SortDirection sortDirection)
 
static Todo::List sortTodos (const 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 *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
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, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (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)
 
- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

This class provides a calendar stored in memory.

Definition at line 31 of file memorycalendar.h.

Member Typedef Documentation

A shared pointer to a MemoryCalendar.

Definition at line 39 of file memorycalendar.h.

Constructor & Destructor Documentation

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
KCalendarCore::MemoryCalendar::MemoryCalendar ( const QByteArray timeZoneId)
explicit

KCalendarCore::MemoryCalendar::~MemoryCalendar ( )
override

Destroys the calendar.

Member Function Documentation

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.

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.

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.

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.

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.

Alarm::List KCalendarCore::MemoryCalendar::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.
void KCalendarCore::MemoryCalendar::close ( )
overridevirtual

Clears out the current calendar, freeing all used memory etc.

etc.

Implements KCalendarCore::Calendar.

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

Returns the deleted 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 deleted Event. A null pointer is returned if no such deleted Event exists, or if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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

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

Parameters
sortFieldspecifies the EventSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered deleted Events sorted as specified. An empty list is returned if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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

Returns the deleted 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 deleted Journal. A null pointer is returned if no such deleted Journal exists or if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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

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

Parameters
sortFieldspecifies the JournalSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered deleted Journals sorted as specified. An empty list is returned if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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

Returns the deleted 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 deleted Todo. A null pointer is returned if no such deleted Todo exists or if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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

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

Parameters
sortFieldspecifies the TodoSortField.
sortDirectionspecifies the SortDirection.
Returns
the list of all unfiltered deleted Todos sorted as specified. An empty list is returned if deletion tracking is disabled.
See also
deletionTracking()

Implements KCalendarCore::Calendar.

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.

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.

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.

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.

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.

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.

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.

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.

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::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::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.

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.

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.

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

Returns an incidence by identifier.

See also
Incidence::instanceIdentifier()
Since
4.11
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.

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

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.

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.

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.

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.

Event::List KCalendarCore::MemoryCalendar::rawEventsForDate ( const QDateTime dt) const
overridevirtual

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

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

Implements KCalendarCore::Calendar.

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.

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.

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.

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.

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.

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.

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.

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-2020 The KDE developers.
Generated on Thu Dec 3 2020 22:51:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.