libkcal Library API Documentation

KCal::CalendarResources Class Reference

This class provides a calendar composed of several calendar resources. More...

#include <calendarresources.h>

Inheritance diagram for KCal::CalendarResources:

KCal::Calendar QObject KCal::CustomProperties List of all members.

Signals

void signalResourceAdded (ResourceCalendar *)
void signalResourceModified (ResourceCalendar *)
void signalResourceDeleted (ResourceCalendar *)

Public Methods

 CalendarResources ()
 CalendarResources (const QString &timeZoneId)
 ~CalendarResources ()
CalendarResourceManager * resourceManager () const
void setStandardDestinationPolicy ()
void setAskDestinationPolicy ()
void close ()
Ticket * requestSaveTicket (ResourceCalendar *)
virtual bool save (Ticket *)
virtual void releaseSaveTicket (Ticket *ticket)
void save ()
bool isSaving ()
bool addIncidence (Incidence *)
bool addEvent (Event *anEvent)
bool addEvent (Event *anEvent, ResourceCalendar *resource)
void deleteEvent (Event *)
Eventevent (const QString &UniqueStr)
Event::List rawEvents ()
QString getHolidayForDate (const QDate &qd)
bool addTodo (Todo *todo)
bool addTodo (Todo *todo, ResourceCalendar *resource)
void deleteTodo (Todo *)
Todotodo (const QString &uid)
Todo::List rawTodos ()
Todo::List todos (const QDate &date)
Todo::List todos ()
bool addJournal (Journal *)
void deleteJournal (Journal *)
bool addJournal (Journal *journal, ResourceCalendar *resource)
Journaljournal (const QDate &)
Journaljournal (const QString &UID)
Journal::List journals ()
Alarm::List alarms (const QDateTime &from, const QDateTime &to)
Alarm::List alarmsTo (const QDateTime &to)
ResourceCalendarresource (Incidence *)
bool beginChange (Incidence *)
bool endChange (Incidence *)

Protected Methods

void incidenceUpdated (IncidenceBase *)
Event::List rawEventsForDate (const QDate &date, bool sorted=false)
Event::List rawEventsForDate (const QDateTime &qdt)
Event::List rawEvents (const QDate &start, const QDate &end, bool inclusive=false)
void connectResource (ResourceCalendar *)
void resourceAdded (ResourceCalendar *resource)
void resourceModified (ResourceCalendar *resource)
void resourceDeleted (ResourceCalendar *resource)
virtual void doSetTimeZoneId (const QString &tzid)
int incrementChangeCount (ResourceCalendar *)
int decrementChangeCount (ResourceCalendar *)

Detailed Description

This class provides a calendar composed of several calendar resources.

Definition at line 41 of file calendarresources.h.


Constructor & Destructor Documentation

CalendarResources::CalendarResources  
 

constructs a new calendar that uses the ResourceManager for "calendar".

Definition at line 71 of file calendarresources.cpp.

CalendarResources::CalendarResources const QString   timeZoneId
 

constructs a new calendar, with variables initialized to sane values.

Definition at line 77 of file calendarresources.cpp.


Member Function Documentation

CalendarResourceManager* KCal::CalendarResources::resourceManager   const [inline]
 

Return ResourceManager used by this calendar.

Definition at line 114 of file calendarresources.h.

void CalendarResources::setStandardDestinationPolicy  
 

Set the destinatinpolicy to add incidences always to the standard resource.

Definition at line 128 of file calendarresources.cpp.

void CalendarResources::setAskDestinationPolicy  
 

Set the destinatinpolicy to ask to which resource incidences are added.

Definition at line 133 of file calendarresources.cpp.

void CalendarResources::close   [virtual]
 

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

etc.

Implements KCal::Calendar.

Definition at line 138 of file calendarresources.cpp.

CalendarResources::Ticket * CalendarResources::requestSaveTicket ResourceCalendar  
 

Request ticket for saving the calendar.

If a ticket is returned the calendar is locked for write access until save() or releaseSaveTicket() is called.

Definition at line 644 of file calendarresources.cpp.

References KCal::ResourceCalendar::lock().

bool CalendarResources::save Ticket *    [virtual]
 

Save calendar.

If save is successfull, the ticket is deleted. Otherwise the caller has to release the ticket with releaseSaveTicket() to abandon the save operation or to call save() to try to save again.

Definition at line 654 of file calendarresources.cpp.

References releaseSaveTicket().

void CalendarResources::releaseSaveTicket Ticket *    ticket [virtual]
 

Release the save ticket.

The calendar is unlocked without saving.

Definition at line 666 of file calendarresources.cpp.

Referenced by save().

void CalendarResources::save   [virtual]
 

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

Definition at line 153 of file calendarresources.cpp.

bool CalendarResources::addIncidence Incidence   [virtual]
 

Add an incidence to calendar.

Returns:
true on success, false on error.

Reimplemented from KCal::Calendar.

Definition at line 179 of file calendarresources.cpp.

References KCal::ResourceCalendar::addIncidence(), and resource().

Referenced by addEvent(), addJournal(), and addTodo().

bool CalendarResources::addEvent Event   anEvent [virtual]
 

Add Event to calendar.

Implements KCal::Calendar.

Definition at line 198 of file calendarresources.cpp.

References addIncidence().

bool CalendarResources::addEvent Event   anEvent,
ResourceCalendar   resource
 

Add Event to a resource.

Definition at line 203 of file calendarresources.cpp.

References KCal::ResourceCalendar::addEvent().

void CalendarResources::deleteEvent Event   [virtual]
 

deletes an event from this calendar.

Implements KCal::Calendar.

Definition at line 220 of file calendarresources.cpp.

References QMap< Incidence *, ResourceCalendar * >::end(), QMap< Incidence *, ResourceCalendar * >::find(), and QMap< Incidence *, ResourceCalendar * >::remove().

Event * CalendarResources::event const QString   UniqueStr [virtual]
 

Retrieves an event on the basis of the unique string ID.

Implements KCal::Calendar.

Definition at line 238 of file calendarresources.cpp.

References event().

Referenced by event().

Event::List CalendarResources::rawEvents   [virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::Calendar.

Definition at line 462 of file calendarresources.cpp.

bool CalendarResources::addTodo Todo   todo [virtual]
 

Add a todo to the todolist.

Implements KCal::Calendar.

Definition at line 256 of file calendarresources.cpp.

References addIncidence().

bool CalendarResources::addTodo Todo   todo,
ResourceCalendar   resource
 

Add Todo to a resource.

Definition at line 263 of file calendarresources.cpp.

References KCal::ResourceCalendar::addTodo().

void CalendarResources::deleteTodo Todo   [virtual]
 

Remove a todo from the todolist.

Implements KCal::Calendar.

Definition at line 280 of file calendarresources.cpp.

References QMap< Incidence *, ResourceCalendar * >::end(), QMap< Incidence *, ResourceCalendar * >::find(), and QMap< Incidence *, ResourceCalendar * >::remove().

Todo * CalendarResources::todo const QString   uid [virtual]
 

Searches todolist for an event with this unique string identifier, returns a pointer or null.

Implements KCal::Calendar.

Definition at line 321 of file calendarresources.cpp.

References todo().

Referenced by todo().

Todo::List CalendarResources::rawTodos   [virtual]
 

Return list of all todos.

Implements KCal::Calendar.

Definition at line 299 of file calendarresources.cpp.

References todos().

Todo::List CalendarResources::todos const QDate   date [virtual]
 

Returns list of todos due on the specified date.

Implements KCal::Calendar.

Definition at line 338 of file calendarresources.cpp.

References todos().

Referenced by rawTodos(), and todos().

Todo::List KCal::CalendarResources::todos   [inline, virtual]
 

Return list of all todos.

Workaround because compiler does not recognize function of base class.

Reimplemented from KCal::Calendar.

Definition at line 208 of file calendarresources.h.

bool CalendarResources::addJournal Journal   [virtual]
 

Add a Journal entry to calendar.

Implements KCal::Calendar.

Definition at line 480 of file calendarresources.cpp.

References addIncidence(), KCal::IncidenceBase::dtStart(), and QDateTime::toString().

void CalendarResources::deleteJournal Journal   [virtual]
 

Remove journal entry.

Implements KCal::Calendar.

Definition at line 487 of file calendarresources.cpp.

References QMap< Incidence *, ResourceCalendar * >::end(), QMap< Incidence *, ResourceCalendar * >::find(), and QMap< Incidence *, ResourceCalendar * >::remove().

bool CalendarResources::addJournal Journal   journal,
ResourceCalendar   resource
 

Add Event to a resource.

Definition at line 504 of file calendarresources.cpp.

References KCal::ResourceCalendar::addJournal().

Journal * CalendarResources::journal const QDate   [virtual]
 

Return Journal for given date.

Implements KCal::Calendar.

Definition at line 521 of file calendarresources.cpp.

References journal(), and QDate::toString().

Referenced by journal().

Journal * CalendarResources::journal const QString   UID [virtual]
 

Return Journal with given UID.

Implements KCal::Calendar.

Definition at line 549 of file calendarresources.cpp.

References journal().

Journal::List CalendarResources::journals   [virtual]
 

Return list of all Journals stored in calendar.

Implements KCal::Calendar.

Definition at line 566 of file calendarresources.cpp.

Alarm::List CalendarResources::alarms const QDateTime   from,
const QDateTime   to
[virtual]
 

Return all alarms, which ocur in the given time interval.

Implements KCal::Calendar.

Definition at line 373 of file calendarresources.cpp.

Alarm::List CalendarResources::alarmsTo const QDateTime   to
 

Return all alarms, which ocur before given date.

Definition at line 358 of file calendarresources.cpp.

ResourceCalendar * CalendarResources::resource Incidence  
 

Return Resource for given uid.

Definition at line 597 of file calendarresources.cpp.

References QMap< Incidence *, ResourceCalendar * >::end(), and QMap< Incidence *, ResourceCalendar * >::find().

Referenced by addIncidence().

void CalendarResources::incidenceUpdated IncidenceBase   [protected]
 

The observer interface.

So far not implemented.

Definition at line 584 of file calendarresources.cpp.

Event::List CalendarResources::rawEventsForDate const QDate   date,
bool    sorted = false
[protected, virtual]
 

Builds and then returns a list of all events that match for the date specified.

useful for dayView, etc. etc.

Implements KCal::Calendar.

Definition at line 394 of file calendarresources.cpp.

Event::List CalendarResources::rawEventsForDate const QDateTime   qdt [protected, virtual]
 

Get unfiltered events for date qdt.

Implements KCal::Calendar.

Definition at line 444 of file calendarresources.cpp.

Event::List CalendarResources::rawEvents const QDate   start,
const QDate   end,
bool    inclusive = false
[protected, virtual]
 

Get unfiltered events in a range of dates.

If inclusive is set to true, only events are returned, which are completely included in the range.

Implements KCal::Calendar.

Definition at line 426 of file calendarresources.cpp.

void CalendarResources::doSetTimeZoneId const QString   tzid [protected, virtual]
 

let the subclasses of KCal::Calendar set the time zone.

Reimplemented from KCal::Calendar.

Definition at line 634 of file calendarresources.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:24 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003