KDE PIM / Developers / API Docs / libkcal

KCal::CalendarResources Class Reference

This class provides a calendar composed of several calendar resources. More...

#include <calendarresources.h>

Inherits KCal::Calendar, and ManagerObserver.

List of all members.

Signals

Public Member Functions

Protected Slots

Protected Member Functions


Detailed Description

This class provides a calendar composed of several calendar resources.


Constructor & Destructor Documentation

CalendarResources::CalendarResources (  const QString &  timeZoneId = QString::fromLatin1("UTC"),
const QString &  family = QString::fromLatin1("calendar")
) 
 

constructs a new calendar, with variables initialized to sane values.


Member Function Documentation

void CalendarResources::readConfig (  KConfig *  config = 0  ) 
 

Read the resources settings from a config file.

You have to call this method before load().

Parameters:
config The KConfig object which points to the config file. If no object is given (null pointer) the standard config file is used.

void CalendarResources::load (   ) 
 

Loads all events from the resources.

You have to add the resources first or call readConfig() to load the system resources.

CalendarResourceManager* KCal::CalendarResources::resourceManager (   )  const [inline]
 

Return ResourceManager used by this calendar.

void CalendarResources::setStandardDestinationPolicy (   ) 
 

Set the destinatinpolicy to add incidences always to the standard resource.

void CalendarResources::setAskDestinationPolicy (   ) 
 

Set the destinatinpolicy to ask to which resource incidences are added.

void CalendarResources::close (   )  [virtual]
 

clears out the current calendar, freeing all used memory etc.

etc.

Implements KCal::Calendar.

CalendarResources::Ticket * CalendarResources::requestSaveTicket (  ResourceCalendar *   ) 
 

Request ticket for saving the calendar.

If a ticket is returned the calendar is locked for write access until save() or releaseSaveTicket() is called.

bool CalendarResources::save (  Ticket *  ,
Incidence *  incidence = 0
)  [virtual]
 

Save calendar if incidence == 0, else save only this incidence.

If save is successfull, the ticket is deleted. Otherwise the caller has to release the ticket with releaseSaveTicket() to abandon the save operation or to call save() to try to save again.

void CalendarResources::releaseSaveTicket (  Ticket *  ticket  )  [virtual]
 

Release the save ticket.

The calendar is unlocked without saving.

void CalendarResources::save (   )  [virtual]
 

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

bool CalendarResources::addIncidence (  Incidence *   )  [virtual]
 

Add an incidence to calendar.

Returns:
true on success, false on error.

Reimplemented from KCal::Calendar.

bool CalendarResources::addEvent (  Event *  anEvent  )  [virtual]
 

Add Event to calendar.

Implements KCal::Calendar.

bool CalendarResources::addEvent (  Event *  anEvent,
ResourceCalendar *  resource
) 
 

Add Event to a resource.

void CalendarResources::deleteEvent (  Event *   )  [virtual]
 

deletes an event from this calendar.

Implements KCal::Calendar.

Event * CalendarResources::event (  const QString &  UniqueStr  )  [virtual]
 

Retrieves an event on the basis of the unique string ID.

Implements KCal::Calendar.

Event::List CalendarResources::rawEvents (  EventSortField  sortField = EventSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
)  [virtual]
 

Return unfiltered list of all events in calendar.

Implements KCal::Calendar.

bool CalendarResources::addTodo (  Todo *  todo  )  [virtual]
 

Add a todo to the todolist.

Implements KCal::Calendar.

bool CalendarResources::addTodo (  Todo *  todo,
ResourceCalendar *  resource
) 
 

Add Todo to a resource.

void CalendarResources::deleteTodo (  Todo *   )  [virtual]
 

Remove a todo from the todolist.

Implements KCal::Calendar.

Todo * CalendarResources::todo (  const QString &  uid  )  [virtual]
 

Searches todolist for an event with this unique string identifier, returns a pointer or null.

Implements KCal::Calendar.

Todo::List CalendarResources::rawTodos (  TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
)  [virtual]
 

Return list of all todos.

Implements KCal::Calendar.

Todo::List CalendarResources::rawTodosForDate (  const QDate &  date  )  [virtual]
 

Returns list of todos due on the specified date.

Implements KCal::Calendar.

bool CalendarResources::addJournal (  Journal *   )  [virtual]
 

Add a Journal entry to calendar.

Implements KCal::Calendar.

void CalendarResources::deleteJournal (  Journal *   )  [virtual]
 

Remove journal entry.

Implements KCal::Calendar.

bool CalendarResources::addJournal (  Journal *  journal,
ResourceCalendar *  resource
) 
 

Add Journal to a resource.

Journal * CalendarResources::journal (  const QString &  uid  )  [virtual]
 

Return Journal with given UID.

Implements KCal::Calendar.

Journal::List CalendarResources::rawJournals (  JournalSortField  sortField = JournalSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
)  [virtual]
 

Return list of all journals.

Implements KCal::Calendar.

Journal::List CalendarResources::rawJournalsForDate (  const QDate &  date  )  [virtual]
 

Returns list of journals for the given date.

Implements KCal::Calendar.

Alarm::List CalendarResources::alarms (  const QDateTime &  from,
const QDateTime &  to
)  [virtual]
 

Return all alarms, which ocur in the given time interval.

Implements KCal::Calendar.

Alarm::List CalendarResources::alarmsTo (  const QDateTime &  to  ) 
 

Return all alarms, which ocur before given date.

ResourceCalendar * CalendarResources::resource (  Incidence *   ) 
 

Return Resource for given uid.

Event::List CalendarResources::rawEventsForDate (  const QDate &  date,
bool  sorted = false
)  [virtual]
 

Builds and then returns a list of all events that match for the date specified.

useful for dayView, etc. etc.

Implements KCal::Calendar.

Event::List CalendarResources::rawEventsForDate (  const QDateTime &  qdt  )  [virtual]
 

Get unfiltered events for date qdt.

Implements KCal::Calendar.

Event::List CalendarResources::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::Calendar.

void CalendarResources::doSetTimeZoneId (  const QString &  tzid  )  [protected, virtual]
 

let the subclasses of KCal::Calendar set the time zone

Reimplemented from KCal::Calendar.


The documentation for this class was generated from the following files: