libkcal Library API Documentation

KCal::ResourceCached Class Reference

This class provides a calendar resource using a local CalendarLocal object to cache the calendar data. More...

#include <resourcecached.h>

Inheritance diagram for KCal::ResourceCached:

KCal::ResourceCalendar KCal::ResourceLocal List of all members.

Public Types

enum  { ReloadNever, ReloadOnStartup, ReloadInterval }
enum  {
  SaveNever, SaveOnExit, SaveInterval, SaveDelayed,
  SaveAlways
}

Public Member Functions

 ResourceCached (const KConfig *)
void readConfig (const KConfig *config)
void writeConfig (KConfig *config)
void setReloadPolicy (int policy)
int reloadPolicy () const
void setReloadInterval (int minutes)
int reloadInterval () const
void setSavePolicy (int policy)
int savePolicy () const
void setSaveInterval (int minutes)
int saveInterval () const
void setLastLoad (const QDateTime &)
QDateTime lastLoad () const
void setLastSave (const QDateTime &)
QDateTime lastSave () const
bool addEvent (Event *anEvent)
void deleteEvent (Event *)
Eventevent (const QString &UniqueStr)
Event::List events ()
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 rawTodosForDate (const QDate &date)
virtual bool addJournal (Journal *)
virtual 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)
void setTimeZoneId (const QString &tzid)
QString timeZoneId () const
void enableChangeNotification ()
void disableChangeNotification ()
void clearChange (Incidence *)
void clearChanges ()
bool hasChanges () const
Incidence::List allChanges () const
Incidence::List addedIncidences () const
Incidence::List changedIncidences () const
Incidence::List deletedIncidences () const

Protected Slots

void slotReload ()
void slotSave ()

Protected Member Functions

void calendarIncidenceAdded (KCal::Incidence *)
void calendarIncidenceChanged (KCal::Incidence *)
void calendarIncidenceDeleted (KCal::Incidence *)
bool checkForReload ()
bool checkForSave ()
void checkForAutomaticSave ()
void addInfoText (QString &) const
void setupSaveTimer ()
void setupReloadTimer ()

Protected Attributes

CalendarLocal mCalendar

Detailed Description

This class provides a calendar resource using a local CalendarLocal object to cache the calendar data.

Definition at line 42 of file resourcecached.h.


Member Enumeration Documentation

anonymous enum
 

Reload policy.

See also:
setReloadPolicy(), reloadPolicy()

Definition at line 52 of file resourcecached.h.

anonymous enum
 

Save policy.

See also:
setSavePolicy(), savePolicy()

Definition at line 58 of file resourcecached.h.


Member Function Documentation

void ResourceCached::setReloadPolicy int  policy  ) 
 

Set reload policy.

This controls when the cache is refreshed.

ReloadNever never reload ReloadOnStartup reload when resource is started ReloadInterval reload regularly after given interval

Definition at line 53 of file resourcecached.cpp.

int ResourceCached::reloadPolicy  )  const
 

Return reload policy.

See also:
setReloadPolicy()

Definition at line 60 of file resourcecached.cpp.

void ResourceCached::setReloadInterval int  minutes  ) 
 

Set reload interval in minutes which is used when reload policy is ReloadInterval.

Definition at line 65 of file resourcecached.cpp.

int ResourceCached::reloadInterval  )  const
 

Return reload interval in minutes.

Definition at line 70 of file resourcecached.cpp.

void ResourceCached::setSavePolicy int  policy  ) 
 

Set save policy.

This controls when the cache is refreshed.

SaveNever never save SaveOnExit save when resource is exited SaveInterval save regularly after given interval SaveDelayed save after small delay SaveAlways save on every change

Definition at line 75 of file resourcecached.cpp.

int ResourceCached::savePolicy  )  const
 

Return save policy.

See also:
setsavePolicy()

Definition at line 82 of file resourcecached.cpp.

void ResourceCached::setSaveInterval int  minutes  ) 
 

Set save interval in minutes which is used when save policy is SaveInterval.

Definition at line 87 of file resourcecached.cpp.

int ResourceCached::saveInterval  )  const
 

Return save interval in minutes.

Definition at line 92 of file resourcecached.cpp.

void KCal::ResourceCached::setLastLoad const QDateTime  ) 
 

Set time of last load.

QDateTime KCal::ResourceCached::lastLoad  )  const
 

Return time of last load.

void KCal::ResourceCached::setLastSave const QDateTime  ) 
 

Set time of last save.

QDateTime KCal::ResourceCached::lastSave  )  const
 

Return time of last save.

bool ResourceCached::addEvent Event anEvent  )  [virtual]
 

Add event to calendar.

Implements KCal::ResourceCalendar.

Definition at line 146 of file resourcecached.cpp.

References KCal::CalendarLocal::addEvent().

void ResourceCached::deleteEvent Event  )  [virtual]
 

Deletes an event from this calendar.

Implements KCal::ResourceCalendar.

Definition at line 152 of file resourcecached.cpp.

References KCal::CalendarLocal::deleteEvent().

Event * ResourceCached::event const QString UniqueStr  )  [virtual]
 

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

Implements KCal::ResourceCalendar.

Definition at line 160 of file resourcecached.cpp.

References KCal::CalendarLocal::event().

Event::List KCal::ResourceCached::events  ) 
 

Return filtered list of all events in calendar.

Event::List ResourceCached::rawEvents  )  [virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::ResourceCalendar.

Definition at line 184 of file resourcecached.cpp.

References KCal::CalendarLocal::rawEvents().

Event::List ResourceCached::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 165 of file resourcecached.cpp.

References KCal::CalendarLocal::rawEventsForDate().

Event::List ResourceCached::rawEventsForDate const QDateTime qdt  )  [virtual]
 

Get unfiltered events for date qdt.

Implements KCal::ResourceCalendar.

Definition at line 179 of file resourcecached.cpp.

References KCal::CalendarLocal::rawEventsForDate().

Event::List ResourceCached::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 173 of file resourcecached.cpp.

References KCal::CalendarLocal::rawEvents().

bool ResourceCached::addTodo Todo todo  )  [virtual]
 

Add a todo to the todolist.

Implements KCal::ResourceCalendar.

Definition at line 189 of file resourcecached.cpp.

References KCal::CalendarLocal::addTodo().

void ResourceCached::deleteTodo Todo  )  [virtual]
 

Remove a todo from the todolist.

Implements KCal::ResourceCalendar.

Definition at line 194 of file resourcecached.cpp.

References KCal::CalendarLocal::deleteTodo().

Todo * ResourceCached::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 210 of file resourcecached.cpp.

References KCal::CalendarLocal::todo().

Todo::List ResourceCached::rawTodos  )  [virtual]
 

Return list of all todos.

Implements KCal::ResourceCalendar.

Definition at line 205 of file resourcecached.cpp.

References KCal::CalendarLocal::rawTodos().

Todo::List ResourceCached::rawTodosForDate const QDate date  )  [virtual]
 

Returns list of todos due on the specified date.

Implements KCal::ResourceCalendar.

Definition at line 215 of file resourcecached.cpp.

References KCal::CalendarLocal::rawTodosForDate().

bool ResourceCached::addJournal Journal  )  [virtual]
 

Add a Journal entry to calendar.

Implements KCal::ResourceCalendar.

Definition at line 221 of file resourcecached.cpp.

References KCal::CalendarLocal::addJournal(), and KCal::IncidenceBase::dtStart().

void ResourceCached::deleteJournal Journal  )  [virtual]
 

Remove a Journal from the calendar.

Implements KCal::ResourceCalendar.

Definition at line 199 of file resourcecached.cpp.

References KCal::CalendarLocal::deleteJournal().

Journal * ResourceCached::journal const QDate  )  [virtual]
 

Return Journal for given date.

Implements KCal::ResourceCalendar.

Definition at line 228 of file resourcecached.cpp.

References KCal::CalendarLocal::journal().

Journal * ResourceCached::journal const QString uid  )  [virtual]
 

Return Journal with given unique id.

Implements KCal::ResourceCalendar.

Definition at line 235 of file resourcecached.cpp.

References KCal::CalendarLocal::journal().

Journal::List ResourceCached::journals  )  [virtual]
 

Return list of all Journals stored in calendar.

Implements KCal::ResourceCalendar.

Definition at line 240 of file resourcecached.cpp.

References KCal::CalendarLocal::journals().

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

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

Implements KCal::ResourceCalendar.

Definition at line 251 of file resourcecached.cpp.

References KCal::CalendarLocal::alarms().

Alarm::List ResourceCached::alarmsTo const QDateTime to  )  [virtual]
 

Return all alarms, which ocur before given date.

Implements KCal::ResourceCalendar.

Definition at line 246 of file resourcecached.cpp.

References KCal::CalendarLocal::alarmsTo().

void ResourceCached::setTimeZoneId const QString tzid  )  [virtual]
 

Set id of timezone, e.g.

"Europe/Berlin"

Implements KCal::ResourceCalendar.

Definition at line 259 of file resourcecached.cpp.

References KCal::Calendar::setTimeZoneId().

bool ResourceCached::checkForReload  )  [protected]
 

Check if reload required according to reload policy.

Definition at line 419 of file resourcecached.cpp.

bool ResourceCached::checkForSave  )  [protected]
 

Check if save required according to save policy.

Definition at line 426 of file resourcecached.cpp.

void ResourceCached::addInfoText QString txt  )  const [protected, virtual]
 

Add info text for concrete resources.

Called by infoText().

Reimplemented from KCal::ResourceCalendar.

Definition at line 432 of file resourcecached.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.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:21 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003