libkcal

#include <calformat.h>

Inheritance diagram for KCal::CalFormat:
KCal::ICalFormat KCal::TQtopiaFormat KCal::VCalFormat

Public Member Functions

 CalFormat ()
 
virtual ~CalFormat ()
 
virtual bool load (Calendar *, const TQString &fileName)=0
 
virtual bool save (Calendar *, const TQString &fileName)=0
 
virtual bool fromString (Calendar *, const TQString &)=0
 
virtual TQString toString (Calendar *)=0
 
void clearException ()
 
ErrorFormatexception ()
 
const TQString & loadedProductId ()
 
void setException (ErrorFormat *error)
 

Static Public Member Functions

static void setApplication (const TQString &app, const TQString &productID)
 
static const TQString & application ()
 
static const TQString & productId ()
 
static TQString createUniqueId ()
 

Protected Attributes

TQString mLoadedProductId
 

Detailed Description

This is the base class for calendar formats.

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

Class providing in interface to a calendar format

Definition at line 43 of file calformat.h.

Constructor & Destructor Documentation

◆ CalFormat()

CalFormat::CalFormat ( )

Constructs a new format.

Definition at line 34 of file calformat.cpp.

◆ ~CalFormat()

CalFormat::~CalFormat ( )
virtual

Destruct calendar format.

Definition at line 39 of file calformat.cpp.

Member Function Documentation

◆ application()

static const TQString& KCal::CalFormat::application ( )
inlinestatic

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

Definition at line 85 of file calformat.h.

◆ clearException()

void CalFormat::clearException ( )

Clear exception status of this format object.

Definition at line 44 of file calformat.cpp.

◆ createUniqueId()

TQString CalFormat::createUniqueId ( )
static

Create a unique id string.

Definition at line 67 of file calformat.cpp.

◆ exception()

ErrorFormat * CalFormat::exception ( )

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

Definition at line 56 of file calformat.cpp.

◆ fromString()

virtual bool KCal::CalFormat::fromString ( Calendar ,
const TQString &   
)
pure virtual

Parse string and populate calendar with that information.

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

◆ load()

virtual bool KCal::CalFormat::load ( Calendar ,
const TQString &  fileName 
)
pure virtual

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

Returns TRUE if successful,else returns FALSE.

Parameters
fileNamethe name of the calendar on disk.

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

◆ loadedProductId()

const TQString& KCal::CalFormat::loadedProductId ( )
inline

Return the PRODID string loaded from calendar file.

Definition at line 89 of file calformat.h.

◆ productId()

static const TQString& KCal::CalFormat::productId ( )
inlinestatic

Return the PRODID string to write into calendar files.

Definition at line 87 of file calformat.h.

◆ save()

virtual bool KCal::CalFormat::save ( Calendar ,
const TQString &  fileName 
)
pure virtual

writes out the calendar to disk.

Returns true if successful and false on error.

Parameters
fileNamethe name of the file

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

◆ setApplication()

void CalFormat::setApplication ( const TQString &  app,
const TQString &  productID 
)
static

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

Definition at line 61 of file calformat.cpp.

◆ setException()

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 50 of file calformat.cpp.

◆ toString()

virtual TQString KCal::CalFormat::toString ( Calendar )
pure virtual

Return calendar information as string.

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


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