KDE PIM / Developers / API Docs / libkcal

KCal::CalendarLocal Class Reference

This class provides a calendar stored as a local file. More...

#include <calendarlocal.h>

Inherits KCal::Calendar.

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

This class provides a calendar stored as a local file.


Constructor & Destructor Documentation

CalendarLocal::CalendarLocal (   ) 
 

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

CalendarLocal::CalendarLocal (  const QString &  timeZoneId  ) 
 

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


Member Function Documentation

bool CalendarLocal::load (  const QString &  fileName  ) 
 

Loads a calendar on disk in vCalendar or iCalendar format into the current calendar.

Incidences already present are preserved. If an event of the file to be loaded has the same unique id as an incidence already present the new incidence is ignored.

To load a CalendarLocal object from a file without preserving existing incidences call close() before load().

Returns:
true, if successful, false on error.
Parameters:
fileName the name of the calendar on disk.

bool CalendarLocal::save (  const QString &  fileName,
CalFormat *  format = 0
) 
 

Writes out the calendar to disk in the specified format.

CalendarLocal takes ownership of the CalFormat object.

Parameters:
fileName the name of the file
format the format to use
Returns:
true, if successful, false on error.

void CalendarLocal::close (   )  [virtual]
 

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

etc.

Implements KCal::Calendar.

void KCal::CalendarLocal::save (   )  [inline, virtual]
 

Sync changes in memory to persistant storage.

Implements KCal::Calendar.

bool CalendarLocal::addEvent (  Event *  event  )  [virtual]
 

Add Event to calendar.

Implements KCal::Calendar.

void CalendarLocal::deleteEvent (  Event *  event  )  [virtual]
 

Deletes an event from this calendar.

Implements KCal::Calendar.

void CalendarLocal::deleteAllEvents (   ) 
 

Deletes all events from this calendar.

Event * CalendarLocal::event (  const QString &  uid  )  [virtual]
 

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

Implements KCal::Calendar.

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

Return unfiltered list of all events in calendar.

Implements KCal::Calendar.

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

Add a todo to the todolist.

Implements KCal::Calendar.

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

Remove a todo from the todolist.

Implements KCal::Calendar.

void CalendarLocal::deleteAllTodos (   ) 
 

Deletes all todos from this calendar.

Todo * CalendarLocal::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 CalendarLocal::rawTodos (  TodoSortField  sortField = TodoSortUnsorted,
SortDirection  sortDirection = SortDirectionAscending
)  [virtual]
 

Return list of all todos.

Implements KCal::Calendar.

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

Returns list of todos due on the specified date.

Implements KCal::Calendar.

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

Add a Journal entry to calendar.

Implements KCal::Calendar.

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

Remove a Journal from the calendar.

Implements KCal::Calendar.

void CalendarLocal::deleteAllJournals (   ) 
 

Deletes all journals from this calendar.

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

Return Journal with given UID.

Implements KCal::Calendar.

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

Return list of all journals.

Implements KCal::Calendar.

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

Get unfiltered journals for a given date.

Implements KCal::Calendar.

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

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

Implements KCal::Calendar.

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

Return all alarms, which ocur before given date.

Event::List CalendarLocal::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 CalendarLocal::rawEventsForDate (  const QDateTime &  qdt  )  [virtual]
 

Get unfiltered events for date qdt.

Implements KCal::Calendar.

Event::List CalendarLocal::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. If inclusive is set to false, all events which overlap the range are returned. An event's entire time span is considered in evaluating whether it should be returned. For a non-recurring event, its span is from its start to its end date. For a recurring event, its time span is from its first to its last recurrence.

Implements KCal::Calendar.

void CalendarLocal::insertEvent (  Event *  event  )  [protected]
 

inserts an event into its "proper place" in the calendar.

void CalendarLocal::appendAlarms (  Alarm::List &  alarms,
Incidence *  incidence,
const QDateTime &  from,
const QDateTime &  to
)  [protected]
 

Append alarms of incidence in interval to list of alarms.

void CalendarLocal::appendRecurringAlarms (  Alarm::List &  alarms,
Incidence *  incidence,
const QDateTime &  from,
const QDateTime &  to
)  [protected]
 

Append alarms of recurring events in interval to list of alarms.


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