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>
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.
Member Enumeration Documentation
anonymous enum |
Reload policy.
- See also:
- setReloadPolicy(), reloadPolicy()
Definition at line 55 of file resourcecached.h.
anonymous enum |
Constructor & Destructor Documentation
ResourceCached::ResourceCached | ( | const KConfig * | config | ) |
Definition at line 45 of file resourcecached.cpp.
ResourceCached::~ResourceCached | ( | ) | [virtual] |
Definition at line 56 of file resourcecached.cpp.
Member Function Documentation
Incidence::List ResourceCached::addedIncidences | ( | ) | const |
Definition at line 493 of file resourcecached.cpp.
bool ResourceCached::addEvent | ( | Event * | anEvent | ) | [virtual] |
Add event to calendar.
Implements KCal::ResourceCalendar.
Definition at line 153 of file resourcecached.cpp.
void ResourceCached::addInfoText | ( | QString & | ) | const [protected, virtual] |
Add info text for concrete resources.
Called by infoText().
Reimplemented from KCal::ResourceCalendar.
Definition at line 626 of file resourcecached.cpp.
bool ResourceCached::addJournal | ( | Journal * | journal | ) | [virtual] |
Add a Journal entry to calendar.
Implements KCal::ResourceCalendar.
Definition at line 229 of file resourcecached.cpp.
bool ResourceCached::addTodo | ( | Todo * | todo | ) | [virtual] |
Add a todo to the todolist.
Implements KCal::ResourceCalendar.
Definition at line 197 of file resourcecached.cpp.
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 257 of file resourcecached.cpp.
Alarm::List ResourceCached::alarmsTo | ( | const QDateTime & | to | ) | [virtual] |
Return all alarms, which ocur before given date.
Implements KCal::ResourceCalendar.
Definition at line 252 of file resourcecached.cpp.
Incidence::List ResourceCached::allChanges | ( | ) | const |
Definition at line 523 of file resourcecached.cpp.
QString ResourceCached::cacheFile | ( | ) | const [protected, virtual] |
This method is used by loadCache() and saveCache(), reimplement it to change the location of the cache.
Definition at line 382 of file resourcecached.cpp.
void ResourceCached::calendarIncidenceAdded | ( | KCal::Incidence * | ) | [protected, virtual] |
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 444 of file resourcecached.cpp.
void ResourceCached::calendarIncidenceChanged | ( | KCal::Incidence * | ) | [protected, virtual] |
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 460 of file resourcecached.cpp.
void ResourceCached::calendarIncidenceDeleted | ( | KCal::Incidence * | ) | [protected, virtual] |
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 477 of file resourcecached.cpp.
Incidence::List ResourceCached::changedIncidences | ( | ) | const |
Definition at line 503 of file resourcecached.cpp.
void ResourceCached::checkForAutomaticSave | ( | ) | [protected] |
Definition at line 601 of file resourcecached.cpp.
bool ResourceCached::checkForReload | ( | ) | [protected] |
Check if reload required according to reload policy.
Definition at line 613 of file resourcecached.cpp.
bool ResourceCached::checkForSave | ( | ) | [protected] |
void ResourceCached::cleanUpEventCache | ( | const KCal::Event::List & | eventList | ) |
Definition at line 318 of file resourcecached.cpp.
void ResourceCached::cleanUpTodoCache | ( | const KCal::Todo::List & | todoList | ) |
Definition at line 347 of file resourcecached.cpp.
void ResourceCached::clearCache | ( | ) |
void ResourceCached::clearChange | ( | const QString & | uid | ) |
Definition at line 550 of file resourcecached.cpp.
void ResourceCached::clearChange | ( | Incidence * | incidence | ) |
Definition at line 545 of file resourcecached.cpp.
void ResourceCached::clearChanges | ( | ) |
Definition at line 274 of file resourcecached.cpp.
Incidence::List ResourceCached::deletedIncidences | ( | ) | const |
Definition at line 513 of file resourcecached.cpp.
bool ResourceCached::deleteEvent | ( | Event * | event | ) | [virtual] |
Deletes an event from this calendar.
Implements KCal::ResourceCalendar.
Reimplemented in KCal::ResourceLocalDir.
Definition at line 159 of file resourcecached.cpp.
bool ResourceCached::deleteJournal | ( | Journal * | journal | ) | [virtual] |
Remove a Journal from the calendar.
Implements KCal::ResourceCalendar.
Reimplemented in KCal::ResourceLocalDir.
Definition at line 207 of file resourcecached.cpp.
bool ResourceCached::deleteTodo | ( | Todo * | todo | ) | [virtual] |
Remove a todo from the todolist.
Implements KCal::ResourceCalendar.
Reimplemented in KCal::ResourceLocalDir.
Definition at line 202 of file resourcecached.cpp.
void ResourceCached::disableChangeNotification | ( | ) |
Definition at line 578 of file resourcecached.cpp.
void ResourceCached::doClose | ( | ) | [protected, virtual] |
Virtual method from KRES::Resource, called when the last instace of the resource is closed.
Definition at line 640 of file resourcecached.cpp.
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
Reimplemented in KCal::ResourceLocalDir.
Definition at line 645 of file resourcecached.cpp.
void ResourceCached::enableChangeNotification | ( | ) |
Definition at line 573 of file resourcecached.cpp.
Retrieves an event on the basis of the unique string ID.
Implements KCal::ResourceCalendar.
Definition at line 167 of file resourcecached.cpp.
Event::List KCal::ResourceCached::events | ( | ) |
Return filtered list of all events in calendar.
const Person & KCal::ResourceCached::getOwner | ( | ) | const |
bool ResourceCached::hasChanges | ( | ) | const |
Definition at line 539 of file resourcecached.cpp.
KPIM::IdMapper & ResourceCached::idMapper | ( | ) |
Return Journal with given unique id.
Implements KCal::ResourceCalendar.
Definition at line 236 of file resourcecached.cpp.
QDateTime KCal::ResourceCached::lastLoad | ( | ) | const |
Return time of last load.
QDateTime KCal::ResourceCached::lastSave | ( | ) | const |
Return time of last save.
void ResourceCached::loadCache | ( | ) |
Loads the cache, this method should be called on load.
Definition at line 281 of file resourcecached.cpp.
void ResourceCached::loadChangesCache | ( | ) | [protected] |
Definition at line 437 of file resourcecached.cpp.
void ResourceCached::loadChangesCache | ( | QMap< Incidence *, bool > & | map, | |
const QString & | type | |||
) | [protected] |
Definition at line 420 of file resourcecached.cpp.
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 181 of file resourcecached.cpp.
Event::List ResourceCached::rawEvents | ( | EventSortField | sortField = EventSortUnsorted , |
|
SortDirection | sortDirection = SortDirectionAscending | |||
) | [virtual] |
Return unfiltered list of all events in calendar.
Implements KCal::ResourceCalendar.
Definition at line 192 of file resourcecached.cpp.
Event::List ResourceCached::rawEventsForDate | ( | const QDateTime & | qdt | ) | [virtual] |
Get unfiltered events for date qdt.
Implements KCal::ResourceCalendar.
Definition at line 187 of file resourcecached.cpp.
Event::List ResourceCached::rawEventsForDate | ( | const QDate & | date, | |
EventSortField | sortField = EventSortUnsorted , |
|||
SortDirection | sortDirection = SortDirectionAscending | |||
) | [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 172 of file resourcecached.cpp.
Journal::List ResourceCached::rawJournals | ( | JournalSortField | sortField = JournalSortUnsorted , |
|
SortDirection | sortDirection = SortDirectionAscending | |||
) | [virtual] |
Return list of all journals.
Implements KCal::ResourceCalendar.
Definition at line 241 of file resourcecached.cpp.
Journal::List ResourceCached::rawJournalsForDate | ( | const QDate & | date | ) | [virtual] |
Return list of journals for the given date.
Implements KCal::ResourceCalendar.
Definition at line 246 of file resourcecached.cpp.
Todo::List ResourceCached::rawTodos | ( | TodoSortField | sortField = TodoSortUnsorted , |
|
SortDirection | sortDirection = SortDirectionAscending | |||
) | [virtual] |
Return list of all todos.
Implements KCal::ResourceCalendar.
Definition at line 213 of file resourcecached.cpp.
Todo::List ResourceCached::rawTodosForDate | ( | const QDate & | date | ) | [virtual] |
Returns list of todos due on the specified date.
Implements KCal::ResourceCalendar.
Definition at line 223 of file resourcecached.cpp.
void ResourceCached::readConfig | ( | const KConfig * | config | ) |
int ResourceCached::reloadInterval | ( | ) | const |
int ResourceCached::reloadPolicy | ( | ) | const |
void ResourceCached::saveCache | ( | ) |
void ResourceCached::saveChangesCache | ( | ) | [protected] |
Definition at line 413 of file resourcecached.cpp.
void ResourceCached::saveChangesCache | ( | const QMap< Incidence *, bool > & | map, | |
const QString & | type | |||
) | [protected] |
Definition at line 392 of file resourcecached.cpp.
int ResourceCached::saveInterval | ( | ) | const |
int ResourceCached::savePolicy | ( | ) | const |
void ResourceCached::setIdMapperIdentifier | ( | ) | [protected, slot] |
Definition at line 308 of file resourcecached.cpp.
void KCal::ResourceCached::setOwner | ( | const Person & | owner | ) |
Set the owner of the calendar.
Should be owner's full name.
Definition at line 651 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 72 of file resourcecached.cpp.
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 60 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 94 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 82 of file resourcecached.cpp.
void ResourceCached::setTimeZoneId | ( | const QString & | timeZoneId | ) | [virtual] |
Set id of timezone, e.g.
"Europe/Berlin"
Implements KCal::ResourceCalendar.
Definition at line 264 of file resourcecached.cpp.
void ResourceCached::setupReloadTimer | ( | ) | [protected] |
Definition at line 130 of file resourcecached.cpp.
void ResourceCached::setupSaveTimer | ( | ) | [protected] |
Definition at line 119 of file resourcecached.cpp.
void ResourceCached::slotReload | ( | ) | [protected, slot] |
Definition at line 583 of file resourcecached.cpp.
void ResourceCached::slotSave | ( | ) | [protected, slot] |
Definition at line 592 of file resourcecached.cpp.
QString ResourceCached::timeZoneId | ( | ) | const |
Definition at line 269 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 218 of file resourcecached.cpp.
void ResourceCached::writeConfig | ( | KConfig * | config | ) | [virtual] |
Reimplemented from KCal::ResourceCalendar.
Reimplemented in KCal::ResourceLocal, and KCal::ResourceLocalDir.
Definition at line 141 of file resourcecached.cpp.
Member Data Documentation
CalendarLocal KCal::ResourceCached::mCalendar [protected] |
Definition at line 284 of file resourcecached.h.
The documentation for this class was generated from the following files: