KCal::ResourceCalendar Class Reference
This class provides the interfaces for a calendar resource. More...
#include <resourcecalendar.h>
Inheritance diagram for KCal::ResourceCalendar:

Public Slots | |
virtual void | setSubresourceActive (const QString &, bool active) |
Signals | |
void | resourceChanged (ResourceCalendar *) |
void | resourceLoaded (ResourceCalendar *) |
void | resourceSaved (ResourceCalendar *) |
void | resourceLoadError (ResourceCalendar *, const QString &error) |
void | resourceSaveError (ResourceCalendar *, const QString &error) |
void | signalSubresourceAdded (ResourceCalendar *, const QString &, const QString &) |
void | signalSubresourceRemoved (ResourceCalendar *, const QString &, const QString &) |
Public Member Functions | |
ResourceCalendar (const KConfig *) | |
virtual void | writeConfig (KConfig *config) |
virtual QString | infoText () const |
bool | load () |
bool | save () |
virtual bool | isSaving () |
virtual KABC::Lock * | lock ()=0 |
virtual bool | addIncidence (Incidence *) |
virtual bool | addEvent (Event *event)=0 |
virtual void | deleteEvent (Event *)=0 |
virtual Event * | event (const QString &uid)=0 |
virtual Event::List | rawEvents ()=0 |
virtual Event::List | rawEventsForDate (const QDate &date, bool sorted=false)=0 |
virtual Event::List | rawEventsForDate (const QDateTime &qdt)=0 |
virtual Event::List | rawEvents (const QDate &start, const QDate &end, bool inclusive=false)=0 |
virtual bool | addTodo (Todo *todo)=0 |
virtual void | deleteTodo (Todo *)=0 |
virtual Todo * | todo (const QString &uid)=0 |
virtual Todo::List | rawTodos ()=0 |
virtual Todo::List | rawTodosForDate (const QDate &date)=0 |
virtual bool | addJournal (Journal *)=0 |
virtual void | deleteJournal (Journal *)=0 |
virtual Journal * | journal (const QDate &)=0 |
virtual Journal * | journal (const QString &uid)=0 |
virtual Journal::List | journals ()=0 |
virtual Alarm::List | alarms (const QDateTime &from, const QDateTime &to)=0 |
virtual Alarm::List | alarmsTo (const QDateTime &to)=0 |
Incidence::List | rawIncidences () |
virtual void | setTimeZoneId (const QString &tzid)=0 |
virtual QStringList | subresources () const |
virtual bool | subresourceActive (const QString &) const |
Protected Member Functions | |
virtual bool | doLoad ()=0 |
virtual bool | doSave ()=0 |
virtual void | addInfoText (QString &) const |
void | loadError (const QString &errorMessage=QString::null) |
void | saveError (const QString &errorMessage=QString::null) |
Detailed Description
This class provides the interfaces for a calendar resource.It makes use of the kresources framework.
- Warning:
- This code is still under heavy development. Don't expect source or binary compatibility in future versions.
Definition at line 53 of file resourcecalendar.h.
Member Function Documentation
|
Return rich text with info about the resource. Adds standard info and then calls addInfoText() to add info about concrete resources. Definition at line 42 of file resourcecalendar.cpp. References addInfoText(). |
|
Load resource data. After calling this function all data is accessible by calling the incidence/event/todo/etc. accessor functions. If data is actually loaded within this function or the loading is delayed until it is accessed by another function depends on the implementation of the resource. If loading the data takes significant time, the resource should return cached values, if available and return the results via the resourceChanged signal. When the resource has finished loading the resourceLoaded() signal is emitted. Calling this function multiple times should have the same effect as calling it once, given that the data isn't changed between calls. This function calls doLoad() which has to be reimplented by the resource to do the actual loading. Definition at line 80 of file resourcecalendar.cpp. References doLoad(), and loadError(). |
|
Save resource data. After calling this function it is safe to close the resource without losing data. If data is actually saved within this function or saving is delayed depends on the implementation of the resource. If saving the data takes significant time, the resource should return from the function, do the saving in the background and notify the end of the save by emitting the signal resourceSaved(). This function calls doSave() which has to be reimplented by the resource to do the actual loading. Definition at line 114 of file resourcecalendar.cpp. References doSave(), and saveError(). |
|
Return true if a save operation is still in progress, otherwise return false.
Reimplemented in KCal::ResourceKABC. Definition at line 109 of file resourcecalendar.h. |
|
Return object for locking the resource.
Implemented in KCal::ResourceKABC, and KCal::ResourceLocal.
Referenced by KCal::CalendarResources::requestSaveTicket(). |
|
Add incidence to resource. Definition at line 65 of file resourcecalendar.cpp. References KCal::Incidence::accept(). Referenced by KCal::CalendarResources::addIncidence(). |
|
Add event to resource.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by KCal::CalendarResources::addEvent(). |
|
Delete event from this resource.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Retrieves an event on the basis of the unique string ID.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return unfiltered list of all events in calendar. Use with care, this can be a bad idea for server-based calendars. Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by rawIncidences(). |
|
Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Get unfiltered events for date qdt.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
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. Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
This signal is emitted when the data in the resource has changed. The resource has to make sure that this signal is emitted whenever any pointers to incidences become invalid the resource has given to the calling code before. |
|
This signal is emitted when loading data into the resource has been finished.
|
|
This signal is emitted when saving the data of the resource has been finished.
|
|
This signal is emitted when an error occurs during loading.
Referenced by loadError(). |
|
This signal is emitted when an error occurs during saving.
Referenced by saveError(). |
|
This signal is emitted when a subresource is added.
|
|
This signal is emitted when a subresource is removed.
|
|
Add a todo to the todolist.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by KCal::CalendarResources::addTodo(). |
|
Remove a todo from the todolist.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Searches todolist for an event with this unique id.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return list of all todos.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by rawIncidences(). |
|
Returns list of todos due on the specified date.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Add a Journal entry to resource.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by KCal::CalendarResources::addJournal(). |
|
Remove a Journal entry from calendar.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return Journal for given date.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return Journal with given unique id.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return list of all Journals stored in calendar.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
Referenced by rawIncidences(). |
|
Return all alarms, which ocur in the given time interval.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Return all alarms, which ocur before given date.
Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
Returns a list of all incideces. Definition at line 71 of file resourcecalendar.cpp. References journals(), KCal::Calendar::mergeIncidenceList(), rawEvents(), and rawTodos(). |
|
Set time zone id used by this resource, e.g. "Europe/Berlin". Implemented in KCal::ResourceCached, and KCal::ResourceKABC.
|
|
If this resource has subresources, return a QStringList of them. In most cases, resources do not have subresources, so this is by default just empty. Definition at line 278 of file resourcecalendar.h. |
|
Is this subresource active or not? Definition at line 283 of file resourcecalendar.h. |
|
(De-)activate a subresource. Definition at line 76 of file resourcecalendar.cpp. |
|
Do the actual loading of the resource data. Called by load(). Implemented in KCal::ResourceKABC, and KCal::ResourceLocal.
Referenced by load(). |
|
Do the actual saving of the resource data. Called by save(). Implemented in KCal::ResourceKABC, and KCal::ResourceLocal.
Referenced by save(). |
|
Add info text for concrete resources. Called by infoText(). Reimplemented in KCal::ResourceCached. Definition at line 304 of file resourcecalendar.h. Referenced by infoText(). |
|
A resource should call this function if a load error happens. Definition at line 101 of file resourcecalendar.cpp. References resourceLoadError(). Referenced by load(). |
|
A resource should call this function if a save error happens. Definition at line 126 of file resourcecalendar.cpp. References resourceSaveError(). Referenced by save(). |
The documentation for this class was generated from the following files: