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

KCal Library

  • KCal
  • CalendarNull
Public Member Functions | Static Public Member Functions
KCal::CalendarNull Class Reference

#include <calendarnull.h>

Inheritance diagram for KCal::CalendarNull:
Inheritance graph
[legend]

List of all members.

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)

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:
timeSpectime specification

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

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]

Parameters:
eventis 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]

Parameters:
journalis 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]

Parameters:
todois 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]

Parameters:
fromis the starting timestamp.
tois 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]

Implements KCal::Calendar.

Definition at line 71 of file calendarnull.cpp.

void CalendarNull::deleteAllEvents ( ) [virtual]

See also:
deleteEvent()

Implements KCal::Calendar.

Definition at line 97 of file calendarnull.cpp.

void CalendarNull::deleteAllJournals ( ) [virtual]

See also:
deleteJournal()

Implements KCal::Calendar.

Definition at line 192 of file calendarnull.cpp.

void CalendarNull::deleteAllTodos ( ) [virtual]

See also:
deleteTodo()

Implements KCal::Calendar.

Definition at line 156 of file calendarnull.cpp.

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

Parameters:
eventis 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]

Parameters:
journalis 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]

Parameters:
todois 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]

Parameters:
uidis 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]

So far not implemented.

 @param 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]

Parameters:
uidis 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 ( EventSortField  sortField,
SortDirection  sortDirection 
) [virtual]

Parameters:
sortFieldspecifies the EventSortField.
sortDirectionspecifies 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::rawEvents ( const QDate &  start,
const QDate &  end,
const KDateTime::Spec &  timeSpec = KDateTime::Spec(),
bool  inclusive = false 
) [virtual]

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

Definition at line 109 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 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 KCal::Calendar.

Definition at line 120 of file calendarnull.cpp.

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

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

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

Parameters:
sortFieldspecifies the JournalSortField.
sortDirectionspecifies 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]

Parameters:
daterequest 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]

Parameters:
sortFieldspecifies the TodoSortField.
sortDirectionspecifies 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]

Parameters:
daterequest 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]

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]

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]

Parameters:
uidis 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
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Tue May 8 2012 00:03:22 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

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

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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