libkcal Library API Documentation

KCal::ResourceCalendar Class Reference

This class provides the interfaces for a calendar resource. More...

#include <resourcecalendar.h>

Inheritance diagram for KCal::ResourceCalendar:

KCal::ResourceCached KCal::ResourceIMAP KCal::ResourceKABC KCal::ResourceLocal KCal::ResourceRemote List of all members.

Signals

void resourceChanged (ResourceCalendar *)
void resourceLoaded (ResourceCalendar *)
void resourceSaved (ResourceCalendar *)

Public Methods

 ResourceCalendar (const KConfig *)
virtual ~ResourceCalendar ()
virtual void writeConfig (KConfig *config)
virtual bool load ()=0
virtual bool save ()=0
virtual bool isSaving ()
virtual KABC::Lock * lock ()=0
virtual bool addIncidence (Incidence *)
virtual bool addEvent (Event *event)=0
virtual void deleteEvent (Event *)=0
virtual Eventevent (const QString &uid)=0
virtual Event::List rawEvents ()=0
virtual Event::List rawEventsForDate (const QDate &date, bool sorted=false)=0
virtual Event::List rawEventsForDate (const QDateTime &qdt)=0
virtual Event::List rawEvents (const QDate &start, const QDate &end, bool inclusive=false)=0
virtual bool addTodo (Todo *todo)=0
virtual void deleteTodo (Todo *)=0
virtual Todotodo (const QString &uid)=0
virtual Todo::List rawTodos ()=0
virtual Todo::List todos (const QDate &date)=0
virtual bool addJournal (Journal *)=0
virtual void deleteJournal (Journal *)=0
virtual Journaljournal (const QDate &)=0
virtual Journaljournal (const QString &uid)=0
virtual Journal::List journals ()=0
virtual Alarm::List alarms (const QDateTime &from, const QDateTime &to)=0
virtual Alarm::List alarmsTo (const QDateTime &to)=0
virtual void update (IncidenceBase *incidence)=0
Incidence::List rawIncidences ()
virtual void setTimeZoneId (const QString &tzid)=0

Detailed Description

This class provides the interfaces for a calendar resource.

It makes use of the kresources framework.

Warning:
This code is still under heavy development. Don't expect source or binary compatibility in future versions.

Definition at line 53 of file resourcecalendar.h.


Member Function Documentation

virtual bool KCal::ResourceCalendar::load   [pure virtual]
 

Load resource data.

After calling this function all data is accessible by calling the incidence/event/todo/etc. accessor functions.

If data is actually loaded within this function or the loading is delayed until it is accessed by another function depends on the implementation of the resource.

If loading the data takes significant time, the resource should return cached values, if available and return the results via the resourceChanged signal. When the resource has finished loading the resourceLoaded() signal is emitted.

Calling this function multiple times should have the same effect as calling it once, given that the data isn't changed between calls.

Implemented in KCal::ResourceIMAP, KCal::ResourceKABC, KCal::ResourceLocal, and KCal::ResourceRemote.

virtual bool KCal::ResourceCalendar::save   [pure virtual]
 

Save resource data.

After calling this function it is save to close the resource without losing data.

If data is actually saved within this function or saving is delayed depends on the implementation of the resource.

If saving the data takes significant time, the resource should return from the function, do the saving in the background and notify the end of the save by emitting the signal resourceSaved().

Implemented in KCal::ResourceIMAP, KCal::ResourceKABC, KCal::ResourceLocal, and KCal::ResourceRemote.

virtual bool KCal::ResourceCalendar::isSaving   [inline, virtual]
 

Return true if a save operation is still in progress, otherwise return false.

Reimplemented in KCal::ResourceKABC, and KCal::ResourceRemote.

Definition at line 97 of file resourcecalendar.h.

virtual KABC::Lock* KCal::ResourceCalendar::lock   [pure virtual]
 

Return object for locking the resource.

Implemented in KCal::ResourceIMAP, KCal::ResourceKABC, KCal::ResourceLocal, and KCal::ResourceRemote.

Referenced by KCal::CalendarResources::requestSaveTicket().

bool ResourceCalendar::addIncidence Incidence   [virtual]
 

Add incidence to resource.

Definition at line 48 of file resourcecalendar.cpp.

References KCal::Incidence::accept().

Referenced by KCal::CalendarResources::addIncidence().

virtual bool KCal::ResourceCalendar::addEvent Event   event [pure virtual]
 

Add event to resource.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by KCal::CalendarResources::addEvent().

virtual void KCal::ResourceCalendar::deleteEvent Event   [pure virtual]
 

Delete event from this resource.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Event* KCal::ResourceCalendar::event const QString   uid [pure virtual]
 

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

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Event::List KCal::ResourceCalendar::rawEvents   [pure virtual]
 

Return unfiltered list of all events in calendar.

Use with care, this can be a bad idea for server-based calendars.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by rawIncidences().

virtual Event::List KCal::ResourceCalendar::rawEventsForDate const QDate   date,
bool    sorted = false
[pure virtual]
 

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

useful for dayView, etc. etc.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Event::List KCal::ResourceCalendar::rawEventsForDate const QDateTime   qdt [pure virtual]
 

Get unfiltered events for date qdt.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Event::List KCal::ResourceCalendar::rawEvents const QDate   start,
const QDate   end,
bool    inclusive = false
[pure 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.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

void KCal::ResourceCalendar::resourceChanged ResourceCalendar *    [signal]
 

This signal is emitted when the data in the resource has changed.

Referenced by KCal::ResourceKABC::load().

void KCal::ResourceCalendar::resourceLoaded ResourceCalendar *    [signal]
 

This signal is emitted when loading data into the resource has been finished.

void KCal::ResourceCalendar::resourceSaved ResourceCalendar *    [signal]
 

This signal is emitted when saving the data of the resource has been finished.

Referenced by KCal::ResourceRemote::save().

virtual bool KCal::ResourceCalendar::addTodo Todo   todo [pure virtual]
 

Add a todo to the todolist.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by KCal::CalendarResources::addTodo().

virtual void KCal::ResourceCalendar::deleteTodo Todo   [pure virtual]
 

Remove a todo from the todolist.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Todo* KCal::ResourceCalendar::todo const QString   uid [pure virtual]
 

Searches todolist for an event with this unique id.

Returns:
pointer to todo or 0 if todo wasn't found

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Todo::List KCal::ResourceCalendar::rawTodos   [pure virtual]
 

Return list of all todos.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by rawIncidences().

virtual Todo::List KCal::ResourceCalendar::todos const QDate   date [pure virtual]
 

Returns list of todos due on the specified date.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual bool KCal::ResourceCalendar::addJournal Journal   [pure virtual]
 

Add a Journal entry to resource.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by KCal::CalendarResources::addJournal().

virtual void KCal::ResourceCalendar::deleteJournal Journal   [pure virtual]
 

Remove a Journal entry from calendar.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Journal* KCal::ResourceCalendar::journal const QDate   [pure virtual]
 

Return Journal for given date.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Journal* KCal::ResourceCalendar::journal const QString   uid [pure virtual]
 

Return Journal with given unique id.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Journal::List KCal::ResourceCalendar::journals   [pure virtual]
 

Return list of all Journals stored in calendar.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

Referenced by rawIncidences().

virtual Alarm::List KCal::ResourceCalendar::alarms const QDateTime   from,
const QDateTime   to
[pure virtual]
 

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

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual Alarm::List KCal::ResourceCalendar::alarmsTo const QDateTime   to [pure virtual]
 

Return all alarms, which ocur before given date.

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.

virtual void KCal::ResourceCalendar::update IncidenceBase   incidence [pure virtual]
 

This method should be called whenever a Event is modified directly via it's pointer.

It makes sure that the resource is internally consistent.

Implemented in KCal::ResourceIMAP, KCal::ResourceKABC, KCal::ResourceLocal, and KCal::ResourceRemote.

Incidence::List ResourceCalendar::rawIncidences  
 

Returns a list of all incideces.

Definition at line 54 of file resourcecalendar.cpp.

References journals(), rawEvents(), and rawTodos().

virtual void KCal::ResourceCalendar::setTimeZoneId const QString   tzid [pure virtual]
 

Set time zone id used by this resource, e.g.

"Europe/Berlin".

Implemented in KCal::ResourceIMAP, KCal::ResourceCached, and KCal::ResourceKABC.


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:25 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003