libkcal

KCal::CalendarNull Class Reference

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

#include <calendarnull.h>

Inheritance diagram for KCal::CalendarNull:
KCal::Calendar KCal::CustomProperties

List of all members.

Public Member Functions

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

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 TQString &  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 105 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 246 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 191 of file calendarnull.h.

Alarm::List KCal::CalendarNull::alarms ( const TQDateTime &  ,
const TQDateTime &   
) [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 302 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.

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

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

Implements KCal::Calendar.

Definition at line 77 of file calendarnull.h.

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

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

Implements KCal::Calendar.

Definition at line 87 of file calendarnull.h.

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

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

Implements KCal::Calendar.

Definition at line 82 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 115 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 256 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 201 of file calendarnull.h.

Event* KCal::CalendarNull::event ( const TQString &   )  [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 179 of file calendarnull.h.

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

The Observer interface.

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

Reimplemented from KCal::Calendar.

Definition at line 311 of file calendarnull.h.

Journal* KCal::CalendarNull::journal ( const TQString &   )  [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 288 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 126 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEvents ( const TQDate &  ,
const TQDate &  ,
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 140 of file calendarnull.h.

Event::List KCal::CalendarNull::rawEventsForDate ( const TQDate &  ,
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 TQDate 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 166 of file calendarnull.h.

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

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

First parameter is a TQDateTime to return unfiltered events for.

Returns an empty Event List.

Implements KCal::Calendar.

Definition at line 152 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 267 of file calendarnull.h.

Journal::List KCal::CalendarNull::rawJournalsForDate ( const TQDate &   )  [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 278 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 212 of file calendarnull.h.

Todo::List KCal::CalendarNull::rawTodosForDate ( const TQDate &   )  [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 224 of file calendarnull.h.

bool KCal::CalendarNull::reload ( const TQString &  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 94 of file calendarnull.h.

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

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

Definition at line 92 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 TQString &  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 313 of file calendarnull.h.

Todo* KCal::CalendarNull::todo ( const TQString &   )  [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 234 of file calendarnull.h.


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