libkcal
KCal::CalendarResources Class Reference
#include <calendarresources.h>
Inheritance diagram for KCal::CalendarResources:

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 () |
QWidget * | dialogParentWidget () |
void | setDialogParentWidget (QWidget *parent) |
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) |
Classes | |
class | AskDestinationPolicy |
class | DestinationPolicy |
class | StandardDestinationPolicy |
class | Ticket |
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 299 of file calendarresources.cpp. |
|
Insert an Event into the Calendar.
Implements KCal::Calendar. Definition at line 293 of file calendarresources.cpp. |
|
Insert an Incidence into a Calendar Resource.
Definition at line 233 of file calendarresources.cpp. |
|
Insert an Incidence into the Calendar.
Reimplemented from KCal::Calendar. Definition at line 266 of file calendarresources.cpp. |
|
Insert a Journal into a Calendar Resource.
Definition at line 553 of file calendarresources.cpp. |
|
Insert a Journal into the Calendar.
Implements KCal::Calendar. Definition at line 526 of file calendarresources.cpp. |
|
Insert an Todo into a Calendar Resource.
Definition at line 346 of file calendarresources.cpp. |
|
Insert a Todo into a Calendar Resource.
Implements KCal::Calendar. Definition at line 340 of file calendarresources.cpp. |
|
Return a list of Alarms within a time range for this Calendar.
Implements KCal::Calendar. Definition at line 438 of file calendarresources.cpp. |
|
Return a list of Alarms that occur before the specified timestamp.
Definition at line 423 of file calendarresources.cpp. |
|
Flag that a change to a Calendar Incidence is starting.
Reimplemented from KCal::Calendar. Definition at line 718 of file calendarresources.cpp. |
|
Clear out the current Calendar, freeing all used memory etc.
Implements KCal::Calendar. Definition at line 192 of file calendarresources.cpp. |
|
Decrement the number of times this Resource has been changed by 1.
Definition at line 783 of file calendarresources.cpp. |
|
Remove an Event from the Calendar.
Implements KCal::Calendar. Definition at line 304 of file calendarresources.cpp. |
|
Remove a Journal from the Calendar.
Implements KCal::Calendar. Definition at line 532 of file calendarresources.cpp. |
|
Remove an Todo from the Calendar.
Implements KCal::Calendar. Definition at line 351 of file calendarresources.cpp. |
|
Returns the current parent for new dialogs. This is a bad hack, but we need to properly set the parent for the resource selection dialog. Otherwise the dialog will not be modal to the editor dialog in korganizer and the user can still work in the editor dialog (and thus crash korganizer). Afterwards we need to reset it (to avoid pointers to widgets that are already deleted) so we also need the accessor Definition at line 182 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.
Reimplemented from KCal::Calendar. Definition at line 665 of file calendarresources.cpp. |
|
Flag that a change to a Calendar Incidence has completed.
Reimplemented from KCal::Calendar. Definition at line 748 of file calendarresources.cpp. |
|
Returns the Event associated with the given unique identifier.
Implements KCal::Calendar. Definition at line 325 of file calendarresources.cpp. |
|
Increment the number of times this Resource has been changed by 1.
Definition at line 770 of file calendarresources.cpp. |
|
Determine if the Calendar is currently being saved.
Reimplemented from KCal::Calendar. Definition at line 221 of file calendarresources.cpp. |
|
Returns the Journal associated with the given unique identifier.
Implements KCal::Calendar. Definition at line 560 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 123 of file calendarresources.cpp. |
|
Return an unfiltered list of all Events occurring within a date range.
Implements KCal::Calendar. Definition at line 471 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Events.
Implements KCal::Calendar. Definition at line 507 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.
Implements KCal::Calendar. Definition at line 454 of file calendarresources.cpp. |
|
Return an unfiltered list of all Events which occur on the given timestamp.
Implements KCal::Calendar. Definition at line 489 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Journals for this Calendar.
Implements KCal::Calendar. Definition at line 577 of file calendarresources.cpp. |
|
Return an unfiltered list of all Journals for on the specifed date.
Implements KCal::Calendar. Definition at line 595 of file calendarresources.cpp. |
|
Return a sorted, unfiltered list of all Todos for this Calendar.
Implements KCal::Calendar. Definition at line 372 of file calendarresources.cpp. |
|
Return an unfiltered list of all Todos which are due on the specified date.
Implements KCal::Calendar. Definition at line 406 of file calendarresources.cpp. |
|
Read the Resources settings from a config file.
Definition at line 113 of file calendarresources.cpp. |
|
Release the save Ticket. The Calendar is unlocked without saving.
Definition at line 712 of file calendarresources.cpp. |
|
Reloads all incidences from all resources.
Implements KCal::Calendar. Definition at line 163 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 681 of file calendarresources.cpp. |
|
Get the Resource associated with a specified Incidence.
Definition at line 627 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 635 of file calendarresources.cpp. |
|
Get the CalendarResourceManager used by this calendar.
Definition at line 222 of file calendarresources.h. |
|
Sync changes in memory to persistant storage.
Implements KCal::Calendar. Definition at line 207 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 694 of file calendarresources.cpp. |
|
Set the destination policy such that Incidences are added to a Resource which is queried.
Definition at line 177 of file calendarresources.cpp. |
|
Set the widget parent for new dialogs. This is a bad hack, but we need to properly set the parent for the resource selection dialog. Otherwise the dialog will not be modal to the editor dialog in korganizer and the user can still work in the editor dialog (and thus crash korganizer). Definition at line 186 of file calendarresources.cpp. |
|
Set the destination policy such that Incidences are always added to the standard Resource.
Definition at line 172 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 Implements KCal::Calendar. Definition at line 675 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.
Implements KCal::Calendar. Definition at line 389 of file calendarresources.cpp. |
The documentation for this class was generated from the following files: