KCal Library
#include <calendarlocal.h>

Public Member Functions | |
CalendarLocal (const KDateTime::Spec &timeSpec) | |
CalendarLocal (const QString &timeZoneId) | |
~CalendarLocal () | |
bool | addEvent (Event *event) |
bool | addJournal (Journal *journal) |
bool | addTodo (Todo *todo) |
Alarm::List | alarms (const KDateTime &from, const KDateTime &to) |
Alarm::List | alarmsTo (const KDateTime &to) |
void | close () |
void | deleteAllEvents () |
void | deleteAllJournals () |
void | deleteAllTodos () |
bool | deleteEvent (Event *event) |
bool | deleteJournal (Journal *journal) |
bool | deleteTodo (Todo *todo) |
Event * | event (const QString &uid) |
void | incidenceUpdated (IncidenceBase *incidenceBase) |
Journal * | journal (const QString &uid) |
bool | load (const QString &fileName, CalFormat *format=0) |
Event::List | rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false) |
Event::List | rawEventsForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const KDateTime &dt) |
Journal::List | rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Journal::List | rawJournalsForDate (const QDate &date) |
Todo::List | rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Todo::List | rawTodosForDate (const QDate &date) |
bool | reload () |
bool | save () |
bool | save (const QString &fileName, CalFormat *format=0) |
Todo * | todo (const QString &uid) |
![]() | |
Calendar (const KDateTime::Spec &timeSpec) | |
Calendar (const QString &timeZoneId) | |
virtual | ~Calendar () |
virtual bool | addIncidence (Incidence *incidence) |
void | beginBatchAdding () |
virtual bool | beginChange (Incidence *incidence) |
QStringList | categories () |
virtual bool | deleteIncidence (Incidence *incidence) |
Incidence * | dissociateOccurrence (Incidence *incidence, const QDate &date, const KDateTime::Spec &spec, bool single=true) |
void | endBatchAdding () |
virtual bool | endChange (Incidence *incidence) |
virtual Event::List | events (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | events (const KDateTime &dt) |
Event::List | events (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false) |
Event::List | events (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
CalFilter * | filter () |
Incidence * | incidence (const QString &uid) |
Incidence * | incidenceFromSchedulingID (const QString &sid) |
virtual Incidence::List | incidences () |
virtual Incidence::List | incidences (const QDate &date) |
Incidence::List | incidencesFromSchedulingID (const QString &sid) |
bool | isAncestorOf (Incidence *ancestor, Incidence *incidence) |
bool | isModified () const |
virtual bool | isSaving () |
virtual Journal::List | journals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
virtual Journal::List | journals (const QDate &date) |
Person | owner () const |
QString | productId () const |
virtual Incidence::List | rawIncidences () |
void | registerObserver (CalendarObserver *observer) |
virtual void | removeRelations (Incidence *incidence) |
void | setFilter (CalFilter *filter) |
void | setModified (bool modified) |
void | setOwner (const Person &owner) |
void | setProductId (const QString &id) |
void | setTimeSpec (const KDateTime::Spec &timeSpec) |
void | setTimeZoneId (const QString &timeZoneId) |
void | setTimeZones (const ICalTimeZones &zones) |
virtual void | setupRelations (Incidence *incidence) |
void | setViewTimeSpec (const KDateTime::Spec &timeSpec) const |
void | setViewTimeZoneId (const QString &timeZoneId) const |
void | shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec) |
KDateTime::Spec | timeSpec () const |
QString | timeZoneId () const |
ICalTimeZones * | timeZones () const |
virtual Todo::List | todos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
virtual Todo::List | todos (const QDate &date) |
void | unregisterObserver (CalendarObserver *observer) |
KDateTime::Spec | viewTimeSpec () const |
QString | viewTimeZoneId () const |
![]() | |
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 |
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) |
![]() | |
virtual | ~IncidenceObserver () |
Detailed Description
This class provides a calendar stored as a local file.
Definition at line 43 of file calendarlocal.h.
Constructor & Destructor Documentation
|
explicit |
Private class that helps to provide binary compatibility between releases.
Private class that helps to provide binary compatibility between releases.
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
-
timeSpec time specification
Definition at line 97 of file calendarlocal.cpp.
|
explicit |
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
-
timeZoneId is 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"
Definition at line 103 of file calendarlocal.cpp.
CalendarLocal::~CalendarLocal | ( | ) |
Definition at line 109 of file calendarlocal.cpp.
Member Function Documentation
|
virtual |
- Parameters
-
event is a pointer to the Event to insert.
- Returns
- true if the Event was successfully inserted; false otherwise.
- See Also
- deleteEvent()
Implements KCal::Calendar.
Definition at line 172 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
journal is a pointer to the Journal to insert.
- Returns
- true if the Journal was successfully inserted; false otherwise.
- See Also
- deleteJournal()
Implements KCal::Calendar.
Definition at line 553 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
todo is a pointer to the Todo to insert.
- Returns
- true if the Todo was successfully inserted; false otherwise.
- See Also
- deleteTodo()
Implements KCal::Calendar.
Definition at line 222 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
from is the starting timestamp. to is the ending timestamp.
- Returns
- the list of Alarms for the for the specified time range.
Implements KCal::Calendar.
Definition at line 329 of file calendarlocal.cpp.
Alarm::List CalendarLocal::alarmsTo | ( | const KDateTime & | to | ) |
Return a list of Alarms that occur before the specified timestamp.
- Parameters
-
to is the ending timestamp.
- Returns
- the list of Alarms occurring before the specified KDateTime.
Definition at line 324 of file calendarlocal.cpp.
|
virtual |
Clears out the current calendar, freeing all used memory etc.
etc.
Implements KCal::Calendar.
Definition at line 158 of file calendarlocal.cpp.
|
virtual |
|
virtual |
- See Also
- deleteJournal()
Implements KCal::Calendar.
Definition at line 597 of file calendarlocal.cpp.
|
virtual |
|
virtual |
- Parameters
-
event is a pointer to the Event to remove.
- Returns
- true if the Event was successfully remove; false otherwise.
- See Also
- addEvent(), deleteAllEvents()
Implements KCal::Calendar.
Definition at line 185 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
journal is a pointer to the Journal to remove.
- Returns
- true if the Journal was successfully removed; false otherwise.
- See Also
- addJournal(), deleteAllJournals()
Implements KCal::Calendar.
Definition at line 583 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
todo is a pointer to the Todo to remove.
- Returns
- true if the Todo was successfully removed; false otherwise.
- See Also
- addTodo(), deleteAllTodos()
Implements KCal::Calendar.
Definition at line 258 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 217 of file calendarlocal.cpp.
|
virtual |
Notify the IncidenceBase::Observer that the incidence has been updated.
- Parameters
-
incidenceBase is a pointer to the updated IncidenceBase.
Reimplemented from KCal::Calendar.
Definition at line 380 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 612 of file calendarlocal.cpp.
bool CalendarLocal::load | ( | const QString & | fileName, |
CalFormat * | format = 0 |
||
) |
Loads a calendar on disk in vCalendar or iCalendar format into the current calendar.
Incidences already present are preserved. If an incidence of the file to be loaded has the same unique id as an incidence already present the new incidence is ignored.
To load a CalendarLocal object from a file without preserving existing incidences call close() before load().
- Parameters
-
fileName the name of the calendar on disk. format the format to use. If 0, an attempt is made to load iCalendar format, and if that fails tries vCalendar format.
- Returns
- true, if successful, false on error.
Definition at line 115 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Events sorted as specified.
Implements KCal::Calendar.
Definition at line 541 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
start is the starting date end is the ending date timeSpec time zone etc. to interpret start
andend
, or the calendar's default time spec if none is specifiedinclusive if 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 KCal::Calendar.
Definition at line 476 of file calendarlocal.cpp.
|
virtual |
Returns an unfiltered list of all Events which occur on the given date.
- Parameters
-
date request unfiltered Event list for this QDate only. timeSpec time zone etc. to interpret date
, or the calendar's default time spec if none is specifiedsortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of unfiltered Events occurring on the specified QDate.
Implements KCal::Calendar.
Definition at line 417 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
dt request unfiltered Event list for this KDateTime only.
- Returns
- the list of unfiltered Events occurring on the specified timestamp.
Implements KCal::Calendar.
Definition at line 536 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Journals sorted as specified.
Implements KCal::Calendar.
Definition at line 617 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
date request unfiltered Journals for this QDate only.
- Returns
- the list of unfiltered Journals for the specified date.
Implements KCal::Calendar.
Definition at line 629 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Todos sorted as specified.
Implements KCal::Calendar.
Definition at line 297 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
date request unfiltered Todos due on this QDate.
- Returns
- the list of unfiltered Todos due on the specified date.
Implements KCal::Calendar.
Definition at line 309 of file calendarlocal.cpp.
|
virtual |
Reloads the contents of the storage into memory.
The associated file name must be known, in other words a previous load() must have been executed.
- Returns
- true if the reload was successful; false otherwise.
Implements KCal::Calendar.
Definition at line 122 of file calendarlocal.cpp.
|
virtual |
Writes the calendar to disk.
The associated file name and format must be known, in other words a previous load() must have been executed.
- Returns
- true if the save was successful; false otherwise.
Implements KCal::Calendar.
Definition at line 132 of file calendarlocal.cpp.
bool CalendarLocal::save | ( | const QString & | fileName, |
CalFormat * | format = 0 |
||
) |
Writes the calendar to disk in the specified format
.
CalendarLocal takes ownership of the CalFormat object.
- Parameters
-
fileName the name of the file format the format to use. If 0, iCalendar will be used.
- Returns
- true if the save was successful; false otherwise.
Definition at line 146 of file calendarlocal.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 292 of file calendarlocal.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:29:18 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.