libkcal
KCal::ResourceCached Class Reference
#include <resourcecached.h>
Inheritance diagram for KCal::ResourceCached:

Detailed Description
This class provides a calendar resource using a local CalendarLocal object to cache the calendar data.
Definition at line 45 of file resourcecached.h.
Public Types | |
enum | { ReloadNever, ReloadOnStartup, ReloadInterval } |
enum | { SaveNever, SaveOnExit, SaveInterval, SaveDelayed, SaveAlways } |
Public Member Functions | |
ResourceCached (const KConfig *) | |
virtual | ~ResourceCached () |
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) |
bool | deleteEvent (Event *) |
Event * | event (const QString &UniqueStr) |
Event::List | events () |
Event::List | rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const QDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const QDateTime &qdt) |
Event::List | rawEvents (const QDate &start, const QDate &end, bool inclusive=false) |
bool | addTodo (Todo *todo) |
bool | deleteTodo (Todo *) |
Todo * | todo (const QString &uid) |
Todo::List | rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Todo::List | rawTodosForDate (const QDate &date) |
virtual bool | addJournal (Journal *) |
virtual bool | deleteJournal (Journal *) |
virtual Journal * | journal (const QString &uid) |
Journal::List | rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Journal::List | rawJournalsForDate (const QDate &date) |
Alarm::List | alarms (const QDateTime &from, const QDateTime &to) |
Alarm::List | alarmsTo (const QDateTime &to) |
void | setTimeZoneId (const QString &timeZoneId) |
QString | timeZoneId () const |
const Person & | getOwner () const |
void | setOwner (const Person &owner) |
void | enableChangeNotification () |
void | disableChangeNotification () |
void | clearChange (Incidence *) |
void | clearChange (const QString &uid) |
void | clearChanges () |
bool | hasChanges () const |
Incidence::List | allChanges () const |
Incidence::List | addedIncidences () const |
Incidence::List | changedIncidences () const |
Incidence::List | deletedIncidences () const |
void | loadCache () |
void | saveCache () |
void | clearCache () |
void | cleanUpEventCache (const KCal::Event::List &eventList) |
void | cleanUpTodoCache (const KCal::Todo::List &todoList) |
KPIM::IdMapper & | idMapper () |
Protected Slots | |
void | slotReload () |
void | slotSave () |
void | setIdMapperIdentifier () |
Protected Member Functions | |
void | calendarIncidenceAdded (KCal::Incidence *incidence) |
void | calendarIncidenceChanged (KCal::Incidence *incidence) |
void | calendarIncidenceDeleted (KCal::Incidence *incidence) |
virtual void | doClose () |
virtual bool | doOpen () |
bool | checkForReload () |
bool | checkForSave () |
void | checkForAutomaticSave () |
void | addInfoText (QString &) const |
void | setupSaveTimer () |
void | setupReloadTimer () |
virtual QString | cacheFile () const |
virtual QString | changesCacheFile (const QString &) const |
void | loadChangesCache (QMap< Incidence *, bool > &, const QString &) |
void | loadChangesCache () |
void | saveChangesCache (const QMap< Incidence *, bool > &, const QString &) |
void | saveChangesCache () |
Protected Attributes | |
CalendarLocal | mCalendar |
Member Enumeration Documentation
|
Reload policy.
Definition at line 55 of file resourcecached.h. |
|
Save policy.
Definition at line 61 of file resourcecached.h. |
Member Function Documentation
|
Add event to calendar.
Implements KCal::ResourceCalendar. Definition at line 152 of file resourcecached.cpp. |
|
Add info text for concrete resources. Called by infoText(). Reimplemented from KCal::ResourceCalendar. Definition at line 625 of file resourcecached.cpp. |
|
Add a Journal entry to calendar.
Implements KCal::ResourceCalendar. Definition at line 228 of file resourcecached.cpp. |
|
Add a todo to the todolist.
Implements KCal::ResourceCalendar. Definition at line 196 of file resourcecached.cpp. |
|
Return all alarms, which ocur in the given time interval.
Implements KCal::ResourceCalendar. Definition at line 256 of file resourcecached.cpp. |
|
Return all alarms, which ocur before given date.
Implements KCal::ResourceCalendar. Definition at line 251 of file resourcecached.cpp. |
|
This method is used by loadCache() and saveCache(), reimplement it to change the location of the cache.
Definition at line 381 of file resourcecached.cpp. |
|
Notify the Observer that an Incidence has been inserted. First parameter is a pointer to the Incidence that was inserted. Reimplemented from KCal::Calendar::Observer. Definition at line 443 of file resourcecached.cpp. |
|
Notify the Observer that an Incidence has been modified. First parameter is a pointer to the Incidence that was modified. Reimplemented from KCal::Calendar::Observer. Definition at line 459 of file resourcecached.cpp. |
|
Notify the Observer that an Incidence has been removed. First parameter is a pointer to the Incidence that was removed. Reimplemented from KCal::Calendar::Observer. Definition at line 476 of file resourcecached.cpp. |
|
Functions for keeping the changes persistent.
Definition at line 386 of file resourcecached.cpp. |
|
Check if reload required according to reload policy.
Definition at line 612 of file resourcecached.cpp. |
|
Check if save required according to save policy.
Definition at line 619 of file resourcecached.cpp. |
|
Clear cache.
Definition at line 312 of file resourcecached.cpp. |
|
Deletes an event from this calendar.
Implements KCal::ResourceCalendar. Reimplemented in KCal::ResourceLocalDir. Definition at line 158 of file resourcecached.cpp. |
|
Remove a Journal from the calendar.
Implements KCal::ResourceCalendar. Reimplemented in KCal::ResourceLocalDir. Definition at line 206 of file resourcecached.cpp. |
|
Remove a todo from the todolist.
Implements KCal::ResourceCalendar. Reimplemented in KCal::ResourceLocalDir. Definition at line 201 of file resourcecached.cpp. |
|
Virtual method from KRES::Resource, called when the last instace of the resource is closed.
Definition at line 639 of file resourcecached.cpp. |
|
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 Definition at line 644 of file resourcecached.cpp. |
|
Retrieves an event on the basis of the unique string ID.
Implements KCal::ResourceCalendar. Definition at line 166 of file resourcecached.cpp. |
|
Return filtered list of all events in calendar.
|
|
Return the owner of the calendar's full name.
Definition at line 655 of file resourcecached.cpp. |
|
Returns a reference to the id mapper.
Definition at line 376 of file resourcecached.cpp. |
|
Return Journal with given unique id.
Implements KCal::ResourceCalendar. Definition at line 235 of file resourcecached.cpp. |
|
Return time of last load.
|
|
Return time of last save.
|
|
Loads the cache, this method should be called on load.
Definition at line 280 of file resourcecached.cpp. |
|
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 180 of file resourcecached.cpp. |
|
Return unfiltered list of all events in calendar.
Implements KCal::ResourceCalendar. Definition at line 191 of file resourcecached.cpp. |
|
Get unfiltered events for date qdt.
Implements KCal::ResourceCalendar. Definition at line 186 of file resourcecached.cpp. |
|
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 171 of file resourcecached.cpp. |
|
Return list of all journals.
Implements KCal::ResourceCalendar. Definition at line 240 of file resourcecached.cpp. |
|
Return list of journals for the given date.
Implements KCal::ResourceCalendar. Definition at line 245 of file resourcecached.cpp. |
|
Return list of all todos.
Implements KCal::ResourceCalendar. Definition at line 212 of file resourcecached.cpp. |
|
Returns list of todos due on the specified date.
Implements KCal::ResourceCalendar. Definition at line 222 of file resourcecached.cpp. |
|
Return reload interval in minutes.
Definition at line 76 of file resourcecached.cpp. |
|
Return reload policy.
Definition at line 66 of file resourcecached.cpp. |
|
Saves the cache back.
Definition at line 297 of file resourcecached.cpp. |
|
Return save interval in minutes.
Definition at line 98 of file resourcecached.cpp. |
|
Return save policy.
Definition at line 88 of file resourcecached.cpp. |
|
Set time of last load.
|
|
Set time of last save.
|
|
Set the owner of the calendar. Should be owner's full name. Definition at line 650 of file resourcecached.cpp. |
|
Set reload interval in minutes which is used when reload policy is ReloadInterval.
Definition at line 71 of file resourcecached.cpp. |
|
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 59 of file resourcecached.cpp. |
|
Set save interval in minutes which is used when save policy is SaveInterval.
Definition at line 93 of file resourcecached.cpp. |
|
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 81 of file resourcecached.cpp. |
|
Set id of timezone, e.g. "Europe/Berlin" Implements KCal::ResourceCalendar. Definition at line 263 of file resourcecached.cpp. |
|
Searches todolist for an event with this unique string identifier, returns a pointer or null.
Implements KCal::ResourceCalendar. Definition at line 217 of file resourcecached.cpp. |
The documentation for this class was generated from the following files: