libkcal

#include <vcalformat.h>

Inheritance diagram for KCal::VCalFormat:
KCal::CalFormat

Public Member Functions

bool load (Calendar *calendar, const TQString &fileName)
 
bool save (Calendar *calendar, const TQString &fileName)
 
bool fromString (Calendar *, const TQString &)
 
TQString toString (Calendar *)
 
- Public Member Functions inherited from KCal::CalFormat
 CalFormat ()
 
virtual ~CalFormat ()
 
void clearException ()
 
ErrorFormatexception ()
 
const TQString & loadedProductId ()
 
void setException (ErrorFormat *error)
 

Protected Member Functions

TodoVTodoToEvent (VObject *vtodo)
 
EventVEventToEvent (VObject *vevent)
 
VObject * eventToVTodo (const Todo *anEvent)
 
VObject * eventToVEvent (const Event *anEvent)
 
TQString qDateToISO (const TQDate &)
 
TQString qDateTimeToISO (const TQDateTime &, bool zulu=TRUE)
 
TQDateTime ISOToTQDateTime (const TQString &dtStr)
 
TQDate ISOToTQDate (const TQString &dtStr)
 
void populate (VObject *vcal)
 
const char * dayFromNum (int day)
 
int numFromDay (const TQString &day)
 
Attendee::PartStat readStatus (const char *s) const
 
TQCString writeStatus (Attendee::PartStat status) const
 

Additional Inherited Members

- Static Public Member Functions inherited from KCal::CalFormat
static void setApplication (const TQString &app, const TQString &productID)
 
static const TQString & application ()
 
static const TQString & productId ()
 
static TQString createUniqueId ()
 
- Protected Attributes inherited from KCal::CalFormat
TQString mLoadedProductId
 

Detailed Description

This class implements the vCalendar format.

It provides methods for loading/saving/converting vCalendar format data into the internal KOrganizer representation as Calendar and Events.

vCalendar format implementation

Definition at line 44 of file vcalformat.h.

Member Function Documentation

◆ dayFromNum()

const char * VCalFormat::dayFromNum ( int  day)
protected

takes a number 0 - 6 and returns the two letter string of that day, i.e.

MO, TU, WE, etc.

Definition at line 1546 of file vcalformat.cpp.

◆ eventToVEvent()

VObject * VCalFormat::eventToVEvent ( const Event anEvent)
protected

translate a Event into a VObject and returns a pointer to it.

Definition at line 365 of file vcalformat.cpp.

◆ eventToVTodo()

VObject * VCalFormat::eventToVTodo ( const Todo anEvent)
protected

translate a Event into a VTodo-type VObject and return pointer

Definition at line 203 of file vcalformat.cpp.

◆ fromString()

bool VCalFormat::fromString ( Calendar calendar,
const TQString &  text 
)
virtual

Parse string and populate calendar with that information.

Implements KCal::CalFormat.

Definition at line 136 of file vcalformat.cpp.

◆ ISOToTQDate()

TQDate VCalFormat::ISOToTQDate ( const TQString &  dtStr)
protected

takes a string in the format YYYYMMDD and returns a valid TQDate.

Definition at line 1400 of file vcalformat.cpp.

◆ ISOToTQDateTime()

TQDateTime VCalFormat::ISOToTQDateTime ( const TQString &  dtStr)
protected

takes a string in the format YYYYMMDDTHHMMSS and returns a valid TQDateTime.

Definition at line 1373 of file vcalformat.cpp.

◆ load()

bool VCalFormat::load ( Calendar calendar,
const TQString &  fileName 
)
virtual

Loads a calendar on disk in vCalendar format into the given calendar.

Parameters
calendarCalendar object the loaded data is stored into.
fileNameName of the vCalendar file on disk.
Returns
true on success, otherwise false

Implements KCal::CalFormat.

Definition at line 58 of file vcalformat.cpp.

◆ numFromDay()

int VCalFormat::numFromDay ( const TQString &  day)
protected

the reverse of the above function.

Definition at line 1553 of file vcalformat.cpp.

◆ populate()

void VCalFormat::populate ( VObject *  vcal)
protected

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 1414 of file vcalformat.cpp.

◆ qDateTimeToISO()

TQString VCalFormat::qDateTimeToISO ( const TQDateTime &  qdt,
bool  zulu = TRUE 
)
protected

takes a TQDateTime and returns a string in format YYYYMMDDTHHMMSS

Definition at line 1350 of file vcalformat.cpp.

◆ qDateToISO()

TQString VCalFormat::qDateToISO ( const TQDate &  qd)
protected

takes a TQDate and returns a string in the format YYYYMMDDTHHMMSS

Definition at line 1324 of file vcalformat.cpp.

◆ save()

bool VCalFormat::save ( Calendar calendar,
const TQString &  fileName 
)
virtual

Writes out the given calendar to disk in vCalendar format.

Parameters
calendarCalendar object holding data to be written
fileNamethe name of the file
Returns
true on success, otherwise false

Implements KCal::CalFormat.

Definition at line 90 of file vcalformat.cpp.

◆ toString()

TQString VCalFormat::toString ( Calendar calendar)
virtual

Return calendar information as string.

Implements KCal::CalFormat.

Definition at line 172 of file vcalformat.cpp.

◆ VEventToEvent()

Event * VCalFormat::VEventToEvent ( VObject *  vevent)
protected

translates a VObject into a Event and returns a pointer to it.

Definition at line 857 of file vcalformat.cpp.

◆ VTodoToEvent()

Todo * VCalFormat::VTodoToEvent ( VObject *  vtodo)
protected

translates a VObject of the TODO type into a Event

Definition at line 651 of file vcalformat.cpp.


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