libkcal Library API Documentation

KCal::ResourceKABC Class Reference

Resource providing birthdays and anniversaries as events. More...

#include <resourcekabc.h>

Inheritance diagram for KCal::ResourceKABC:

KCal::ResourceCalendar List of all members.

Public Methods

 ResourceKABC (const KConfig *)
 ResourceKABC ()
virtual ~ResourceKABC ()
void readConfig (const KConfig *config)
void writeConfig (KConfig *config)
void setAlarm (bool)
bool alarm ()
void setAlarmDays (int)
int alarmDays ()
bool load ()
bool save ()
bool isSaving ()
KABC::Lock * lock ()
bool addEvent (Event *anEvent)
void deleteEvent (Event *)
Eventevent (const QString &UniqueStr)
Event::List rawEvents ()
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)
bool addTodo (Todo *todo)
void deleteTodo (Todo *)
Todotodo (const QString &uid)
Todo::List rawTodos ()
Todo::List todos (const QDate &date)
virtual bool addJournal (Journal *)
void deleteJournal (Journal *)
virtual Journaljournal (const QDate &)
virtual Journaljournal (const QString &UID)
Journal::List journals ()
Alarm::List alarms (const QDateTime &from, const QDateTime &to)
Alarm::List alarmsTo (const QDateTime &to)
bool doOpen ()
void dump () const
void setTimeZoneId (const QString &tzid)

Protected Methods

void doClose ()
virtual void update (IncidenceBase *incidence)

Detailed Description

Resource providing birthdays and anniversaries as events.

Definition at line 46 of file resourcekabc.h.


Member Function Documentation

bool ResourceKABC::load   [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.

Implements KCal::ResourceCalendar.

Definition at line 127 of file resourcekabc.cpp.

References KCal::CalendarLocal::addEvent(), KCal::Recurrence::addYearlyNum(), QString::arg(), KCal::Incidence::clearAlarms(), KCal::CalendarLocal::close(), QDateTime::date(), QDate::fromString(), QString::isEmpty(), QDateTime::isValid(), KCal::Incidence::newAlarm(), KCal::Incidence::recurrence(), KCal::ResourceCalendar::resourceChanged(), KCal::Incidence::setCategories(), KCal::Event::setDtEnd(), KCal::Incidence::setDtStart(), KCal::Alarm::setEnabled(), KCal::IncidenceBase::setFloats(), KCal::Event::setHasEndDate(), KCal::Incidence::setReadOnly(), KCal::Recurrence::setRecurStart(), KCal::Alarm::setStartOffset(), KCal::Incidence::setSummary(), KCal::Alarm::setText(), KCal::Alarm::setTime(), KCal::Recurrence::setYearly(), and QDateTime::toString().

bool ResourceKABC::save   [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().

Implements KCal::ResourceCalendar.

Definition at line 253 of file resourcekabc.cpp.

bool ResourceKABC::isSaving   [virtual]
 

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

Reimplemented from KCal::ResourceCalendar.

Definition at line 259 of file resourcekabc.cpp.

KABC::Lock * ResourceKABC::lock   [virtual]
 

Return object for locking the resource.

Implements KCal::ResourceCalendar.

Definition at line 264 of file resourcekabc.cpp.

bool ResourceKABC::addEvent Event   anEvent [virtual]
 

Add Event to calendar.

Implements KCal::ResourceCalendar.

Definition at line 278 of file resourcekabc.cpp.

void ResourceKABC::deleteEvent Event   [virtual]
 

deletes an event from this calendar.

Implements KCal::ResourceCalendar.

Definition at line 283 of file resourcekabc.cpp.

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

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

Implements KCal::ResourceCalendar.

Definition at line 288 of file resourcekabc.cpp.

References KCal::CalendarLocal::event().

Event::List ResourceKABC::rawEvents   [virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::ResourceCalendar.

Definition at line 310 of file resourcekabc.cpp.

References KCal::CalendarLocal::rawEvents().

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

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

useful for dayView, etc. etc.

Implements KCal::ResourceCalendar.

Definition at line 293 of file resourcekabc.cpp.

References KCal::CalendarLocal::rawEventsForDate().

Event::List ResourceKABC::rawEventsForDate const QDateTime   qdt [virtual]
 

Get unfiltered events for date qdt.

Implements KCal::ResourceCalendar.

Definition at line 305 of file resourcekabc.cpp.

References QDateTime::date(), and KCal::CalendarLocal::rawEventsForDate().

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

Definition at line 299 of file resourcekabc.cpp.

References KCal::CalendarLocal::rawEvents().

bool ResourceKABC::addTodo Todo   todo [virtual]
 

Add a todo to the todolist.

Implements KCal::ResourceCalendar.

Definition at line 315 of file resourcekabc.cpp.

void ResourceKABC::deleteTodo Todo   [virtual]
 

Remove a todo from the todolist.

Implements KCal::ResourceCalendar.

Definition at line 320 of file resourcekabc.cpp.

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

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

Implements KCal::ResourceCalendar.

Definition at line 330 of file resourcekabc.cpp.

References KCal::CalendarLocal::todo().

Todo::List ResourceKABC::rawTodos   [virtual]
 

Return list of all todos.

Implements KCal::ResourceCalendar.

Definition at line 325 of file resourcekabc.cpp.

References KCal::CalendarLocal::rawTodos().

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

Returns list of todos due on the specified date.

Implements KCal::ResourceCalendar.

Definition at line 335 of file resourcekabc.cpp.

References KCal::CalendarLocal::todos().

bool ResourceKABC::addJournal Journal   [virtual]
 

Add a Journal entry to calendar.

Implements KCal::ResourceCalendar.

Definition at line 341 of file resourcekabc.cpp.

void ResourceKABC::deleteJournal Journal   [virtual]
 

Remove journal from the calendar.

Implements KCal::ResourceCalendar.

Definition at line 346 of file resourcekabc.cpp.

Journal * ResourceKABC::journal const QDate   [virtual]
 

Return Journal for given date.

Implements KCal::ResourceCalendar.

Definition at line 350 of file resourcekabc.cpp.

References KCal::CalendarLocal::journal().

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

Return Journal with given UID.

Implements KCal::ResourceCalendar.

Definition at line 357 of file resourcekabc.cpp.

References KCal::CalendarLocal::journal().

Journal::List ResourceKABC::journals   [virtual]
 

Return list of all Journals stored in calendar.

Implements KCal::ResourceCalendar.

Definition at line 362 of file resourcekabc.cpp.

References KCal::CalendarLocal::journals().

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

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

Implements KCal::ResourceCalendar.

Definition at line 373 of file resourcekabc.cpp.

References KCal::CalendarLocal::alarms().

Alarm::List ResourceKABC::alarmsTo const QDateTime   to [virtual]
 

Return all alarms, which ocur before given date.

Implements KCal::ResourceCalendar.

Definition at line 368 of file resourcekabc.cpp.

References KCal::CalendarLocal::alarmsTo().

void ResourceKABC::setTimeZoneId const QString   tzid [virtual]
 

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

"Europe/Berlin".

Implements KCal::ResourceCalendar.

Definition at line 394 of file resourcekabc.cpp.

References KCal::Calendar::setTimeZoneId().

void ResourceKABC::doClose   [protected]
 

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

etc.

Definition at line 269 of file resourcekabc.cpp.

References KCal::CalendarLocal::close().

void ResourceKABC::update IncidenceBase   incidence [protected, virtual]
 

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

It makes sure that the calendar is internally consistent.

Implements KCal::ResourceCalendar.

Definition at line 380 of file resourcekabc.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:25 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003