• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

KCal::CalendarNull

KCal::CalendarNull Class Reference

Represents a null calendar class; that is, a calendar which contains no information and provides no capabilities. More...

#include <calendarnull.h>

Inheritance diagram for KCal::CalendarNull:

Inheritance graph
[legend]

List of all members.


Public Member Functions

bool addEvent (Event *event)
bool addJournal (Journal *journal)
bool addTodo (Todo *todo)
Alarm::List alarms (const KDateTime &from, const KDateTime &to)
 CalendarNull (const QString &timeZoneId)
 CalendarNull (const KDateTime::Spec &timeSpec)
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 (const QDate &start, const QDate &end, const KDateTime::Spec &timespec=KDateTime::Spec(), bool inclusive=false)
Event::List rawEvents (EventSortField sortField, SortDirection sortDirection)
Event::List rawEventsForDate (const KDateTime &dt)
Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timespec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
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)
 ~CalendarNull ()

Static Public Member Functions

static CalendarNull * self ()

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

CalendarNull::CalendarNull ( const KDateTime::Spec &  timeSpec  )  [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

For internal use only.

Definition at line 47 of file calendarnull.cpp.

CalendarNull::CalendarNull ( const QString &  timeZoneId  )  [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

bool CalendarNull::addEvent ( Event *  event  )  [virtual]

Inserts an Event into the calendar.

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.

bool CalendarNull::addJournal ( Journal *  journal  )  [virtual]

Inserts a Journal into the calendar.

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.

bool CalendarNull::addTodo ( Todo *  todo  )  [virtual]

Inserts a Todo into the calendar.

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.

Alarm::List CalendarNull::alarms ( const KDateTime &  from,
const KDateTime &  to 
) [virtual]

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

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.

void CalendarNull::close (  )  [virtual]

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

Implements KCal::Calendar.

Definition at line 71 of file calendarnull.cpp.

void CalendarNull::deleteAllEvents (  )  [virtual]

Removes all Events from the calendar.

See also:
deleteEvent()

Implements KCal::Calendar.

Definition at line 97 of file calendarnull.cpp.

void CalendarNull::deleteAllJournals (  )  [virtual]

Removes all Journals from the calendar.

See also:
deleteJournal()

Implements KCal::Calendar.

Definition at line 192 of file calendarnull.cpp.

void CalendarNull::deleteAllTodos (  )  [virtual]

Removes all To-dos from the calendar.

See also:
deleteTodo()

Implements KCal::Calendar.

Definition at line 156 of file calendarnull.cpp.

bool CalendarNull::deleteEvent ( Event *  event  )  [virtual]

Removes an Event from the calendar.

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.

bool CalendarNull::deleteJournal ( Journal *  journal  )  [virtual]

Removes a Journal from the calendar.

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.

bool CalendarNull::deleteTodo ( Todo *  todo  )  [virtual]

Removes a Todo from the calendar.

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.

Event * CalendarNull::event ( const QString &  uid  )  [virtual]

Returns the Event associated with the given unique identifier.

Parameters:
uid is a unique identifier string.
Returns:
a pointer to the Event. A null pointer is returned if no such Event exists.

Implements KCal::Calendar.

Definition at line 138 of file calendarnull.cpp.

void CalendarNull::incidenceUpdated ( IncidenceBase *  incidenceBase  )  [virtual]

The Observer interface.

So far not implemented.

Parameters:
incidenceBase is a pointer an IncidenceBase object.

Reimplemented from KCal::Calendar.

Definition at line 223 of file calendarnull.cpp.

Journal * CalendarNull::journal ( const QString &  uid  )  [virtual]

Returns the Journal associated with the given unique identifier.

Parameters:
uid is a unique identifier string.
Returns:
a pointer to the Journal. A null pointer is returned if no such Journal exists.

Implements KCal::Calendar.

Definition at line 210 of file calendarnull.cpp.

Event::List CalendarNull::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
bool  inclusive = false 
) [virtual]

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

Parameters:
start is the starting date
end is the ending date
timespec time zone etc. to interpret start and end, or the calendar's default time spec if none is specified
inclusive 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.

Event::List CalendarNull::rawEvents ( EventSortField  sortField,
SortDirection  sortDirection 
) [virtual]

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

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.

Event::List CalendarNull::rawEventsForDate ( const KDateTime &  dt  )  [virtual]

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

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.

Event::List CalendarNull::rawEventsForDate ( const QDate &  date,
const KDateTime::Spec &  timespec = KDateTime::Spec(),
EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending 
) [virtual]

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

Parameters:
dt request unfiltered Event list for this KDateTime only.
Returns:
the list of unfiltered Events occurring on the specified timestamp.
(const QDate &, const KDateTime::Spec &, EventSortField, SortDirection)

Implements KCal::Calendar.

Definition at line 120 of file calendarnull.cpp.

Journal::List CalendarNull::rawJournals ( JournalSortField  sortField,
SortDirection  sortDirection 
) [virtual]

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

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.

Journal::List CalendarNull::rawJournalsForDate ( const QDate &  date  )  [virtual]

Returns an unfiltered list of all Journals for on the specified date.

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.

Todo::List CalendarNull::rawTodos ( TodoSortField  sortField,
SortDirection  sortDirection 
) [virtual]

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

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.

Todo::List CalendarNull::rawTodosForDate ( const QDate &  date  )  [virtual]

Returns an unfiltered list of all Todos which due on the specified date.

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.

bool CalendarNull::reload (  )  [virtual]

Loads the calendar contents from storage.

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.

bool CalendarNull::save (  )  [virtual]

Syncs changes in memory to persistent storage.

Returns:
true if the save was successful; false otherwise.

Implements KCal::Calendar.

Definition at line 75 of file calendarnull.cpp.

CalendarNull * CalendarNull::self (  )  [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.

Todo * CalendarNull::todo ( const QString &  uid  )  [virtual]

Returns the Todo associated with the given unique identifier.

Parameters:
uid is a unique identifier string.
Returns:
a pointer to the Todo. A null pointer is returned if no such Todo exists.

Implements KCal::Calendar.

Definition at line 174 of file calendarnull.cpp.


The documentation for this class was generated from the following files:
  • calendarnull.h
  • calendarnull.cpp

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal