libkcal
KCal::CalendarResources Class Reference
#include <calendarresources.h>
Detailed Description
This class provides a Calendar which is composed of other Calendars known as "Resources".Examples of Calendar Resources are:
- Calendars stored as local ICS formatted files
- a set of incidences (one-per-file) within a local directory
- birthdays and anniversaries contained in an addressbook
Definition at line 64 of file calendarresources.h.
Signals | |
void | signalResourceModified (ResourceCalendar *resource) |
void | signalResourceAdded (ResourceCalendar *resource) |
void | signalResourceDeleted (ResourceCalendar *resource) |
void | signalErrorMessage (const QString &err) |
Public Member Functions | |
CalendarResources (const QString &timeZoneId, const QString &family=QString::fromLatin1("calendar")) | |
~CalendarResources () | |
void | load () |
bool | reload (const QString &tz) |
void | close () |
virtual bool | save (Ticket *ticket, Incidence *incidence=0) |
void | save () |
bool | isSaving () |
CalendarResourceManager * | resourceManager () const |
ResourceCalendar * | resource (Incidence *incidence) |
void | readConfig (KConfig *config=0) |
void | setStandardDestinationPolicy () |
void | setAskDestinationPolicy () |
Ticket * | requestSaveTicket (ResourceCalendar *resource) |
virtual void | releaseSaveTicket (Ticket *ticket) |
void | resourceAdded (ResourceCalendar *resource) |
bool | addIncidence (Incidence *incidence) |
bool | addIncidence (Incidence *incidence, ResourceCalendar *resource) |
bool | beginChange (Incidence *incidence) |
bool | endChange (Incidence *incidence) |
bool | addEvent (Event *event) |
bool | addEvent (Event *event, ResourceCalendar *resource) |
bool | deleteEvent (Event *event) |
Event::List | rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event::List | rawEventsForDate (const QDateTime &qdt) |
Event::List | rawEvents (const QDate &start, const QDate &end, bool inclusive=false) |
Event::List | rawEventsForDate (const QDate &date, EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Event * | event (const QString &uid) |
bool | addTodo (Todo *todo) |
bool | addTodo (Todo *todo, ResourceCalendar *resource) |
bool | deleteTodo (Todo *todo) |
Todo::List | rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Todo::List | rawTodosForDate (const QDate &date) |
Todo * | todo (const QString &uid) |
bool | addJournal (Journal *journal) |
bool | addJournal (Journal *journal, ResourceCalendar *resource) |
bool | deleteJournal (Journal *journal) |
Journal::List | rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) |
Journal::List | rawJournalsForDate (const QDate &date) |
Journal * | journal (const QString &uid) |
Alarm::List | alarms (const QDateTime &from, const QDateTime &to) |
Alarm::List | alarmsTo (const QDateTime &to) |
void | setTimeZoneIdViewOnly (const QString &tz) |
Protected Slots | |
void | slotLoadError (ResourceCalendar *resource, const QString &err) |
void | slotSaveError (ResourceCalendar *resource, const QString &err) |
Protected Member Functions | |
void | connectResource (ResourceCalendar *resource) |
void | resourceModified (ResourceCalendar *resource) |
void | resourceDeleted (ResourceCalendar *resource) |
virtual void | doSetTimeZoneId (const QString &timeZoneId) |
int | incrementChangeCount (ResourceCalendar *resource) |
int | decrementChangeCount (ResourceCalendar *resource) |
Constructor & Destructor Documentation
|
Construct CalendarResource object using a Time Zone and a Family name.
Definition at line 86 of file calendarresources.cpp. |
|
Destructor.
Definition at line 105 of file calendarresources.cpp. |
Member Function Documentation
|
Insert an Event into a Calendar Resource.
Definition at line 287 of file calendarresources.cpp. |
|
Insert an Event into the Calendar.
Definition at line 281 of file calendarresources.cpp. |
|
Insert an Incidence into a Calendar Resource.
Definition at line 221 of file calendarresources.cpp. |
|
Insert an Incidence into the Calendar.
Definition at line 254 of file calendarresources.cpp. |
|
Insert a Journal into a Calendar Resource.
Definition at line 541 of file calendarresources.cpp. |
|
Insert a Journal into the Calendar.
Definition at line 514 of file calendarresources.cpp. |
|
Insert an Todo into a Calendar Resource.
Definition at line 334 of file calendarresources.cpp. |
|
Insert a Todo into a Calendar Resource.
Definition at line 328 of file calendarresources.cpp. |
|
Return a list of Alarms within a time range for this Calendar.
Definition at line 426 of file calendarresources.cpp. |
|
Return a list of Alarms that occur before the specified timestamp.
Definition at line 411 of file calendarresources.cpp. |
|
Flag that a change to a Calendar Incidence is starting.
Definition at line 706 of file calendarresources.cpp. |
|
Clear out the current Calendar, freeing all used memory etc.
Definition at line 180 of file calendarresources.cpp. |
|
Decrement the number of times this Resource has been changed by 1.
Definition at line 771 of file calendarresources.cpp. |
|
Remove an Event from the Calendar.
Definition at line 292 of file calendarresources.cpp. |
|
Remove a Journal from the Calendar.
Definition at line 520 of file calendarresources.cpp. |
|
Remove an Todo from the Calendar.
Definition at line 339 of file calendarresources.cpp. |
|
Let CalendarResource subclasses set the Time Zone ID.
First parameter is a string containing a Time Zone ID, which is assumed to be valid. On some systems, /usr/share/zoneinfo/zone.tab may be available for reference.
Definition at line 653 of file calendarresources.cpp. |
|
Flag that a change to a Calendar Incidence has completed.
Definition at line 736 of file calendarresources.cpp. |
|
Returns the Event associated with the given unique identifier.
Definition at line 313 of file calendarresources.cpp. |
|
Increment the number of times this Resource has been changed by 1.
Definition at line 758 of file calendarresources.cpp. |
|
Determine if the Calendar is currently being saved.
Definition at line 209 of file calendarresources.cpp. |
|
Returns the Journal associated with the given unique identifier.
Definition at line 548 of file calendarresources.cpp. |
|
Loads all Incidences from the Resources. The Resources must be added first using either readConfig(KConfig *config), which adds the system Resources, or manually using resourceAdded(ResourceCalendar *resource). Definition at line 121 of file calendarresources.cpp. |
|
Return an unfiltered list of all Events occurring within a date range.
Definition at line 459 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Events.
Definition at line 495 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Events which occur on the given date. The Events are sorted according to sortField and sortDirection.
Definition at line 442 of file calendarresources.cpp. |
|
Return an unfiltered list of all Events which occur on the given timestamp.
Definition at line 477 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Journals for this Calendar.
Definition at line 565 of file calendarresources.cpp. |
|
Return an unfiltered list of all Journals for on the specifed date.
Definition at line 583 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Todos for this Calendar.
Definition at line 360 of file calendarresources.cpp. |
|
Return an unfiltered list of all Todos which are due on the specified date.
Definition at line 394 of file calendarresources.cpp. |
|
Read the Resources settings from a config file.
Definition at line 111 of file calendarresources.cpp. |
|
Release the save Ticket. The Calendar is unlocked without saving.
Definition at line 700 of file calendarresources.cpp. |
|
Reloads all incidences from all resources.
Definition at line 161 of file calendarresources.cpp. |
|
Request ticket for saving the Calendar. If a ticket is returned the Calendar is locked for write access until save() or releaseSaveTicket() is called.
Definition at line 669 of file calendarresources.cpp. |
|
Get the Resource associated with a specified Incidence.
Definition at line 615 of file calendarresources.cpp. |
|
Add a Resource to the Calendar. This method must be public, because in-process added Resources do not emit the corresponding signal, so this methodd has to be called manually!
Definition at line 623 of file calendarresources.cpp. |
|
Get the CalendarResourceManager used by this calendar.
Definition at line 219 of file calendarresources.h. |
|
Sync changes in memory to persistant storage.
Definition at line 195 of file calendarresources.cpp. |
|
Save this Calendar. If the save is successfull, the Ticket is deleted. Otherwise, the caller must release the Ticket with releaseSaveTicket() to abandon the save operation or call save() to try the save again.
Definition at line 682 of file calendarresources.cpp. |
|
Set the destination policy such that Incidences are added to a Resource which is queried.
Definition at line 175 of file calendarresources.cpp. |
|
Set the destination policy such that Incidences are always added to the standard Resource.
Definition at line 170 of file calendarresources.cpp. |
|
Set the viewing time zone, which requires that all resources are saved, and then reloaded such that the event times are re-interpreted in the new timezone. Note that the absolute times of events do not change with this. If you want to change the times of the contents of the resources, use setTimeZoneId Definition at line 663 of file calendarresources.cpp. |
|
Signal an error message.
|
|
Signal that an Incidence has been inserted to the Resource.
|
|
Signal that an Incidence has been removed from the Resource.
|
|
Signal that the Resource has been modified.
|
|
Returns the Todo associated with the given unique identifier.
Definition at line 377 of file calendarresources.cpp. |
The documentation for this class was generated from the following files: