KCal::VCalFormat Class Reference
This class implements the vCalendar format. vCalendar format implementation. More...
#include <vcalformat.h>
Inheritance diagram for KCal::VCalFormat:

Public Member Functions | |
bool | load (Calendar *, const QString &fileName) |
loads a calendar on disk in vCalendar format into the current calendar. | |
bool | save (Calendar *, const QString &fileName) |
writes out the calendar to disk in vCalendar format. | |
bool | fromString (Calendar *, const QString &) |
Parse string and populate calendar with that information. | |
QString | toString (Calendar *) |
Return calendar information as string. | |
Protected Member Functions | |
Todo * | VTodoToEvent (VObject *vtodo) |
translates a VObject of the TODO type into a Event | |
Event * | VEventToEvent (VObject *vevent) |
translates a VObject into a Event and returns a pointer to it. | |
VObject * | eventToVTodo (const Todo *anEvent) |
translate a Event into a VTodo-type VObject and return pointer | |
VObject * | eventToVEvent (const Event *anEvent) |
translate a Event into a VObject and returns a pointer to it. | |
QString | qDateToISO (const QDate &) |
takes a QDate and returns a string in the format YYYYMMDDTHHMMSS | |
QString | qDateTimeToISO (const QDateTime &, bool zulu=TRUE) |
takes a QDateTime and returns a string in format YYYYMMDDTHHMMSS | |
QDateTime | ISOToQDateTime (const QString &dtStr) |
takes a string in the format YYYYMMDDTHHMMSS and returns a valid QDateTime. | |
QDate | ISOToQDate (const QString &dtStr) |
takes a string in the format YYYYMMDD and returns a valid QDate. | |
void | populate (VObject *vcal) |
takes a vCalendar tree of VObjects, and puts all of them that have the "event" property into the dictionary, todos in the todo-list, etc. | |
const char * | dayFromNum (int day) |
takes a number 0 - 6 and returns the two letter string of that day, i.e. | |
int | numFromDay (const QString &day) |
the reverse of the above function. | |
Attendee::PartStat | readStatus (const char *s) const |
QCString | writeStatus (Attendee::PartStat status) const |
Detailed Description
This class implements the vCalendar format. vCalendar format implementation.It provides methods for loading/saving/converting vCalendar format data into the internal KOrganizer representation as Calendar and Events.
Definition at line 40 of file vcalformat.h.
Member Function Documentation
|
loads a calendar on disk in vCalendar format into the current calendar. any information already present is lost. Returns TRUE if successful, else returns FALSE.
Implements KCal::CalFormat. Definition at line 54 of file vcalformat.cpp. References KCal::CalFormat::clearException(), QFile::encodeName(), populate(), and KCal::CalFormat::setException(). |
|
writes out the calendar to disk in vCalendar format. Returns true if successful and false on error.
Implements KCal::CalFormat. Definition at line 86 of file vcalformat.cpp. References QPtrListIterator::current(), QFile::encodeName(), eventToVEvent(), eventToVTodo(), QFile::exists(), QPtrList::first(), KCal::Calendar::getTimeZoneStr(), QString::local8Bit(), QPtrList::next(), KCal::CalFormat::productId(), KCal::Calendar::rawEvents(), and KCal::Calendar::rawTodos(). |
|
Parse string and populate calendar with that information.
Implements KCal::CalFormat. Definition at line 132 of file vcalformat.cpp. References KCal::Calendar::addEvent(), QString::utf8(), and VEventToEvent(). Referenced by KCal::VCalDrag::decode(). |
|
Return calendar information as string.
Implements KCal::CalFormat. Definition at line 167 of file vcalformat.cpp. References KCal::Calendar::events(), eventToVEvent(), QPtrList::first(), KCal::Calendar::getTimeZoneStr(), and QString::local8Bit(). Referenced by KCal::VCalDrag::VCalDrag(). |
|
|
|
|
|
takes a QDate and returns a string in the format YYYYMMDDTHHMMSS
Definition at line 1370 of file vcalformat.cpp. References QDate::day(), QDate::isValid(), QDate::month(), QString::sprintf(), and QDate::year(). Referenced by eventToVEvent(). |
|
takes a QDateTime and returns a string in format YYYYMMDDTHHMMSS
Definition at line 1382 of file vcalformat.cpp. References QDateTime::addSecs(), QDateTime::date(), KCal::Calendar::getTimeZone(), QString::sprintf(), and QDateTime::time(). Referenced by eventToVEvent(), and eventToVTodo(). |
|
takes a string in the format YYYYMMDDTHHMMSS and returns a valid QDateTime.
Definition at line 1404 of file vcalformat.cpp. References QDateTime::addSecs(), KCal::Calendar::getTimeZone(), QTime::isValid(), QDate::isValid(), QString::left(), QString::mid(), QTime::setHMS(), and QDate::setYMD(). Referenced by VEventToEvent(), and VTodoToEvent(). |
|
takes a string in the format YYYYMMDD and returns a valid QDate.
Definition at line 1430 of file vcalformat.cpp. References QString::left(), and QString::mid(). Referenced by VEventToEvent(). |
|
takes a vCalendar tree of VObjects, and puts all of them that have the "event" property into the dictionary, todos in the todo-list, etc.
Definition at line 1444 of file vcalformat.cpp. References KCal::Calendar::addEvent(), KCal::Calendar::addTodo(), QPtrList< Todo >::clear(), QPtrList< Event >::clear(), KCal::Event::dtEnd(), KCal::IncidenceBase::dtStart(), KCal::Calendar::event(), QPtrList< Todo >::first(), QPtrList< Event >::first(), QDateTime::isValid(), QPtrList< Todo >::next(), QPtrList< Event >::next(), KCal::CalFormat::productId(), KCal::Incidence::relatedToUid(), KCal::Incidence::setRelatedTo(), KCal::Calendar::setTimeZone(), KCal::Calendar::todo(), VEventToEvent(), and VTodoToEvent(). Referenced by load(). |
|
takes a number 0 - 6 and returns the two letter string of that day, i.e. MO, TU, WE, etc. Definition at line 1578 of file vcalformat.cpp. Referenced by eventToVEvent(). |
|
the reverse of the above function.
Definition at line 1585 of file vcalformat.cpp. Referenced by VEventToEvent(). |
The documentation for this class was generated from the following files: