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.
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 *)
- Event * event (const QString &UniqueStr)
- Event::List events ()
- Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
- 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 *)
- 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 void 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 &tzid)
- QString timeZoneId () const
- 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
Protected Member Functions
- void calendarIncidenceAdded (KCal::Incidence *)
- void calendarIncidenceChanged (KCal::Incidence *)
- void calendarIncidenceDeleted (KCal::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
Detailed Description
This class provides a calendar resource using a local CalendarLocal object to cache the calendar data.
Member Enumeration Documentation
|
Reload policy.
|
|
Save policy.
|
Member Function Documentation
|
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 |
|
Return reload policy.
|
|
Set reload interval in minutes which is used when reload policy is ReloadInterval.
|
|
Return reload interval in minutes.
|
|
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 |
|
Return save policy.
|
|
Set save interval in minutes which is used when save policy is SaveInterval.
|
|
Return save interval in minutes.
|
|
Set time of last load.
|
|
Return time of last load.
|
|
Set time of last save.
|
|
Return time of last save.
|
|
Add event to calendar.
Implements KCal::ResourceCalendar. |
|
Deletes an event from this calendar.
Implements KCal::ResourceCalendar. |
|
Retrieves an event on the basis of the unique string ID.
Implements KCal::ResourceCalendar. |
|
Return filtered list of all events in calendar.
|
|
Return unfiltered list of all events in calendar.
Implements KCal::ResourceCalendar. |
|
Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. Implements KCal::ResourceCalendar. |
|
Get unfiltered events for date qdt.
Implements KCal::ResourceCalendar. |
|
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. |
|
Add a todo to the todolist.
Implements KCal::ResourceCalendar. |
|
Remove a todo from the todolist.
Implements KCal::ResourceCalendar. |
|
Searches todolist for an event with this unique string identifier, returns a pointer or null.
Implements KCal::ResourceCalendar. |
|
Return list of all todos.
Implements KCal::ResourceCalendar. |
|
Returns list of todos due on the specified date.
Implements KCal::ResourceCalendar. |
|
Add a Journal entry to calendar.
Implements KCal::ResourceCalendar. |
|
Remove a Journal from the calendar.
Implements KCal::ResourceCalendar. |
|
Return Journal with given unique id.
Implements KCal::ResourceCalendar. |
|
Return list of all journals.
Implements KCal::ResourceCalendar. |
|
Return list of journals for the given date.
Implements KCal::ResourceCalendar. |
|
Return all alarms, which ocur in the given time interval.
Implements KCal::ResourceCalendar. |
|
Return all alarms, which ocur before given date.
Implements KCal::ResourceCalendar. |
|
Set id of timezone, e.g. "Europe/Berlin" Implements KCal::ResourceCalendar. |
|
Loads the cache, this method should be called on load.
|
|
Saves the cache back.
|
|
Clear cache.
|
|
Returns a reference to the id mapper.
|
|
Virtual method from KRES::Resource, called when the last instace of the resource is closed.
|
|
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 |
|
Check if reload required according to reload policy.
|
|
Check if save required according to save policy.
|
|
Add info text for concrete resources. Called by infoText(). Reimplemented from KCal::ResourceCalendar. |
|
This method is used by loadCache() and saveCache(), reimplement it to change the location of the cache.
|
|
Functions for keeping the changes persistent.
|
The documentation for this class was generated from the following files:
- resourcecached.h
- resourcecached.cpp