• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • MemoryCalendar
Public Types | Public Member Functions | Protected Member Functions | List of all members
KCalCore::MemoryCalendar Class Reference

#include <memorycalendar.h>

Inheritance diagram for KCalCore::MemoryCalendar:
Inheritance graph
[legend]

Public Types

typedef QSharedPointer
< MemoryCalendar > 
Ptr
 
- Public Types inherited from KCalCore::Calendar
typedef QSharedPointer< Calendar > Ptr
 

Public Member Functions

 MemoryCalendar (const KDateTime::Spec &timeSpec)
 
 MemoryCalendar (const QString &timeZoneId)
 
 ~MemoryCalendar ()
 
bool addEvent (const Event::Ptr &event)
 
bool addIncidence (const Incidence::Ptr &incidence)
 
bool addJournal (const Journal::Ptr &journal)
 
bool addTodo (const Todo::Ptr &todo)
 
Alarm::List alarms (const KDateTime &from, const KDateTime &to) const
 
Alarm::List alarmsTo (const KDateTime &to) const
 
void close ()
 
void deleteAllEvents ()
 
void deleteAllJournals ()
 
void deleteAllTodos ()
 
Event::Ptr deletedEvent (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Event::List deletedEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Journal::Ptr deletedJournal (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Journal::List deletedJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Todo::Ptr deletedTodo (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Todo::List deletedTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
bool deleteEvent (const Event::Ptr &event)
 
bool deleteEventInstances (const Event::Ptr &event)
 
bool deleteIncidence (const Incidence::Ptr &incidence)
 
bool deleteIncidenceInstances (const Incidence::Ptr &incidence)
 
bool deleteJournal (const Journal::Ptr &journal)
 
bool deleteJournalInstances (const Journal::Ptr &journal)
 
bool deleteTodo (const Todo::Ptr &todo)
 
bool deleteTodoInstances (const Todo::Ptr &todo)
 
Event::Ptr event (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Event::List eventInstances (const Incidence::Ptr &event, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
void incidenceUpdate (const QString &uid, const KDateTime &recurrenceId)
 
void incidenceUpdated (const QString &uid, const KDateTime &recurrenceId)
 
Incidence::Ptr instance (const QString &identifier) const
 
Journal::Ptr journal (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Journal::List journalInstances (const Incidence::Ptr &journal, JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Event::List rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false) const
 
Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Event::List rawEventsForDate (const KDateTime &dt) const
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Journal::List rawJournalsForDate (const QDate &date) const
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
Todo::List rawTodos (const QDate &start, const QDate &end, const KDateTime::Spec &timespec=KDateTime::Spec(), bool inclusive=false) const
 
Todo::List rawTodosForDate (const QDate &date) const
 
Todo::Ptr todo (const QString &uid, const KDateTime &recurrenceId=KDateTime()) const
 
Todo::List todoInstances (const Incidence::Ptr &todo, TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
- Public Member Functions inherited from KCalCore::Calendar
 Calendar (const KDateTime::Spec &timeSpec)
 
 Calendar (const QString &timeZoneId)
 
virtual ~Calendar ()
 
bool addNotebook (const QString &notebook, bool isVisible)
 
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 KDateTime &recurrenceId=KDateTime()) const
 
bool deleteNotebook (const QString &notebook)
 
KCALCORE_DEPRECATED Incidence::Ptr dissociateOccurrence (const Incidence::Ptr &incidence, const QDate &date, const KDateTime::Spec &spec, bool single=true)
 
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 KDateTime &dt) const
 
Event::List events (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false) const
 
Event::List events (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const
 
CalFilter * filter () const
 
bool hasValidNotebook (const QString &notebook) const
 
Incidence::Ptr incidence (const QString &uid, const KDateTime &recurrenceId=KDateTime()) 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
 
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::Ptr 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::Ptr &owner)
 
void setProductId (const QString &id)
 
void setTimeSpec (const KDateTime::Spec &timeSpec)
 
void setTimeZoneId (const QString &timeZoneId)
 
void setTimeZones (ICalTimeZones *zones)
 
virtual void setupRelations (const Incidence::Ptr &incidence)
 
void setViewTimeSpec (const KDateTime::Spec &timeSpec) const
 
void setViewTimeZoneId (const QString &timeZoneId) const
 
void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
virtual void startBatchAdding ()
 
KDateTime::Spec timeSpec () const
 
QString timeZoneId () const
 
ICalTimeZones * timeZones () 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 KDateTime::Spec &timespec=KDateTime::Spec(), bool inclusive=false) const
 
void unregisterObserver (CalendarObserver *observer)
 
bool updateNotebook (const QString &notebook, bool isVisible)
 
KDateTime::Spec viewTimeSpec () const
 
QString viewTimeZoneId () const
 
- Public Member Functions inherited from KCalCore::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QString > customProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
QString nonKDECustomPropertyParameters (const QByteArray &name) const
 
CustomProperties & operator= (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 KCalCore::IncidenceBase::IncidenceObserver
virtual ~IncidenceObserver ()
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KCalCore::Calendar
void appendAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const KDateTime &from, const KDateTime &to) const
 
void appendRecurringAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const KDateTime &from, const KDateTime &to) const
 
virtual void customPropertyUpdated ()
 
bool deletionTracking () const
 
virtual void doSetTimeSpec (const KDateTime::Spec &timeSpec)
 
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 KCalCore::CustomProperties
virtual void customPropertyUpdate ()
 

Additional Inherited Members

- Signals inherited from KCalCore::Calendar
void filterChanged ()
 
- Static Public Member Functions inherited from KCalCore::Calendar
static Incidence::Ptr createException (const Incidence::Ptr &incidence, const KDateTime &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 KCalCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Detailed Description

This class provides a calendar stored in memory.

Definition at line 46 of file memorycalendar.h.

Member Typedef Documentation

typedef QSharedPointer<MemoryCalendar> KCalCore::MemoryCalendar::Ptr

A shared pointer to a MemoryCalendar.

Definition at line 53 of file memorycalendar.h.

Constructor & Destructor Documentation

KCalCore::MemoryCalendar::MemoryCalendar ( const KDateTime::Spec &  timeSpec)
explicit

Constructs a calendar with a specified time zone timeZoneid.

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

The constructor also calls setViewTimeSpec(timeSpec).

Parameters
timeSpectime specification
KCalCore::MemoryCalendar::MemoryCalendar ( const QString &  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.

The constructor also calls setViewTimeZoneId(timeZoneId).

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 clock time. Example: "Europe/Berlin"
KCalCore::MemoryCalendar::~MemoryCalendar ( )

Destroys the calendar.

Member Function Documentation

bool KCalCore::MemoryCalendar::addEvent ( const Event::Ptr &  event)
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()

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::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 from KCalCore::Calendar.

bool KCalCore::MemoryCalendar::addJournal ( const Journal::Ptr &  journal)
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()

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::addTodo ( const Todo::Ptr &  todo)
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()

Implements KCalCore::Calendar.

Alarm::List KCalCore::MemoryCalendar::alarms ( const KDateTime &  from,
const KDateTime &  to 
) const
virtual

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

Parameters
fromis the starting timestamp.
tois the ending timestamp.
Returns
the list of Alarms for the for the specified time range.

Implements KCalCore::Calendar.

Alarm::List KCalCore::MemoryCalendar::alarmsTo ( const KDateTime &  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 KDateTime.
void KCalCore::MemoryCalendar::close ( )
virtual

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

etc.

Implements KCalCore::Calendar.

void KCalCore::MemoryCalendar::deleteAllEvents ( )
virtual

Removes all Events from the calendar.

See also
deleteEvent() TODO_KDE5: Remove these methods. They are dangerous and don't add value.

Implements KCalCore::Calendar.

void KCalCore::MemoryCalendar::deleteAllJournals ( )
virtual

Removes all Journals from the calendar.

See also
deleteJournal()

Implements KCalCore::Calendar.

void KCalCore::MemoryCalendar::deleteAllTodos ( )
virtual

Removes all To-dos from the calendar.

See also
deleteTodo()

Implements KCalCore::Calendar.

Event::Ptr KCalCore::MemoryCalendar::deletedEvent ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
virtual

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

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

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

Journal::Ptr KCalCore::MemoryCalendar::deletedJournal ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
virtual

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

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

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

Todo::Ptr KCalCore::MemoryCalendar::deletedTodo ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
virtual

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

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

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

bool KCalCore::MemoryCalendar::deleteEvent ( const Event::Ptr &  event)
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(), deleteAllEvents()

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteEventInstances ( const Event::Ptr &  event)
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

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::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 from KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteIncidenceInstances ( const Incidence::Ptr &  incidence)
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

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteJournal ( const Journal::Ptr &  journal)
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(), deleteAllJournals()

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteJournalInstances ( const Journal::Ptr &  journal)
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

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteTodo ( const Todo::Ptr &  todo)
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(), deleteAllTodos()

Implements KCalCore::Calendar.

bool KCalCore::MemoryCalendar::deleteTodoInstances ( const Todo::Ptr &  todo)
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

Implements KCalCore::Calendar.

Event::Ptr KCalCore::MemoryCalendar::event ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
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.

Implements KCalCore::Calendar.

Event::List KCalCore::MemoryCalendar::eventInstances ( const Incidence::Ptr &  event,
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
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.

Implements KCalCore::Calendar.

void KCalCore::MemoryCalendar::incidenceUpdate ( const QString &  uid,
const KDateTime &  recurrenceId 
)
virtual

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 KCalCore::IncidenceBase::IncidenceObserver.

void KCalCore::MemoryCalendar::incidenceUpdated ( const QString &  uid,
const KDateTime &  recurrenceId 
)
virtual

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

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

Returns an incidence by identifier.

See also
Incidence::instanceIdentifier()
Since
4.11
Journal::Ptr KCalCore::MemoryCalendar::journal ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
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.

Implements KCalCore::Calendar.

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

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

Event::List KCalCore::MemoryCalendar::rawEvents ( EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
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.

Implements KCalCore::Calendar.

Event::List KCalCore::MemoryCalendar::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
bool  inclusive = false 
) const
virtual

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

Parameters
startis the starting date
endis the ending date
timeSpectime zone etc. to interpret start and end, or the calendar's default time spec 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 KCalCore::Calendar.

Event::List KCalCore::MemoryCalendar::rawEventsForDate ( const QDate &  date,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
virtual

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

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

Implements KCalCore::Calendar.

Event::List KCalCore::MemoryCalendar::rawEventsForDate ( const KDateTime &  dt) const
virtual

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

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

Implements KCalCore::Calendar.

Journal::List KCalCore::MemoryCalendar::rawJournals ( JournalSortField  sortField = JournalSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
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.

Implements KCalCore::Calendar.

Journal::List KCalCore::MemoryCalendar::rawJournalsForDate ( const QDate &  date) const
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.

Implements KCalCore::Calendar.

Todo::List KCalCore::MemoryCalendar::rawTodos ( TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
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.

Implements KCalCore::Calendar.

Todo::List KCalCore::MemoryCalendar::rawTodos ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
bool  inclusive = false 
) const
virtual

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

Parameters
startis the starting date
endis the ending date
timespectime zone etc. to interpret start and end, or the calendar's default time spec 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 KCalCore::Calendar.

Todo::List KCalCore::MemoryCalendar::rawTodosForDate ( const QDate &  date) const
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.

Implements KCalCore::Calendar.

Todo::Ptr KCalCore::MemoryCalendar::todo ( const QString &  uid,
const KDateTime &  recurrenceId = KDateTime() 
) const
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.

Implements KCalCore::Calendar.

Todo::List KCalCore::MemoryCalendar::todoInstances ( const Incidence::Ptr &  todo,
TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) const
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.

Implements KCalCore::Calendar.

virtual void KCalCore::MemoryCalendar::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

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. TODO_KDE5: change from int to VirtualHook type.

Reimplemented from KCalCore::Calendar.


The documentation for this class was generated from the following file:
  • memorycalendar.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal