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::CustomProperties KCal::Event KCal::Journal KCal::Todo List of all members.

Public Types

typedef ListBase< Incidence > List
enum  { SecrecyPublic = 0, SecrecyPrivate = 1, SecrecyConfidential = 2 }

Public Methods

 Incidence ()
 Incidence (const Incidence &)
 ~Incidence ()
bool operator== (const Incidence &) const
virtual bool accept (Visitor &)
virtual Incidence * clone ()=0
void setReadOnly (bool)
void recreate ()
void setCreated (const QDateTime &)
QDateTime created () const
void setRevision (int rev)
int revision () const
virtual void setDtStart (const QDateTime &dtStart)
virtual QDateTime dtEnd () const
void setDescription (const QString &description)
QString description () const
void setSummary (const QString &summary)
QString summary () const
void setCategories (const QStringList &categories)
void setCategories (const QString &catStr)
QStringList categories () const
QString categoriesStr ()
void setRelatedToUid (const QString &)
QString relatedToUid () const
void setRelatedTo (Incidence *relatedTo)
Incidence * relatedTo () const
Incidence::List relations () const
void addRelation (Incidence *)
void removeRelation (Incidence *)
DateList exDates () const
DateTimeList exDateTimes () const
void setExDates (const DateList &exDates)
void setExDateTimes (const DateTimeList &exDateTimes)
void addExDate (const QDate &date)
void addExDateTime (const QDateTime &dateTime)
bool isException (const QDate &qd) const
bool isException (const QDateTime &qdt) const
void addAttachment (Attachment *attachment)
void deleteAttachment (Attachment *attachment)
void deleteAttachments (const QString &mime)
Attachment::List attachments () const
Attachment::List attachments (const QString &mime) const
void clearAttachments ()
void setSecrecy (int)
int secrecy () const
QString secrecyStr () const
bool recursOn (const QDate &qd) const
bool recursAt (const QDateTime &qdt) const
void setResources (const QStringList &resources)
QStringList resources () const
void setPriority (int priority)
int priority () const
const Alarm::List & alarms () const
AlarmnewAlarm ()
void addAlarm (Alarm *)
void removeAlarm (Alarm *)
void clearAlarms ()
bool isAlarmEnabled () const
Recurrencerecurrence () const
ushort doesRecur () const
void setLocation (const QString &location)
QString location () const

Static Public Methods

QStringList secrecyList ()
QString secrecyName (int)

Detailed Description

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

Definition at line 43 of file incidence.h.


Member Enumeration Documentation

anonymous enum
 

enumeration for describing an event's secrecy.

Definition at line 116 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); }
      

Reimplemented in KCal::Journal.

Definition at line 133 of file incidence.h.

Referenced by KCal::ResourceCalendar::addIncidence(), KCal::Calendar::addIncidence(), and KCal::Calendar::deleteIncidence().

virtual Incidence* KCal::Incidence::clone   [pure virtual]
 

Return copy of this object.

The returned object is owned by the caller.

Implemented in KCal::Event, KCal::Journal, and KCal::Todo.

Referenced by KCal::DndFactory::createDrag(), KCal::ICalFormat::fromString(), and KCal::ICalFormat::toICalString().

void Incidence::setReadOnly bool    [virtual]
 

Set readonly state of incidence.

Parameters:
readonly  If true, the incidence is set to readonly, if false the incidence is set to readwrite.

Reimplemented from KCal::IncidenceBase.

Definition at line 151 of file incidence.cpp.

References KCal::Recurrence::setRecurReadOnly().

Referenced by KCal::ResourceKABC::load().

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 140 of file incidence.cpp.

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

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

void Incidence::setCreated const QDateTime  
 

Set creation date.

Definition at line 158 of file incidence.cpp.

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

QDateTime Incidence::created   const
 

Return time and date of creation.

Definition at line 164 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 169 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

int Incidence::revision   const
 

Return the number of revisions this event has seen.

Definition at line 177 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 182 of file incidence.cpp.

References KCal::Recurrence::setRecurStart().

Referenced by KCal::ResourceKABC::load(), KCal::DndFactory::pasteIncidence(), KCal::VCalFormat::VEventToEvent(), and KCal::VCalFormat::VTodoToEvent().

virtual QDateTime KCal::Incidence::dtEnd   const [inline, virtual]
 

Return the incidence's ending date/time as a QDateTime.

Reimplemented in KCal::Event.

Definition at line 180 of file incidence.h.

Referenced by KCal::CalendarLocal::appendRecurringAlarms(), and KCal::Alarm::time().

void Incidence::setDescription const QString   description
 

Set the long description.

Definition at line 189 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

QString Incidence::description   const
 

Return long description.

Definition at line 196 of file incidence.cpp.

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

void Incidence::setSummary const QString   summary
 

Set short summary.

Definition at line 202 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

QString Incidence::summary   const
 

Return short summary.

Definition at line 209 of file incidence.cpp.

Referenced by 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 categories.

Definition at line 214 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

void Incidence::setCategories const QString   catStr
 

Set categories based on a comma delimited string.

Definition at line 222 of file incidence.cpp.

References QString::isEmpty(), QStringList::split(), and KCal::IncidenceBase::updated().

QStringList Incidence::categories   const
 

Return categories as a list of strings.

Definition at line 239 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 244 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 Incidence exists.

Definition at line 249 of file incidence.cpp.

Referenced by KCal::Calendar::removeRelations(), 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 Incidence exists.

Definition at line 255 of file incidence.cpp.

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

void Incidence::setRelatedTo Incidence *    relatedTo
 

Point at some other event to which the event relates.

Definition at line 260 of file incidence.cpp.

References addRelation(), and removeRelation().

Referenced by KCal::Calendar::removeRelations(), and KCal::Calendar::setupRelations().

Incidence * Incidence::relatedTo   const
 

What event does this one relate to?

Definition at line 269 of file incidence.cpp.

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

Incidence::List Incidence::relations   const
 

All events that are related to this event.

Definition at line 274 of file incidence.cpp.

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

void Incidence::addRelation Incidence *   
 

Add an event which is related to this event.

Definition at line 279 of file incidence.cpp.

References KCal::IncidenceBase::updated().

Referenced by setRelatedTo(), and KCal::Calendar::setupRelations().

void Incidence::removeRelation Incidence *   
 

Remove event that is related to this event.

Definition at line 287 of file incidence.cpp.

Referenced by KCal::Calendar::removeRelations(), and setRelatedTo().

DateList Incidence::exDates   const
 

Returns the list of dates which are exceptions to the recurrence rule.

Definition at line 331 of file incidence.cpp.

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

DateTimeList Incidence::exDateTimes   const
 

Returns the list of date/times which are exceptions to the recurrence rule.

Definition at line 336 of file incidence.cpp.

void Incidence::setExDates const DateList &    exDates
 

Sets the list of dates which are exceptions to the recurrence rule.

This does not affect the date-time exception list.

Definition at line 303 of file incidence.cpp.

References KCal::IncidenceBase::updated().

void Incidence::setExDateTimes const DateTimeList &    exDateTimes
 

Sets the list of date/times which are exceptions to the recurrence rule.

This does not affect the date-only exception list.

Definition at line 310 of file incidence.cpp.

References KCal::IncidenceBase::updated().

void Incidence::addExDate const QDate   date
 

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

Definition at line 317 of file incidence.cpp.

References QValueList< QDate >::append(), and KCal::IncidenceBase::updated().

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

void Incidence::addExDateTime const QDateTime   dateTime
 

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

Definition at line 324 of file incidence.cpp.

References QValueList< QDateTime >::append(), and KCal::IncidenceBase::updated().

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.

Does not check the date/time exception list.

Definition at line 341 of file incidence.cpp.

References QValueList< QDate >::begin(), and QValueList< QDate >::end().

Referenced by KCal::CalendarLocal::appendRecurringAlarms(), recursAt(), and recursOn().

bool Incidence::isException const QDateTime   qdt const
 

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

Does not check the date-only exception list.

Definition at line 353 of file incidence.cpp.

References QValueList< QDateTime >::begin(), and QValueList< QDateTime >::end().

void Incidence::addAttachment Attachment   attachment
 

Add attachment.

Definition at line 365 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

void Incidence::deleteAttachment Attachment   attachment
 

Remove and delete a specific attachment.

Definition at line 372 of file incidence.cpp.

void Incidence::deleteAttachments const QString   mime
 

Remove and delete all attachments with this mime type.

Definition at line 377 of file incidence.cpp.

Attachment::List Incidence::attachments   const
 

Return list of all associated attachments.

Definition at line 386 of file incidence.cpp.

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

Attachment::List Incidence::attachments const QString   mime const
 

Find a list of attachments with this mime type.

Definition at line 391 of file incidence.cpp.

References attachments().

void Incidence::clearAttachments  
 

Remove and delete all attachments.

Definition at line 402 of file incidence.cpp.

void Incidence::setSecrecy int   
 

Sets secrecy status.

This can be Public, Private or Confidential. See separate enum.

Definition at line 432 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

int Incidence::secrecy   const
 

Return the event's secrecy.

Definition at line 439 of file incidence.cpp.

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

QString Incidence::secrecyStr   const
 

Return secrecy as translated string.

Definition at line 444 of file incidence.cpp.

References secrecyName().

QStringList Incidence::secrecyList   [static]
 

Return list of all available secrecy states as list of translated strings.

Definition at line 467 of file incidence.cpp.

References secrecyName().

QString Incidence::secrecyName int    [static]
 

Return human-readable translated name of secrecy class.

Definition at line 449 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 incidence will recur.

Definition at line 293 of file incidence.cpp.

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

Referenced by KCal::CalendarLocal::rawEventsForDate().

bool Incidence::recursAt const QDateTime   qdt const
 

Returns true if the date/time specified is one on which the incidence will recur.

Definition at line 298 of file incidence.cpp.

References QDateTime::date(), isException(), and KCal::Recurrence::recursAtPure().

void Incidence::setResources const QStringList   resources
 

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

Definition at line 407 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

QStringList Incidence::resources   const
 

Return list of current resources.

Definition at line 414 of file incidence.cpp.

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

void Incidence::setPriority int    priority
 

Set the incidences priority, 0 is undefined, 1 highest (decreasing order).

Definition at line 420 of file incidence.cpp.

References priority(), and KCal::IncidenceBase::updated().

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

int Incidence::priority   const
 

Return priority.

The priority is a number between 1 and 5. 1 is highest priority.

Definition at line 427 of file incidence.cpp.

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

const Alarm::List & Incidence::alarms   const
 

All alarms that are associated with this incidence.

Definition at line 478 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 483 of file incidence.cpp.

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

void Incidence::addAlarm Alarm  
 

Add an alarm which is associated with this incidence.

Definition at line 491 of file incidence.cpp.

References KCal::IncidenceBase::updated().

void Incidence::removeAlarm Alarm  
 

Remove an alarm that is associated with this incidence.

Definition at line 497 of file incidence.cpp.

References KCal::IncidenceBase::updated().

void Incidence::clearAlarms  
 

Remove all alarms that are associated with this incidence.

Definition at line 503 of file incidence.cpp.

References KCal::IncidenceBase::updated().

Referenced by KCal::ResourceKABC::load().

bool Incidence::isAlarmEnabled   const
 

Return whether any alarm associated with this incidence is enabled.

Definition at line 509 of file incidence.cpp.

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 518 of file incidence.cpp.

References KCal::IncidenceBase::dtStart(), KCal::Recurrence::setRecurReadOnly(), and KCal::Recurrence::setRecurStart().

Referenced by KCal::CalendarLocal::appendRecurringAlarms(), KCal::VCalFormat::eventToVEvent(), KCal::ResourceKABC::load(), KCal::CalendarLocal::rawEvents(), and KCal::VCalFormat::VEventToEvent().

ushort Incidence::doesRecur   const
 

Forward to Recurrence::doesRecur().

Definition at line 542 of file incidence.cpp.

References KCal::Recurrence::doesRecur().

Referenced by KCal::CalendarLocal::alarms(), KCal::CalFilter::filterEvent(), KCal::CalendarLocal::rawEvents(), and KCal::CalendarLocal::rawEventsForDate().

void Incidence::setLocation const QString   location
 

Set the event's/todo's location.

Do _not_ use it with journal.

Definition at line 530 of file incidence.cpp.

References KCal::IncidenceBase::updated().

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

QString Incidence::location   const
 

Return the event's/todo's location.

Do _not_ use it with journal.

Definition at line 537 of file incidence.cpp.

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


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkcal Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:24 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003