libkcal

KCal::CalendarNull Class Reference

This is a null calendar class which does nothing. More...

#include <calendarnull.h>

Inheritance diagram for KCal::CalendarNull:

List of all members.


Public Member Functions

bool addEvent (Event *)
bool addJournal (Journal *)
bool addTodo (Todo *)
Alarm::List alarms (const QDateTime &, const QDateTime &)
 CalendarNull (const QString &timeZoneId)
void close ()
bool deleteEvent (Event *)
bool deleteJournal (Journal *)
bool deleteTodo (Todo *)
Eventevent (const QString &)
void incidenceUpdated (IncidenceBase *)
Journaljournal (const QString &)
Event::List rawEvents (const QDate &, const QDate &, bool)
Event::List rawEvents (EventSortField, SortDirection)
Event::List rawEventsForDate (const QDate &, EventSortField, SortDirection)
Event::List rawEventsForDate (const QDateTime &)
Journal::List rawJournals (JournalSortField, SortDirection)
Journal::List rawJournalsForDate (const QDate &)
Todo::List rawTodos (TodoSortField, SortDirection)
Todo::List rawTodosForDate (const QDate &)
bool reload (const QString &)
void save ()
void setTimeZoneIdViewOnly (const QString &)
Todotodo (const QString &)
 ~CalendarNull ()

Static Public Member Functions

static CalendarNullself ()

Detailed Description

This is a null calendar class which does nothing.

It can be passed to functions which need a calendar object when there actually isn't a real calendar yet. CalendarNull can be used to implement the null object design pattern. Instead of passing a 0 pointer and checking for 0 with each access a CalendarNull object can be passed.

Definition at line 50 of file calendarnull.h.


Constructor & Destructor Documentation

CalendarNull::CalendarNull ( const QString timeZoneId  ) 

Constructor.

Definition at line 31 of file calendarnull.cpp.

KCal::CalendarNull::~CalendarNull (  )  [inline]

Destructor.

Definition at line 61 of file calendarnull.h.


Member Function Documentation

bool KCal::CalendarNull::addEvent ( Event  )  [inline, virtual]

Insert an Evenet into the Calendar.

First parameter is a pointer to the Event to insert.

Returns false.

Implements KCal::Calendar.

Definition at line 90 of file calendarnull.h.

bool KCal::CalendarNull::addJournal ( Journal  )  [inline, virtual]

Insert a Journal into the Calendar.

First parameter is a pointer to the Journal to insert.

Returns false.

Implements KCal::Calendar.

Definition at line 231 of file calendarnull.h.

bool KCal::CalendarNull::addTodo ( Todo  )  [inline, virtual]

Insert a Todo into the Calendar.

First parameter is a pointer to the Todo to insert.

Returns false.

Implements KCal::Calendar.

Definition at line 176 of file calendarnull.h.

Alarm::List KCal::CalendarNull::alarms ( const QDateTime ,
const QDateTime  
) [inline, virtual]

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

First parameter is the starting timestamp.
Second parameter is the ending timestamp.

Returns an empty Alarm List.

Implements KCal::Calendar.

Definition at line 287 of file calendarnull.h.

void KCal::CalendarNull::close (  )  [inline, virtual]

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

Implements KCal::Calendar.

Definition at line 72 of file calendarnull.h.

bool KCal::CalendarNull::deleteEvent ( Event  )  [inline, virtual]

Remove an Event from the Calendar.

First parameter is a pointer to the Event to remove.

Returns false.

Implements KCal::Calendar.

Definition at line 100 of file calendarnull.h.

bool KCal::CalendarNull::deleteJournal ( Journal  )  [inline, virtual]

Remove a Journal from the Calendar.

First parameter is a pointer to the Journal to remove.

Returns false.

Implements KCal::Calendar.

Definition at line 241 of file calendarnull.h.

bool KCal::CalendarNull::deleteTodo ( Todo  )  [inline, virtual]

Remove a Todo from the Calendar.

First parameter is a pointer to the Todo to remove.

Returns false.

Implements KCal::Calendar.

Definition at line 186 of file calendarnull.h.

Event* KCal::CalendarNull::event ( const QString  )  [inline, virtual]

Returns the Event associated with the given unique identifier.

First parameter is a unique identifier string.

Return a null Event pointer.

Implements KCal::Calendar.

Definition at line 164 of file calendarnull.h.

void KCal::CalendarNull::incidenceUpdated ( IncidenceBase  )  [inline, virtual]

The Observer interface.

So far not implemented. First parameter is a pointer an IncidenceBase object.

Reimplemented from KCal::Calendar.

Definition at line 296 of file calendarnull.h.

Journal* KCal::CalendarNull::journal ( const QString  )  [inline, virtual]

Returns the Journal associated with the given unique identifier.

First parameter is a unique identifier string.

Returns an null Journal pointer.

Implements KCal::Calendar.

Definition at line 273 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEvents ( const QDate ,
const QDate ,
bool   
) [inline, virtual]

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

First parameter is the starting date.
Second parameter is the ending date.
Third parameter, if true, specifies that only Events which are completely included within the date range are returned.

Returns an empty Event List.

Implements KCal::Calendar.

Definition at line 125 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEvents ( EventSortField  ,
SortDirection   
) [inline, virtual]

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

First parameter specifies the EventSortField.
Second parameter specifies the SortDirection.

Returns an empty Event List.

Implements KCal::Calendar.

Definition at line 111 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEventsForDate ( const QDate ,
EventSortField  ,
SortDirection   
) [inline, virtual]

Return a sorted, unfiltered list of all Events which occur on the given date.

The Events are sorted according to sortField and sortDirection.

First parameter is a QDate to return unfiltered Events for.
Second parameter specifies the EventSortField.
Third parameter specifies the SortDirection.

Returns an empty Event List.

Implements KCal::Calendar.

Definition at line 151 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEventsForDate ( const QDateTime  )  [inline, virtual]

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

First parameter is a QDateTime to return unfiltered events for.

Returns an empty Event List.

Implements KCal::Calendar.

Definition at line 137 of file calendarnull.h.

Journal::List KCal::CalendarNull::rawJournals ( JournalSortField  ,
SortDirection   
) [inline, virtual]

Return a sorted, filtered list of all Journals for this Calendar.

First parameter specifies the JournalSortField.
Second parameterd specifies the SortDirection.

Returns an empty Journal List.

Implements KCal::Calendar.

Definition at line 252 of file calendarnull.h.

Journal::List KCal::CalendarNull::rawJournalsForDate ( const QDate  )  [inline, virtual]

Return an unfiltered list of all Journals for on the specifed date.

First parameter specifies the data to return the unfiltered Journals for.

Returns an empty Journal List.

Implements KCal::Calendar.

Definition at line 263 of file calendarnull.h.

Todo::List KCal::CalendarNull::rawTodos ( TodoSortField  ,
SortDirection   
) [inline, virtual]

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

First parameter specifies the TodoSortField.
Second parameter specifies the SortDirection.

Returns an empty Todo List.

Implements KCal::Calendar.

Definition at line 197 of file calendarnull.h.

Todo::List KCal::CalendarNull::rawTodosForDate ( const QDate  )  [inline, virtual]

Return an unfiltered list of all Todos for this Calendar which are due on the specifed date.

First parameter is the due date to return unfiltered Todos for.

Returns an empty Todo List.

Implements KCal::Calendar.

Definition at line 209 of file calendarnull.h.

bool KCal::CalendarNull::reload ( const QString tz  )  [inline, virtual]

Load the calendar contents from storage.

This requires the calendar to have been loaded once before, in other words initialized.

tz The timezone to use for loading.

Implements KCal::Calendar.

Definition at line 79 of file calendarnull.h.

void KCal::CalendarNull::save (  )  [inline, virtual]

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

Definition at line 77 of file calendarnull.h.

CalendarNull * CalendarNull::self (  )  [static]

Returns a pointer to a CalendarNull object, which is constructed if necessary.

Definition at line 37 of file calendarnull.cpp.

void KCal::CalendarNull::setTimeZoneIdViewOnly ( const QString timeZoneId  )  [inline, virtual]

Set the timezone used for viewing the incidences in this calendar.

In case it differs from the current timezone, shift the events such that they retain their absolute time (in UTC). setTimeZoneId

Implements KCal::Calendar.

Definition at line 298 of file calendarnull.h.

Todo* KCal::CalendarNull::todo ( const QString  )  [inline, virtual]

Returns the Todo associated with the given unique identifier.

First parameter is a unique identifier string.

Returns a null Todo pointer.

Implements KCal::Calendar.

Definition at line 219 of file calendarnull.h.


The documentation for this class was generated from the following files: