libkcal Library API Documentation

KCal::CalFormat Class Reference

This is the base class for calendar formats. Class providing in interface to a calendar format. More...

#include <calformat.h>

Inheritance diagram for KCal::CalFormat:

KCal::ICalFormat KCal::VCalFormat List of all members.

Public Member Functions

 CalFormat ()
 Constructs a new format.

virtual ~CalFormat ()
 Destruct calendar format.

virtual bool load (Calendar *, const QString &fileName)=0
 loads a calendar on disk into the calendar associated with this format.

virtual bool save (Calendar *, const QString &fileName)=0
 writes out the calendar to disk.

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

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

void clearException ()
 Clear exception status of this format object.

ErrorFormatexception ()
 Return exception, if there is any, containing information about the last error that occured.

const QStringloadedProductId ()
 Return the PRODID string loaded from calendar file.

void setException (ErrorFormat *error)
 Set exception for this object.


Static Public Member Functions

void setApplication (const QString &app, const QString &productID)
 Set the application name for use in unique IDs and error messages, and product ID for incidence PRODID property.

const QStringapplication ()
 Return the application name used in unique IDs and error messages.

const QStringproductId ()
 Return the PRODID string to write into calendar files.

int calendarVersion (const char *prodId)
 Return the KDE calendar format version indicated by a PRODID property.

QString createUniqueId ()
 Create a unique id string.


Protected Attributes

QString mLoadedProductId

Detailed Description

This is the base class for calendar formats. Class providing in interface to a calendar format.

It provides an interface for the generation/interpretation of a textual representation of a calendar.

Definition at line 41 of file calformat.h.


Constructor & Destructor Documentation

CalFormat::CalFormat  ) 
 

Constructs a new format.

Definition at line 46 of file calformat.cpp.

CalFormat::~CalFormat  )  [virtual]
 

Destruct calendar format.

Definition at line 51 of file calformat.cpp.


Member Function Documentation

virtual bool KCal::CalFormat::load Calendar ,
const QString fileName
[pure virtual]
 

loads a calendar on disk into the calendar associated with this format.

Returns TRUE if successful,else returns FALSE.

Parameters:
fileName the name of the calendar on disk.

Implemented in KCal::ICalFormat, and KCal::VCalFormat.

virtual bool KCal::CalFormat::save Calendar ,
const QString fileName
[pure virtual]
 

writes out the calendar to disk.

Returns true if successful and false on error.

Parameters:
fileName the name of the file

Implemented in KCal::ICalFormat, and KCal::VCalFormat.

virtual bool KCal::CalFormat::fromString Calendar ,
const QString
[pure virtual]
 

Parse string and populate calendar with that information.

Implemented in KCal::ICalFormat, and KCal::VCalFormat.

virtual QString KCal::CalFormat::toString Calendar  )  [pure virtual]
 

Return calendar information as string.

Implemented in KCal::ICalFormat, and KCal::VCalFormat.

void CalFormat::clearException  ) 
 

Clear exception status of this format object.

Definition at line 56 of file calformat.cpp.

Referenced by KCal::VCalFormat::load(), KCal::ICalFormat::load(), KCal::ICalFormat::parseScheduleMessage(), and KCal::ICalFormat::save().

ErrorFormat * CalFormat::exception  ) 
 

Return exception, if there is any, containing information about the last error that occured.

Definition at line 68 of file calformat.cpp.

Referenced by KCal::ICalFormat::fromString(), and KCal::DummyScheduler::retrieveTransactions().

void CalFormat::setApplication const QString app,
const QString productID
[static]
 

Set the application name for use in unique IDs and error messages, and product ID for incidence PRODID property.

Definition at line 73 of file calformat.cpp.

const QString& KCal::CalFormat::application  )  [inline, static]
 

Return the application name used in unique IDs and error messages.

Definition at line 82 of file calformat.h.

const QString& KCal::CalFormat::productId  )  [inline, static]
 

Return the PRODID string to write into calendar files.

Definition at line 84 of file calformat.h.

Referenced by KCal::VCalFormat::populate(), and KCal::VCalFormat::save().

int CalFormat::calendarVersion const char *  prodId  )  [static]
 

Return the KDE calendar format version indicated by a PRODID property.

Definition at line 91 of file calformat.cpp.

const QString& KCal::CalFormat::loadedProductId  )  [inline]
 

Return the PRODID string loaded from calendar file.

Definition at line 88 of file calformat.h.

QString CalFormat::createUniqueId  )  [static]
 

Create a unique id string.

Definition at line 79 of file calformat.cpp.

References QTime::currentTime().

void CalFormat::setException ErrorFormat error  ) 
 

Set exception for this object.

This is used by the functions of this class to report errors.

Definition at line 62 of file calformat.cpp.

Referenced by KCal::ICalFormat::fromString(), KCal::VCalFormat::load(), KCal::ICalFormat::load(), KCal::ICalFormat::parseScheduleMessage(), KCal::ICalFormat::save(), and KCal::ICalFormat::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