libkcal Library API Documentation

KCal::ICalFormat Class Reference

This class implements the iCalendar format. iCalendar format implementation. More...

#include <icalformat.h>

Inheritance diagram for KCal::ICalFormat:

KCal::CalFormat List of all members.

Public Member Functions

 ICalFormat ()
 Create new iCalendar format.

bool load (Calendar *, const QString &fileName)
 Loads a calendar on disk in iCalendar format into calendar.

bool save (Calendar *, const QString &fileName)
 Writes out the calendar to disk in iCalendar format.

bool fromString (Calendar *, const QString &)
 Parse string and populate calendar with that information.

QString toString (Calendar *)
 Return calendar information as string.

QString toString (Incidence *)
 Return incidence as iCalendar formatted text.

QString toString (Recurrence *)
 Return recurrence as iCalendar formatted text.

bool fromString (Recurrence *, const QString &)
 Parse string and fill recurrence object with that information.

QString createScheduleMessage (IncidenceBase *e, Scheduler::Method m)
 Create a scheduling message for event e using method .

ScheduleMessageparseScheduleMessage (Calendar *, const QString &s)
 Parse scheduling message provided as string .

void setTimeZone (const QString &id, bool utc)
 Set id of used time zone and whether this time zone is UTC or not.

QString timeZoneId () const
bool utc () const

Detailed Description

This class implements the iCalendar format. iCalendar format implementation.

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

Definition at line 40 of file icalformat.h.


Constructor & Destructor Documentation

ICalFormat::ICalFormat  ) 
 

Create new iCalendar format.

Definition at line 49 of file icalformat.cpp.


Member Function Documentation

bool ICalFormat::load Calendar ,
const QString fileName
[virtual]
 

Loads a calendar on disk in iCalendar format into calendar.

Returns true if successful, else returns false. Provides more error information by exception().

Parameters:
calendar Calendar object to be filled.
fileName The name of the calendar file on disk.

Implements KCal::CalFormat.

Definition at line 62 of file icalformat.cpp.

References KCal::CalFormat::clearException(), QFile::close(), fromString(), QFile::open(), QTextStream::read(), and KCal::CalFormat::setException().

bool ICalFormat::save Calendar ,
const QString fileName
[virtual]
 

Writes out the calendar to disk in iCalendar format.

Returns true if successful and false on error.

Parameters:
calendar The Calendar object to be written.
fileName The name of the calendar file on disk.

Implements KCal::CalFormat.

Definition at line 82 of file icalformat.cpp.

References KCal::CalFormat::clearException(), QFile::close(), QString::isNull(), QFile::open(), KCal::CalFormat::setException(), and toString().

bool ICalFormat::fromString Calendar ,
const QString
[virtual]
 

Parse string and populate calendar with that information.

Implements KCal::CalFormat.

Definition at line 107 of file icalformat.cpp.

References KCal::CalFormat::exception(), KCal::Calendar::isLocalTime(), KCal::ICalFormatImpl::loadedProductId(), QString::local8Bit(), KCal::ICalFormatImpl::populate(), KCal::CalFormat::setException(), setTimeZone(), and KCal::Calendar::timeZoneId().

Referenced by KCal::ICalDrag::decode(), and load().

QString ICalFormat::toString Calendar  )  [virtual]
 

Return calendar information as string.

Implements KCal::CalFormat.

Definition at line 146 of file icalformat.cpp.

References KCal::ICalFormatImpl::createCalendarComponent(), QPtrListIterator::current(), QPtrList::first(), QString::fromLocal8Bit(), KCal::Calendar::isLocalTime(), KCal::Calendar::journals(), QPtrList::next(), KCal::Calendar::rawEvents(), KCal::Calendar::rawTodos(), KCal::CalFormat::setException(), setTimeZone(), KCal::Calendar::timeZoneId(), KCal::ICalFormatImpl::writeEvent(), KCal::ICalFormatImpl::writeJournal(), and KCal::ICalFormatImpl::writeTodo().

Referenced by KCal::ICalDrag::ICalDrag(), and save().

QString ICalFormat::toString Incidence  ) 
 

Return incidence as iCalendar formatted text.

Definition at line 191 of file icalformat.cpp.

References QString::fromLocal8Bit(), and KCal::ICalFormatImpl::writeIncidence().

QString ICalFormat::toString Recurrence  ) 
 

Return recurrence as iCalendar formatted text.

Definition at line 204 of file icalformat.cpp.

References QString::fromLocal8Bit(), and KCal::ICalFormatImpl::writeRecurrenceRule().

bool ICalFormat::fromString Recurrence ,
const QString
 

Parse string and fill recurrence object with that information.

Definition at line 213 of file icalformat.cpp.

References KCal::ICalFormatImpl::readRecurrence().

QString ICalFormat::createScheduleMessage IncidenceBase e,
Scheduler::Method  m
 

Create a scheduling message for event e using method .

Definition at line 231 of file icalformat.cpp.

References KCal::ICalFormatImpl::createScheduleComponent().

Referenced by KCal::DummyScheduler::performTransaction(), and KCal::DummyScheduler::publish().

ScheduleMessage * ICalFormat::parseScheduleMessage Calendar ,
const QString s
 

Parse scheduling message provided as string .

Definition at line 247 of file icalformat.cpp.

References KCal::CalFormat::clearException(), KCal::ICalFormatImpl::createCalendarComponent(), KCal::Calendar::event(), KCal::ICalFormatImpl::extractErrorProperty(), QString::isEmpty(), QString::local8Bit(), KCal::ICalFormatImpl::readEvent(), KCal::ICalFormatImpl::readFreeBusy(), KCal::ICalFormatImpl::readTodo(), KCal::CalFormat::setException(), KCal::IncidenceBase::type(), KCal::IncidenceBase::uid(), KCal::ICalFormatImpl::writeEvent(), and KCal::ICalFormatImpl::writeTodo().

Referenced by KCal::DummyScheduler::retrieveTransactions().

void ICalFormat::setTimeZone const QString id,
bool  utc
 

Set id of used time zone and whether this time zone is UTC or not.

Definition at line 381 of file icalformat.cpp.

Referenced by fromString(), and toString().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:04 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001