KDE PIM / Developers / API Docs / libkcal

KCal::ResourceCached Class Reference

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

#include <resourcecached.h>

Inherits KCal::ResourceCalendar, and KCal::Calendar::Observer.

Inherited by KCal::ResourceLocal, and KCal::ResourceLocalDir.

List of all members.

Public Types

Public Member Functions

Protected Slots

Protected Member Functions

Protected Attributes


Detailed Description

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


Member Enumeration Documentation

anonymous enum
 

Reload policy.

See also:
setReloadPolicy(), reloadPolicy()

anonymous enum
 

Save policy.

See also:
setSavePolicy(), savePolicy()

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

int ResourceCached::reloadPolicy  )  const
 

Return reload policy.

See also:
setReloadPolicy()

void ResourceCached::setReloadInterval int  minutes  ) 
 

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

int ResourceCached::reloadInterval  )  const
 

Return reload interval in minutes.

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

int ResourceCached::savePolicy  )  const
 

Return save policy.

See also:
setsavePolicy()

void ResourceCached::setSaveInterval int  minutes  ) 
 

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

int ResourceCached::saveInterval  )  const
 

Return save interval in minutes.

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.

void ResourceCached::deleteEvent Event  )  [virtual]
 

Deletes an event from this calendar.

Implements KCal::ResourceCalendar.

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

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

Implements KCal::ResourceCalendar.

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

Return filtered list of all events in calendar.

Event::List ResourceCached::rawEvents EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
[virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::ResourceCalendar.

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.

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

Get unfiltered events for date qdt.

Implements KCal::ResourceCalendar.

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.

bool ResourceCached::addTodo Todo todo  )  [virtual]
 

Add a todo to the todolist.

Implements KCal::ResourceCalendar.

void ResourceCached::deleteTodo Todo  )  [virtual]
 

Remove a todo from the todolist.

Implements KCal::ResourceCalendar.

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.

Todo::List ResourceCached::rawTodos TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
[virtual]
 

Return list of all todos.

Implements KCal::ResourceCalendar.

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

Returns list of todos due on the specified date.

Implements KCal::ResourceCalendar.

bool ResourceCached::addJournal Journal  )  [virtual]
 

Add a Journal entry to calendar.

Implements KCal::ResourceCalendar.

void ResourceCached::deleteJournal Journal  )  [virtual]
 

Remove a Journal from the calendar.

Implements KCal::ResourceCalendar.

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

Return Journal with given unique id.

Implements KCal::ResourceCalendar.

Journal::List ResourceCached::rawJournals JournalSortField  sortField = JournalSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
[virtual]
 

Return list of all journals.

Implements KCal::ResourceCalendar.

Journal::List ResourceCached::rawJournalsForDate const QDate &  date  )  [virtual]
 

Return list of journals for the given date.

Implements KCal::ResourceCalendar.

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

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

Implements KCal::ResourceCalendar.

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

Return all alarms, which ocur before given date.

Implements KCal::ResourceCalendar.

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

Set id of timezone, e.g.

"Europe/Berlin"

Implements KCal::ResourceCalendar.

const Person & KCal::ResourceCached::getOwner  )  const
 

Return the owner of the calendar's full name.

void KCal::ResourceCached::setOwner const Person owner  ) 
 

Set the owner of the calendar.

Should be owner's full name.

void ResourceCached::loadCache  ) 
 

Loads the cache, this method should be called on load.

void ResourceCached::saveCache  ) 
 

Saves the cache back.

void ResourceCached::clearCache  ) 
 

Clear cache.

KPIM::IdMapper & ResourceCached::idMapper  ) 
 

Returns a reference to the id mapper.

void ResourceCached::doClose  )  [protected, virtual]
 

Virtual method from KRES::Resource, called when the last instace of the resource is closed.

bool ResourceCached::doOpen  )  [protected, virtual]
 

Opens the resource.

Dummy implementation, so child classes don't have to reimplement this method. By default, this does not do anything, but can be reimplemented in child classes

bool ResourceCached::checkForReload  )  [protected]
 

Check if reload required according to reload policy.

bool ResourceCached::checkForSave  )  [protected]
 

Check if save required according to save policy.

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

Add info text for concrete resources.

Called by infoText().

Reimplemented from KCal::ResourceCalendar.

QString ResourceCached::cacheFile  )  const [protected, virtual]
 

This method is used by loadCache() and saveCache(), reimplement it to change the location of the cache.

QString ResourceCached::changesCacheFile const QString &   )  const [protected, virtual]
 

Functions for keeping the changes persistent.


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