KCal::Calendar Class Reference
This is the main "calendar" object class for KOrganizer. More...
#include <calendar.h>
Inheritance diagram for KCal::Calendar:

Public Member Functions | |
Calendar (const QString &timeZoneId) | |
virtual void | close ()=0 |
Clears out the current calendar, freeing all used memory etc. | |
const QString & | getOwner () const |
Return the owner of the calendar's full name. | |
void | setOwner (const QString &os) |
Set the owner of the calendar. | |
const QString & | getEmail () |
Return the email address of the calendar owner. | |
void | setEmail (const QString &) |
Set the email address of the calendar owner. | |
void | setTimeZone (const QString &tz) |
Set time zone from a timezone string (e.g. | |
void | setTimeZone (int tz) |
Set time zone from a minutes value (e.g. | |
int | getTimeZone () const |
Return time zone as offest in minutes. | |
QString | getTimeZoneStr () const |
Compute an ISO 8601 format string from the time zone. | |
void | setTimeZoneId (const QString &) |
Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal values). | |
QString | timeZoneId () const |
Return time zone id. | |
void | setLocalTime () |
Use local time, not UTC or a time zone. | |
bool | isLocalTime () const |
Return whether local time is being used. | |
virtual void | addEvent (Event *anEvent)=0 |
Adds a Event to this calendar object. | |
virtual void | deleteEvent (Event *)=0 |
Delete event from calendar. | |
virtual Event * | event (const QString &UniqueStr)=0 |
Retrieves an event on the basis of the unique string ID. | |
QPtrList< Event > | events (const QDate &date, bool sorted=false) |
Builds and then returns a list of all events that match for the date specified. | |
QPtrList< Event > | events (const QDateTime &qdt) |
Get events, which occur on the given date. | |
QPtrList< Event > | events (const QDate &start, const QDate &end, bool inclusive=false) |
Get events in a range of dates. | |
virtual QPtrList< Event > | events () |
Return filtered list of all events in calendar. | |
virtual QPtrList< Event > | rawEvents ()=0 |
Return unfiltered list of all events in calendar. | |
virtual int | numEvents (const QDate &qd)=0 |
Returns the number of events that are present on the specified date. | |
virtual void | addTodo (Todo *todo)=0 |
Add a todo to the todolist. | |
virtual void | deleteTodo (Todo *)=0 |
Remove a todo from the todolist. | |
virtual QPtrList< Todo > | todos () |
Return filterd list of todos. | |
virtual Todo * | todo (const QString &uid)=0 |
Searches todolist for an event with this unique string identifier, returns a pointer or null. | |
virtual QPtrList< Todo > | todos (const QDate &date)=0 |
Returns list of todos due on the specified date. | |
virtual QPtrList< Todo > | rawTodos () const=0 |
Return unfiltered list of todos. | |
virtual void | addJournal (Journal *)=0 |
Add a Journal entry to calendar. | |
virtual Journal * | journal (const QDate &)=0 |
Return Journal for given date. | |
virtual Journal * | journal (const QString &UID)=0 |
Return Journal with given UID. | |
virtual QPtrList< Journal > | journals ()=0 |
Return list of all Journal entries. | |
void | addIncidence (Incidence *) |
Add an incidence to calendar. | |
void | setFilter (CalFilter *) |
Set calendar filter, which filters events for the events() functions. | |
CalFilter * | filter () |
Return calendar filter. | |
virtual Alarm::List | alarms (const QDateTime &from, const QDateTime &to)=0 |
Return all alarms, which ocur in the given time interval. | |
void | registerObserver (Observer *) |
void | setModified (bool) |
void | setLoadedProductId (const QString &) |
Set product id returned by loadedProductId(). | |
QString | loadedProductId () |
Return product id taken from file that has been loaded. | |
Protected Member Functions | |
virtual QPtrList< Event > | rawEventsForDate (const QDateTime &qdt)=0 |
Get unfiltered events, which occur on the given date. | |
virtual QPtrList< Event > | rawEventsForDate (const QDate &date, bool sorted=false)=0 |
Get unfiltered events, which occur on the given date. | |
virtual QPtrList< Event > | rawEvents (const QDate &start, const QDate &end, bool inclusive=false)=0 |
Get events in a range of dates. |
Detailed Description
This is the main "calendar" object class for KOrganizer.It holds information like all appointments/events, user information, etc. etc. one calendar is associated with each CalendarView (
- See also:
- calendarview.h). This is an abstract base class defining the interface to a calendar. It is implemented by subclasses like
CalendarLocal, which use different methods to store and access the data.
Definition at line 56 of file calendar.h.
Member Function Documentation
|
Clears out the current calendar, freeing all used memory etc.
Implemented in KCal::CalendarLocal. |
|
Return the owner of the calendar's full name.
Definition at line 124 of file calendar.cpp. |
|
Set the owner of the calendar. Should be owner's full name. Definition at line 129 of file calendar.cpp. References QString::find(), and QString::left(). |
|
Return the email address of the calendar owner.
Definition at line 218 of file calendar.cpp. Referenced by KCal::CalendarLocal::addEvent(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent(). |
|
Set the email address of the calendar owner.
Definition at line 223 of file calendar.cpp. |
|
Set time zone from a timezone string (e.g. -2:00) Definition at line 140 of file calendar.cpp. References QString::left(), QString::length(), QString::remove(), and QString::right(). Referenced by KCal::DndFactory::copyEvent(), KCal::DndFactory::createDrag(), KCal::DndFactory::createDragTodo(), KCal::DndFactory::createDrop(), KCal::DndFactory::createDropTodo(), and KCal::VCalFormat::populate(). |
|
Set time zone from a minutes value (e.g. -60) Definition at line 178 of file calendar.cpp. |
|
Return time zone as offest in minutes.
Definition at line 186 of file calendar.cpp. Referenced by KCal::VCalFormat::ISOToQDateTime(), and KCal::VCalFormat::qDateTimeToISO(). |
|
Compute an ISO 8601 format string from the time zone.
Definition at line 163 of file calendar.cpp. References QString::sprintf(). Referenced by KCal::DndFactory::copyEvent(), KCal::DndFactory::createDrag(), KCal::DndFactory::createDragTodo(), KCal::DndFactory::createDrop(), KCal::DndFactory::createDropTodo(), KCal::VCalFormat::save(), and KCal::VCalFormat::toString(). |
|
Set time zone id (see /usr/share/zoneinfo/zone.tab for list of legal values).
Definition at line 191 of file calendar.cpp. |
|
Return time zone id.
Definition at line 199 of file calendar.cpp. Referenced by KCal::ICalFormat::fromString(), and KCal::ICalFormat::toString(). |
|
Use local time, not UTC or a time zone.
Definition at line 204 of file calendar.cpp. |
|
Return whether local time is being used.
Definition at line 213 of file calendar.cpp. Referenced by KCal::ICalFormat::fromString(), and KCal::ICalFormat::toString(). |
|
Adds a Event to this calendar object.
Implemented in KCal::CalendarLocal. Referenced by KCal::VCalFormat::fromString(), KCal::DndFactory::pasteEvent(), and KCal::VCalFormat::populate(). |
|
Delete event from calendar.
Implemented in KCal::CalendarLocal. Referenced by KCal::DndFactory::cutEvent(). |
|
Retrieves an event on the basis of the unique string ID.
Implemented in KCal::CalendarLocal. Referenced by KCal::ICalFormat::parseScheduleMessage(), and KCal::VCalFormat::populate(). |
|
Builds and then returns a list of all events that match for the date specified. useful for dayView, etc. etc. The calendar filter is applied. Definition at line 240 of file calendar.cpp. References KCal::CalFilter::apply(), and rawEventsForDate(). Referenced by KCal::DndFactory::createDrop(), KCal::DndFactory::pasteEvent(), and KCal::VCalFormat::toString(). |
|
Get events, which occur on the given date. The calendar filter is applied. Definition at line 247 of file calendar.cpp. References KCal::CalFilter::apply(), and rawEventsForDate(). |
|
Get events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. The calendar filter is applied. Definition at line 254 of file calendar.cpp. References KCal::CalFilter::apply(), and rawEvents(). |
|
Return filtered list of all events in calendar.
Definition at line 262 of file calendar.cpp. References KCal::CalFilter::apply(), and rawEvents(). |
|
Return unfiltered list of all events in calendar.
Implemented in KCal::CalendarLocal. Referenced by events(), KCal::VCalFormat::save(), and KCal::ICalFormat::toString(). |
|
Returns the number of events that are present on the specified date.
Implemented in KCal::CalendarLocal. |
|
Add a todo to the todolist.
Implemented in KCal::CalendarLocal. Referenced by KCal::VCalFormat::populate(). |
|
Remove a todo from the todolist.
Implemented in KCal::CalendarLocal. |
|
Return filterd list of todos.
Reimplemented in KCal::CalendarLocal. Definition at line 277 of file calendar.cpp. References KCal::CalFilter::apply(), and rawTodos(). |
|
Searches todolist for an event with this unique string identifier, returns a pointer or null.
Implemented in KCal::CalendarLocal. Referenced by KCal::VCalFormat::populate(). |
|
Returns list of todos due on the specified date.
Implemented in KCal::CalendarLocal. |
|
Return unfiltered list of todos.
Implemented in KCal::CalendarLocal. Referenced by KCal::VCalFormat::save(), todos(), and KCal::ICalFormat::toString(). |
|
Add a Journal entry to calendar.
Implemented in KCal::CalendarLocal. |
|
Return Journal for given date.
Implemented in KCal::CalendarLocal. |
|
Return Journal with given UID.
Implemented in KCal::CalendarLocal. |
|
Return list of all Journal entries.
Implemented in KCal::CalendarLocal. Referenced by KCal::ICalFormat::toString(). |
|
Add an incidence to calendar.
Definition at line 270 of file calendar.cpp. References KCal::Incidence::accept(). |
|
Set calendar filter, which filters events for the events() functions. The Filter object is owned by the caller. Definition at line 230 of file calendar.cpp. |
|
Return calendar filter.
Definition at line 235 of file calendar.cpp. |
|
Return all alarms, which ocur in the given time interval.
Implemented in KCal::CalendarLocal. |
|
Set product id returned by loadedProductId(). This function is only useful for the calendar loading code. Definition at line 299 of file calendar.cpp. |
|
Return product id taken from file that has been loaded. Returns QString::null, if no calendar has been loaded. Definition at line 304 of file calendar.cpp. |
|
Get unfiltered events, which occur on the given date.
Implemented in KCal::CalendarLocal. Referenced by events(). |
|
Get unfiltered events, which occur on the given date.
Implemented in KCal::CalendarLocal. |
|
Get 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::CalendarLocal. |
The documentation for this class was generated from the following files: