KCal Library
#include <calendarnull.h>

Public Member Functions | |
CalendarNull (const KDateTime::Spec &timeSpec) | |
CalendarNull (const QString &timeZoneId) | |
~CalendarNull () | |
bool | addEvent (Event *event) |
bool | addJournal (Journal *journal) |
bool | addTodo (Todo *todo) |
Alarm::List | alarms (const KDateTime &from, 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) |
Event::List | rawEvents (EventSortField sortField, SortDirection sortDirection) |
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, SortDirection sortDirection) |
Journal::List | rawJournalsForDate (const QDate &date) |
Todo::List | rawTodos (TodoSortField sortField, SortDirection sortDirection) |
Todo::List | rawTodosForDate (const QDate &date) |
bool | reload () |
bool | save () |
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 () |
Static Public Member Functions | |
static CalendarNull * | self () |
![]() | |
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 Event::List | sortEventsForDate (Event::List *eventList, const QDate &date, const KDateTime::Spec &timeSpec, 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 QByteArray | customPropertyName (const QByteArray &app, const QByteArray &key) |
Additional Inherited Members | |
![]() | |
void | batchAddingBegins () |
void | batchAddingEnds () |
void | calendarChanged () |
void | calendarLoaded () |
void | calendarSaved () |
![]() | |
void | appendAlarms (Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to) |
void | appendRecurringAlarms (Alarm::List &alarms, Incidence *incidence, const KDateTime &from, const KDateTime &to) |
virtual void | customPropertyUpdated () |
virtual void | doSetTimeSpec (const KDateTime::Spec &timeSpec) |
void | notifyIncidenceAdded (Incidence *incidence) |
void | notifyIncidenceChanged (Incidence *incidence) |
void | notifyIncidenceDeleted (Incidence *incidence) |
void | setObserversEnabled (bool enabled) |
Detailed Description
Represents a null calendar class; that is, a calendar which contains no information and provides no capabilities.
The null calendar can be passed to functions which need a calendar object when there is no real calendar available yet.
CalendarNull can be used to implement the null object design pattern: pass a CalendarNull object instead of passing a 0 pointer and checking for 0 with each access.
Definition at line 48 of file calendarnull.h.
Constructor & Destructor Documentation
|
explicit |
Construct Calendar object using a time specification (time zone, etc.).
Private class that helps to provide binary compatibility between releases.
The time specification is used for creating or modifying incidences in the Calendar. It is also used for viewing incidences (see setViewTimeSpec()). The time specification does not alter existing incidences.
- Parameters
-
timeSpec time specification
Definition at line 47 of file calendarnull.cpp.
|
explicit |
Constructs a null calendar with a specified time zone 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 52 of file calendarnull.cpp.
CalendarNull::~CalendarNull | ( | ) |
Destroys the null calendar.
Definition at line 57 of file calendarnull.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 85 of file calendarnull.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 180 of file calendarnull.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 144 of file calendarnull.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 216 of file calendarnull.cpp.
|
virtual |
Implements KCal::Calendar.
Definition at line 71 of file calendarnull.cpp.
|
virtual |
|
virtual |
|
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 91 of file calendarnull.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 186 of file calendarnull.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 150 of file calendarnull.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 138 of file calendarnull.cpp.
|
virtual |
So far not implemented.
- Parameters
-
incidenceBase is a pointer an IncidenceBase object.
Reimplemented from KCal::Calendar.
Definition at line 223 of file calendarnull.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 210 of file calendarnull.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 101 of file calendarnull.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 109 of file calendarnull.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 120 of file calendarnull.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 132 of file calendarnull.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 196 of file calendarnull.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 204 of file calendarnull.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 160 of file calendarnull.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 168 of file calendarnull.cpp.
|
virtual |
This requires that the calendar has been previously loaded (initialized).
- Returns
- true if the reload was successful; otherwise false.
Implements KCal::Calendar.
Definition at line 80 of file calendarnull.cpp.
|
virtual |
- Returns
- true if the save was successful; false otherwise.
Implements KCal::Calendar.
Definition at line 75 of file calendarnull.cpp.
|
static |
Returns a pointer to the CalendarNull object, of which there can be only one.
The object is constructed if necessary.
Definition at line 62 of file calendarnull.cpp.
|
virtual |
- Parameters
-
uid is a unique identifier string.
Implements KCal::Calendar.
Definition at line 174 of file calendarnull.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.