libkcal Library API Documentation

KCal::Incidence Class Reference

This class provides the base class common to all calendar components. More...

#include <incidence.h>

Inheritance diagram for KCal::Incidence:

KCal::IncidenceBase KCal::Event KCal::Journal KCal::Todo List of all members.

Public Types

enum  { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }
 enumeration for describing an event's secrecy. More...


Public Member Functions

 Incidence (const Incidence &)
virtual bool accept (Visitor &)
 Accept IncidenceVisitor.

virtual Incidenceclone ()=0
void setReadOnly (bool)
 Set readonly status.

void recreate ()
 Recreate event.

void setCreated (QDateTime)
 set creation date

QDateTime created () const
 return time and date of cration.

void setRevision (int rev)
 set the number of revisions this event has seen

int revision () const
 return the number of revisions this event has seen

void setDtStart (const QDateTime &dtStart)
 Set starting date/time.

void setDescription (const QString &description)
 sets the event's lengthy description.

QString description () const
 returns a reference to the event's description.

void setSummary (const QString &summary)
 sets the event's short summary.

QString summary () const
 returns a reference to the event's summary.

void setCategories (const QStringList &categories)
 set event's applicable categories

void setCategories (const QString &catStr)
 set event's categories based on a comma delimited string

QStringList categories () const
 return categories in a list

QString categoriesStr ()
 return categories as a comma separated string

void setRelatedToUid (const QString &)
 point at some other event to which the event relates.

QString relatedToUid () const
 what event does this one relate to? This function should only be used when constructing a calendar before the related Event exists.

void setRelatedTo (Incidence *relatedTo)
 point at some other event to which the event relates

IncidencerelatedTo () const
 what event does this one relate to?

QPtrList< Incidencerelations () const
 All events that are related to this event.

void addRelation (Incidence *)
 Add an event which is related to this event.

void removeRelation (Incidence *)
 Remove event that is related to this event.

DateList exDates () const
 returns the list of dates which are exceptions to the recurrence rule

void setExDates (const DateList &_exDates)
 sets the list of dates which are exceptions to the recurrence rule

void setExDates (const char *dates)
void addExDate (const QDate &date)
 Add a date to the list of exceptions of the recurrence rule.

bool isException (const QDate &qd) const
 returns true if there is an exception for this date in the recurrence rule set, or false otherwise.

void setAttachments (const QStringList &attachments)
 set the list of attachments/associated files for this event

QStringList attachments () const
 return list of associated files

void setSecrecy (int)
 sets the event's status the value specified.

int secrecy () const
 return the event's secrecy.

QString secrecyStr () const
 return the event's secrecy in string format.

bool recursOn (const QDate &qd) const
 returns TRUE if the date specified is one on which the event will recur.

void setResources (const QStringList &resources)
 set resources used, such as Office, Car, etc.

QStringList resources () const
 return list of current resources

void setPriority (int priority)
 set the event's priority, 0 is undefined, 1 highest (decreasing order)

int priority () const
 get the event's priority

QPtrList< Alarmalarms () const
 All alarms that are associated with this incidence.

AlarmnewAlarm ()
 Create a new alarm which is associated with this incidence.

void addAlarm (Alarm *)
 Add an alarm which is associated with this incidence.

void removeAlarm (Alarm *)
 Remove an alarm that is associated with this incidence.

void clearAlarms ()
 Remove all alarms that are associated with this incidence.

bool isAlarmEnabled () const
 return whether any alarm associated with this incidence is enabled

Recurrencerecurrence () const
 Return the recurrence rule associated with this incidence.

void setLocation (const QString &location)
 set the event's/todo's location.

QString location () const
 return the event's/todo's location.


Static Public Member Functions

QStringList secrecyList ()
 return list of all availbale secrecy classes

QString secrecyName (int)
 return human-readable name of secrecy class


Detailed Description

This class provides the base class common to all calendar components.

Definition at line 44 of file incidence.h.


Member Enumeration Documentation

anonymous enum
 

enumeration for describing an event's secrecy.

Definition at line 81 of file incidence.h.


Member Function Documentation

virtual bool KCal::Incidence::accept Visitor  )  [inline, virtual]
 

Accept IncidenceVisitor.

A class taking part in the visitor mechanism has to provide this implementation:

bool accept(Visitor &v) { return v.visit(this); }

Definition at line 94 of file incidence.h.

Referenced by KCal::Calendar::addIncidence().

void Incidence::setReadOnly bool   )  [virtual]
 

Set readonly status.

Reimplemented from KCal::IncidenceBase.

Definition at line 97 of file incidence.cpp.

References recurrence(), and KCal::Recurrence::setRecurReadOnly().

void Incidence::recreate  ) 
 

Recreate event.

The event is made a new unique event, but already stored event information is preserved. Sets uniquie id, creation date, last modification date and revision number.

Definition at line 86 of file incidence.cpp.

References QDateTime::currentDateTime(), setCreated(), KCal::IncidenceBase::setLastModified(), setRevision(), and KCal::IncidenceBase::setUid().

Referenced by KCal::DndFactory::pasteEvent().

void Incidence::setCreated QDateTime   ) 
 

set creation date

Definition at line 103 of file incidence.cpp.

Referenced by recreate(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QDateTime Incidence::created  )  const
 

return time and date of cration.

Definition at line 109 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void Incidence::setRevision int  rev  ) 
 

set the number of revisions this event has seen

Definition at line 114 of file incidence.cpp.

Referenced by recreate(), and KCal::VCalFormat::VEventToEvent().

int Incidence::revision  )  const
 

return the number of revisions this event has seen

Definition at line 122 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

void Incidence::setDtStart const QDateTime dtStart  )  [virtual]
 

Set starting date/time.

Reimplemented from KCal::IncidenceBase.

Definition at line 127 of file incidence.cpp.

References recurrence(), and KCal::Recurrence::setRecurStart().

Referenced by KCal::DndFactory::pasteEvent(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

void Incidence::setDescription const QString description  ) 
 

sets the event's lengthy description.

Definition at line 133 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QString Incidence::description  )  const
 

returns a reference to the event's description.

Definition at line 140 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), KCal::VCalFormat::eventToVTodo(), and KCal::VCalFormat::VEventToEvent().

void Incidence::setSummary const QString summary  ) 
 

sets the event's short summary.

Definition at line 146 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QString Incidence::summary  )  const
 

returns a reference to the event's summary.

Definition at line 153 of file incidence.cpp.

Referenced by KCal::CalendarLocal::addEvent(), KCal::CalendarLocal::appendAlarms(), KCal::CalendarLocal::appendRecurringAlarms(), KCal::Event::dtEnd(), KCal::VCalFormat::eventToVEvent(), KCal::VCalFormat::eventToVTodo(), and KCal::VCalFormat::VEventToEvent().

void Incidence::setCategories const QStringList categories  ) 
 

set event's applicable categories

Definition at line 158 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

void Incidence::setCategories const QString catStr  ) 
 

set event's categories based on a comma delimited string

Definition at line 166 of file incidence.cpp.

References QString::isEmpty(), and QStringList::split().

QStringList Incidence::categories  )  const
 

return categories in a list

Definition at line 183 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), KCal::VCalFormat::eventToVTodo(), and KCal::CalFilter::filterIncidence().

QString Incidence::categoriesStr  ) 
 

return categories as a comma separated string

Definition at line 188 of file incidence.cpp.

References QStringList::join().

void Incidence::setRelatedToUid const QString  ) 
 

point at some other event to which the event relates.

This function should only be used when constructing a calendar before the related Event exists.

Definition at line 193 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

QString Incidence::relatedToUid  )  const
 

what event does this one relate to? This function should only be used when constructing a calendar before the related Event exists.

Definition at line 199 of file incidence.cpp.

Referenced by KCal::VCalFormat::populate().

void Incidence::setRelatedTo Incidence relatedTo  ) 
 

point at some other event to which the event relates

Definition at line 204 of file incidence.cpp.

References addRelation(), and removeRelation().

Referenced by KCal::VCalFormat::populate().

Incidence * Incidence::relatedTo  )  const
 

what event does this one relate to?

Definition at line 215 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

QPtrList< Incidence > Incidence::relations  )  const
 

All events that are related to this event.

Definition at line 220 of file incidence.cpp.

void Incidence::addRelation Incidence  ) 
 

Add an event which is related to this event.

Definition at line 225 of file incidence.cpp.

References QPtrList< Incidence >::append().

Referenced by setRelatedTo().

void Incidence::removeRelation Incidence  ) 
 

Remove event that is related to this event.

Definition at line 231 of file incidence.cpp.

References QPtrList< Incidence >::removeRef().

Referenced by setRelatedTo().

DateList Incidence::exDates  )  const
 

returns the list of dates which are exceptions to the recurrence rule

Definition at line 263 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent().

void Incidence::setExDates const DateList _exDates  ) 
 

sets the list of dates which are exceptions to the recurrence rule

Definition at line 243 of file incidence.cpp.

References QValueList::count(), recurrence(), and KCal::Recurrence::setRecurExDatesCount().

void Incidence::addExDate const QDate date  ) 
 

Add a date to the list of exceptions of the recurrence rule.

Definition at line 253 of file incidence.cpp.

References QValueList::append(), QValueList::count(), recurrence(), and KCal::Recurrence::setRecurExDatesCount().

Referenced by KCal::VCalFormat::VEventToEvent().

bool Incidence::isException const QDate qd  )  const
 

returns true if there is an exception for this date in the recurrence rule set, or false otherwise.

Definition at line 268 of file incidence.cpp.

References QValueList::begin(), and QValueList::end().

Referenced by recursOn().

void Incidence::setAttachments const QStringList attachments  ) 
 

set the list of attachments/associated files for this event

Definition at line 280 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent().

QStringList Incidence::attachments  )  const
 

return list of associated files

Definition at line 287 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent().

void Incidence::setSecrecy int   ) 
 

sets the event's status the value specified.

See the enumeration above for possible values.

Definition at line 317 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent().

int Incidence::secrecy  )  const
 

return the event's secrecy.

Definition at line 324 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent().

QString Incidence::secrecyStr  )  const
 

return the event's secrecy in string format.

Definition at line 329 of file incidence.cpp.

References secrecyName().

QStringList Incidence::secrecyList  )  [static]
 

return list of all availbale secrecy classes

Definition at line 352 of file incidence.cpp.

References secrecyName().

QString Incidence::secrecyName int   )  [static]
 

return human-readable name of secrecy class

Definition at line 334 of file incidence.cpp.

Referenced by secrecyList(), and secrecyStr().

bool Incidence::recursOn const QDate qd  )  const
 

returns TRUE if the date specified is one on which the event will recur.

Definition at line 237 of file incidence.cpp.

References isException(), recurrence(), and KCal::Recurrence::recursOnPure().

Referenced by KCal::CalendarLocal::appendRecurringAlarms(), KCal::CalendarLocal::numEvents(), and KCal::CalendarLocal::rawEventsForDate().

void Incidence::setResources const QStringList resources  ) 
 

set resources used, such as Office, Car, etc.

Definition at line 292 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent().

QStringList Incidence::resources  )  const
 

return list of current resources

Definition at line 299 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent().

void Incidence::setPriority int  priority  ) 
 

set the event's priority, 0 is undefined, 1 highest (decreasing order)

Definition at line 305 of file incidence.cpp.

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

int Incidence::priority  )  const
 

get the event's priority

Definition at line 312 of file incidence.cpp.

Referenced by KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

QPtrList< Alarm > Incidence::alarms  )  const
 

All alarms that are associated with this incidence.

Definition at line 363 of file incidence.cpp.

Referenced by KCal::CalendarLocal::appendAlarms(), KCal::CalendarLocal::appendRecurringAlarms(), KCal::VCalFormat::eventToVEvent(), and KCal::VCalFormat::eventToVTodo().

Alarm * Incidence::newAlarm  ) 
 

Create a new alarm which is associated with this incidence.

Definition at line 368 of file incidence.cpp.

References QPtrList< Alarm >::append().

Referenced by KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

void Incidence::addAlarm Alarm  ) 
 

Add an alarm which is associated with this incidence.

Definition at line 376 of file incidence.cpp.

References QPtrList< Alarm >::append().

void Incidence::removeAlarm Alarm  ) 
 

Remove an alarm that is associated with this incidence.

Definition at line 382 of file incidence.cpp.

References QPtrList< Alarm >::removeRef().

void Incidence::clearAlarms  ) 
 

Remove all alarms that are associated with this incidence.

Definition at line 388 of file incidence.cpp.

References QPtrList< Alarm >::clear().

bool Incidence::isAlarmEnabled  )  const
 

return whether any alarm associated with this incidence is enabled

Definition at line 394 of file incidence.cpp.

References QPtrListIterator::current(), and KCal::Alarm::enabled().

Recurrence * Incidence::recurrence  )  const
 

Return the recurrence rule associated with this incidence.

If there is none, returns an appropriate (non-0) object.

Definition at line 404 of file incidence.cpp.

Referenced by addExDate(), KCal::VCalFormat::eventToVEvent(), KCal::CalFilter::filterEvent(), KCal::CalendarLocal::insertEvent(), KCal::CalendarLocal::rawEvents(), recursOn(), setDtStart(), setExDates(), setReadOnly(), and KCal::VCalFormat::VEventToEvent().

void Incidence::setLocation const QString location  ) 
 

set the event's/todo's location.

Do _not_ use it with journal

Definition at line 409 of file incidence.cpp.

QString Incidence::location  )  const
 

return the event's/todo's location.

Do _not_ use it with journal

Definition at line 416 of file incidence.cpp.


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