• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.3 API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • Incidence
Public Types | Public Member Functions | Protected Member Functions | List of all members
KCalCore::Incidence Class Referenceabstract

#include <incidence.h>

Inheritance diagram for KCalCore::Incidence:
KCalCore::IncidenceBase KCalCore::CustomProperties KCalCore::Event KCalCore::Journal KCalCore::Todo

Public Types

typedef QVector< Ptr > List
 
typedef QSharedPointer< Incidence > Ptr
 
enum  RelType { RelTypeParent, RelTypeChild, RelTypeSibling }
 
enum  Secrecy { SecrecyPublic, SecrecyPrivate, SecrecyConfidential }
 
enum  Status {
  StatusNone, StatusTentative, StatusConfirmed, StatusCompleted,
  StatusNeedsAction, StatusCanceled, StatusInProcess, StatusDraft,
  StatusFinal, StatusX
}
 
- Public Types inherited from KCalCore::IncidenceBase
enum  DateTimeRole {
  RoleAlarmStartOffset = 0, RoleAlarmEndOffset, RoleSort, RoleCalendarHashing,
  RoleStartTimeZone, RoleEndTimeZone, RoleEndRecurrenceBase, RoleEnd,
  RoleDisplayEnd, RoleAlarm, RoleRecurrenceStart, RoleDisplayStart,
  RoleDnD
}
 
enum  Field {
  FieldDtStart, FieldDtEnd, FieldLastModified, FieldDescription,
  FieldSummary, FieldLocation, FieldCompleted, FieldPercentComplete,
  FieldDtDue, FieldCategories, FieldRelatedTo, FieldRecurrence,
  FieldAttachment, FieldSecrecy, FieldStatus, FieldTransparency,
  FieldResources, FieldPriority, FieldGeoLatitude, FieldGeoLongitude,
  FieldRecurrenceId, FieldAlarms, FieldSchedulingId, FieldAttendees,
  FieldOrganizer, FieldCreated, FieldRevision, FieldDuration,
  FieldContact, FieldComment, FieldUid, FieldUnknown
}
 
enum  IncidenceType {
  TypeEvent = 0, TypeTodo, TypeJournal, TypeFreeBusy,
  TypeUnknown
}
 
typedef QSharedPointer
< IncidenceBase > 
Ptr
 

Public Member Functions

 Incidence ()
 
virtual ~Incidence ()
 
void addAlarm (const Alarm::Ptr &alarm)
 
void addAttachment (const Attachment::Ptr &attachment)
 
Alarm::List alarms () const
 
QString altDescription () const
 
Attachment::List attachments () const
 
Attachment::List attachments (const QString &mime) const
 
QStringList categories () const
 
QString categoriesStr () const
 
void clearAlarms ()
 
void clearAttachments ()
 
void clearRecurrence ()
 
void clearTempFiles ()
 
virtual Incidence * clone () const =0
 
KDateTime created () const
 
QString customStatus () const
 
void deleteAttachment (const Attachment::Ptr &attachment)
 
void deleteAttachments (const QString &mime)
 
QString description () const
 
bool descriptionIsRich () const
 
virtual KDateTime endDateForStart (const KDateTime &startDt) const
 
float geoLatitude () const
 
float geoLongitude () const
 
bool hasAltDescription () const
 
bool hasEnabledAlarms () const
 
bool hasGeo () const
 
bool hasRecurrenceId () const
 
virtual QLatin1String iconName (const KDateTime &recurrenceId=KDateTime()) const =0
 
QString instanceIdentifier () const
 
bool localOnly () const
 
QString location () const
 
bool locationIsRich () const
 
Alarm::Ptr newAlarm ()
 
int priority () const
 
void recreate ()
 
Recurrence * recurrence () const
 
KDateTime recurrenceId () const
 
ushort recurrenceType () const
 
virtual void recurrenceUpdated (Recurrence *recurrence)
 
bool recurs () const
 
bool recursAt (const KDateTime &dt) const
 
virtual bool recursOn (const QDate &date, const KDateTime::Spec &timeSpec) const
 
QString relatedTo (RelType relType=RelTypeParent) const
 
void removeAlarm (const Alarm::Ptr &alarm)
 
QStringList resources () const
 
int revision () const
 
QString richDescription () const
 
QString richLocation () const
 
QString richSummary () const
 
QString schedulingID () const
 
Secrecy secrecy () const
 
void setAllDay (bool allDay)
 
void setAltDescription (const QString &altdescription)
 
void setCategories (const QStringList &categories)
 
void setCategories (const QString &catStr)
 
void setCreated (const KDateTime &dt)
 
void setCustomStatus (const QString &status)
 
void setDescription (const QString &description, bool isRich)
 
void setDescription (const QString &description)
 
virtual void setDtStart (const KDateTime &dt)
 
void setGeoLatitude (float geolatitude)
 
void setGeoLongitude (float geolongitude)
 
void setHasGeo (bool hasGeo)
 
void setLastModified (const KDateTime &lm)
 
void setLocalOnly (bool localonly)
 
void setLocation (const QString &location, bool isRich)
 
void setLocation (const QString &location)
 
void setPriority (int priority)
 
void setReadOnly (bool readonly)
 
void setRecurrenceId (const KDateTime &recurrenceId)
 
void setRelatedTo (const QString &uid, RelType relType=RelTypeParent)
 
void setResources (const QStringList &resources)
 
void setRevision (int rev)
 
void setSchedulingID (const QString &sid, const QString &uid=QString())
 
void setSecrecy (Secrecy secrecy)
 
void setStatus (Status status)
 
void setSummary (const QString &summary, bool isRich)
 
void setSummary (const QString &summary)
 
void setThisAndFuture (bool thisAndFuture)
 
virtual void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
virtual QList< KDateTime > startDateTimesForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::LocalZone) const
 
virtual QList< KDateTime > startDateTimesForDateTime (const KDateTime &datetime) const
 
Status status () const
 
QString summary () const
 
bool summaryIsRich () const
 
bool supportsGroupwareCommunication () const
 
bool thisAndFuture () const
 
QString writeAttachmentToTempFile (const Attachment::Ptr &attachment) const
 
- Public Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase ()
 
virtual ~IncidenceBase ()
 
virtual bool accept (Visitor &v, IncidenceBase::Ptr incidence)
 
void addAttendee (const Attendee::Ptr &attendee, bool doUpdate=true)
 
void addComment (const QString &comment)
 
void addContact (const QString &contact)
 
bool allDay () const
 
Attendee::Ptr attendeeByMail (const QString &email) const
 
Attendee::Ptr attendeeByMails (const QStringList &emails, const QString &email=QString()) const
 
Attendee::Ptr attendeeByUid (const QString &uid) const
 
int attendeeCount () const
 
Attendee::List attendees () const
 
void clearAttendees ()
 
void clearComments ()
 
void clearContacts ()
 
QStringList comments () const
 
QStringList contacts () const
 
virtual KDateTime dateTime (DateTimeRole role) const =0
 
void deleteAttendee (const Attendee::Ptr &attendee, bool doUpdate=true)
 
QSet< IncidenceBase::Field > dirtyFields () const
 
virtual KDateTime dtStart () const
 
Duration duration () const
 
void endUpdates ()
 
bool hasDuration () const
 
bool isReadOnly () const
 
KDateTime lastModified () const
 
virtual QLatin1String mimeType () const =0
 
bool operator!= (const IncidenceBase &ib) const
 
IncidenceBase & operator= (const IncidenceBase &other)
 
bool operator== (const IncidenceBase &ib) const
 
Person::Ptr organizer () const
 
void registerObserver (IncidenceObserver *observer)
 
bool removeComment (const QString &comment)
 
bool removeContact (const QString &contact)
 
void resetDirtyFields ()
 
void setAllDay (bool allDay)
 
virtual void setDateTime (const KDateTime &dateTime, DateTimeRole role)=0
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
virtual void setDuration (const Duration &duration)
 
void setHasDuration (bool hasDuration)
 
void setOrganizer (const Person::Ptr &organizer)
 
void setOrganizer (const QString &organizer)
 
void setUid (const QString &uid)
 
void startUpdates ()
 
virtual IncidenceType type () const =0
 
virtual QByteArray typeStr () const =0
 
QString uid () const
 
void unRegisterObserver (IncidenceObserver *observer)
 
void update ()
 
void updated ()
 
KUrl uri () const
 
- Public Member Functions inherited from KCalCore::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QString > customProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
QString nonKDECustomPropertyParameters (const QByteArray &name) const
 
CustomProperties & operator= (const CustomProperties &other)
 
bool operator== (const CustomProperties &properties) const
 
void removeCustomProperty (const QByteArray &app, const QByteArray &key)
 
void removeNonKDECustomProperty (const QByteArray &name)
 
void setCustomProperties (const QMap< QByteArray, QString > &properties)
 
void setCustomProperty (const QByteArray &app, const QByteArray &key, const QString &value)
 
void setNonKDECustomProperty (const QByteArray &name, const QString &value, const QString &parameters=QString())
 
- Public Member Functions inherited from KCalCore::Recurrence::RecurrenceObserver
virtual void recurrenceUpdated (Recurrence *r)=0
 

Protected Member Functions

 Incidence (const Incidence &other)
 
virtual IncidenceBase & assign (const IncidenceBase &other)
 
virtual bool equals (const IncidenceBase &incidence) const
 
- Protected Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase (const IncidenceBase &ib)
 
virtual void customPropertyUpdate ()
 
virtual void customPropertyUpdated ()
 
void setFieldDirty (IncidenceBase::Field field)
 
virtual void virtual_hook (int id, void *data)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from KCalCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 
- Protected Attributes inherited from KCalCore::IncidenceBase
bool mReadOnly
 

Detailed Description

Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar components known as incidences.

Several properties are not allowed for VFREEBUSY objects (see rfc:2445), so they are not in IncidenceBase. The hierarchy is:

IncidenceBase

  • FreeBusy
  • Incidence
    • Event
    • Todo
    • Journal

So IncidenceBase contains all properties that are common to all classes, and Incidence contains all additional properties that are common to Events, Todos and Journals, but are not allowed for FreeBusy entries.

Definition at line 68 of file incidence.h.

Member Typedef Documentation

typedef QVector<Ptr> KCalCore::Incidence::List

List of incidences.

Definition at line 117 of file incidence.h.

typedef QSharedPointer<Incidence> KCalCore::Incidence::Ptr

A shared pointer to an Incidence.

Definition at line 112 of file incidence.h.

Member Enumeration Documentation

enum KCalCore::Incidence::RelType

The different types of RELTYPE values specified by the RFC.

Only RelTypeParent is supported for now.

Enumerator
RelTypeParent 

The related incidence is a parent.

RelTypeChild 

The related incidence is a child.

RelTypeSibling 

The related incidence is a peer.

Definition at line 103 of file incidence.h.

enum KCalCore::Incidence::Secrecy

The different types of incidence access classifications.

Enumerator
SecrecyPublic 

Not secret (default)

SecrecyPrivate 

Secret to the owner.

SecrecyConfidential 

Secret to the owner and some others.

Definition at line 93 of file incidence.h.

enum KCalCore::Incidence::Status

The different types of overall incidence status or confirmation.

The meaning is specific to the incidence type in context.

Enumerator
StatusNone 

No status.

StatusTentative 

event is tentative

StatusConfirmed 

event is definite

StatusCompleted 

to-do completed

StatusNeedsAction 

to-do needs action

StatusCanceled 

event or to-do canceled; journal removed

StatusInProcess 

to-do in process

StatusDraft 

journal is draft

StatusFinal 

journal is final

StatusX 

a non-standard status string

Definition at line 77 of file incidence.h.

Constructor & Destructor Documentation

Incidence::Incidence ( )

Constructs an empty incidence.

Private class that helps to provide binary compatibility between releases.

Definition at line 181 of file incidence.cpp.

Incidence::~Incidence ( )
virtual

Destroys an incidence.

Definition at line 197 of file incidence.cpp.

Incidence::Incidence ( const Incidence &  other)
protected

Copy constructor.

Parameters
otheris the incidence to copy.

Definition at line 188 of file incidence.cpp.

Member Function Documentation

void Incidence::addAlarm ( const Alarm::Ptr &  alarm)

Adds an alarm to the incidence.

Parameters
alarmis a pointer to a valid Alarm object.
See Also
removeAlarm().

Definition at line 887 of file incidence.cpp.

void Incidence::addAttachment ( const Attachment::Ptr &  attachment)

Adds an attachment to the incidence.

Parameters
attachmentis a pointer to a valid Attachment object.
See Also
deleteAttachment().

Definition at line 693 of file incidence.cpp.

Alarm::List Incidence::alarms ( ) const

Returns a list of all incidence alarms.

Definition at line 875 of file incidence.cpp.

QString Incidence::altDescription ( ) const

Returns the incidence alternative (=text/html) description.

See Also
setAltDescription().

Definition at line 1098 of file incidence.cpp.

IncidenceBase & Incidence::assign ( const IncidenceBase &  other)
protectedvirtual

Provides polymorfic assignment.

Parameters
otheris the IncidenceBase to assign.

Reimplemented from KCalCore::IncidenceBase.

Reimplemented in KCalCore::Todo, KCalCore::Event, and KCalCore::Journal.

Definition at line 217 of file incidence.cpp.

Attachment::List Incidence::attachments ( ) const

Returns a list of all incidence attachments.

See Also
attachments( const QString &).

Definition at line 730 of file incidence.cpp.

Attachment::List Incidence::attachments ( const QString &  mime) const

Returns a list of all incidence attachments with the specified MIME type.

Parameters
mimeis a QString containing the MIME type.
See Also
attachments().

Definition at line 735 of file incidence.cpp.

QStringList Incidence::categories ( ) const

Returns the incidence categories as a list of strings.

See Also
setCategories( const QStringList &), setCategories( Const QString &).

Definition at line 520 of file incidence.cpp.

QString Incidence::categoriesStr ( ) const

Returns the incidence categories as a comma separated string.

See Also
categories().

Definition at line 525 of file incidence.cpp.

void Incidence::clearAlarms ( )

Removes all alarms.

See Also
removeAlarm().

Definition at line 906 of file incidence.cpp.

void Incidence::clearAttachments ( )

Removes all attachments and frees the memory used by them.

See Also
deleteAttachment( Attachment::Ptr), deleteAttachments( const QString &).

Definition at line 746 of file incidence.cpp.

void Incidence::clearRecurrence ( )

Removes all recurrence and exception rules and dates.

Definition at line 563 of file incidence.cpp.

void Incidence::clearTempFiles ( )

Deletes all temporary files used by attachments and frees any memory in use by them.

See Also
writeAttachmentToTempFile().

Definition at line 774 of file incidence.cpp.

virtual Incidence* KCalCore::Incidence::clone ( ) const
pure virtual

Returns an exact copy of this incidence.

The returned object is owned by the caller.

Dirty fields are cleared.

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

KDateTime Incidence::created ( ) const

Returns the incidence creation date/time.

See Also
setCreated().

Definition at line 369 of file incidence.cpp.

QString Incidence::customStatus ( ) const

Returns the non-standard status value.

See Also
setCustomStatus().

Definition at line 849 of file incidence.cpp.

void Incidence::deleteAttachment ( const Attachment::Ptr &  attachment)

Removes the specified attachment from the incidence.

Additionally, the memory used by the attachment is freed.

Parameters
attachmentis a pointer to a valid Attachment object.
See Also
addAttachment(), deleteAttachments().

Definition at line 707 of file incidence.cpp.

void Incidence::deleteAttachments ( const QString &  mime)

Removes all attachments of the specified MIME type from the incidence.

The memory used by all the removed attachments is freed.

Parameters
mimeis a QString containing the MIME type.
See Also
deleteAttachment().

Definition at line 716 of file incidence.cpp.

QString Incidence::description ( ) const

Returns the incidence description.

See Also
setDescription().
richDescription().

Definition at line 429 of file incidence.cpp.

bool Incidence::descriptionIsRich ( ) const

Returns true if incidence description contains RichText; false otherwise.

See Also
setDescription(), description().

Definition at line 443 of file incidence.cpp.

KDateTime Incidence::endDateForStart ( const KDateTime &  startDt) const
virtual

Returns the end date/time of the incidence occurrence if it starts at specified date/time.

Parameters
startDtis the specified starting date/time.
Returns
the corresponding end date/time for the occurrence; or the start date/time if the end date/time is invalid; or the end date/time if the start date/time is invalid.

Definition at line 679 of file incidence.cpp.

bool Incidence::equals ( const IncidenceBase &  incidence) const
protectedvirtual

Compares this with Incidence incidence for equality.

Parameters
incidenceis the Incidence to compare against.
Returns
true if the incidences are equal; false otherwise.

Reimplemented from KCalCore::IncidenceBase.

Reimplemented in KCalCore::Todo, KCalCore::Event, and KCalCore::Journal.

Definition at line 230 of file incidence.cpp.

float Incidence::geoLatitude ( ) const

Returns the incidence geoLatidude.

Returns
incidences geolatitude value
See Also
setGeoLatitude().

Definition at line 1001 of file incidence.cpp.

float Incidence::geoLongitude ( ) const

Returns the incidence geoLongitude.

Returns
incidences geolongitude value
See Also
setGeoLongitude().

Definition at line 1018 of file incidence.cpp.

bool Incidence::hasAltDescription ( ) const

Returns true if the alternative (=text/html) description is available.

See Also
setAltDescription(), altDescription()

Definition at line 1079 of file incidence.cpp.

bool Incidence::hasEnabledAlarms ( ) const

Returns true if any of the incidence alarms are enabled; false otherwise.

Definition at line 914 of file incidence.cpp.

bool Incidence::hasGeo ( ) const

Returns true if the incidence has geo data, otherwise return false.

See Also
setHasGeo(), setGeoLatitude(float), setGeoLongitude(float).

Definition at line 979 of file incidence.cpp.

bool Incidence::hasRecurrenceId ( ) const

Returns true if the incidence has recurrenceId, otherwise return false.

See Also
setRecurrenceId(KDateTime)

Definition at line 1033 of file incidence.cpp.

virtual QLatin1String KCalCore::Incidence::iconName ( const KDateTime &  recurrenceId = KDateTime()) const
pure virtual

Returns the name of the icon that best represents this incidence.

Parameters
recurrenceIdSome recurring incidences might use a different icon, for example, completed to-do occurrences. Use this parameter to identify the specific occurrence in a recurring serie.

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

QString Incidence::instanceIdentifier ( ) const

Returns a unique identifier for a specific instance of an incidence.

Due to the recurrence-id, the uid is not unique for a KCalCore::Incidence.

Since
4.11

Definition at line 299 of file incidence.cpp.

bool Incidence::localOnly ( ) const

Get the localOnly status.

Returns
true if Local only, false otherwise.
See Also
setLocalOnly()

Definition at line 340 of file incidence.cpp.

QString Incidence::location ( ) const

Returns the incidence location.

Do not use with journals.

See Also
setLocation().
richLocation().

Definition at line 942 of file incidence.cpp.

bool Incidence::locationIsRich ( ) const

Returns true if incidence location contains RichText; false otherwise.

See Also
setLocation(), location().

Definition at line 956 of file incidence.cpp.

Alarm::Ptr Incidence::newAlarm ( )

Create a new incidence alarm.

Definition at line 880 of file incidence.cpp.

int Incidence::priority ( ) const

Returns the incidence priority.

See Also
setPriority().

Definition at line 813 of file incidence.cpp.

void Incidence::recreate ( )

Recreate incidence.

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

Definition at line 307 of file incidence.cpp.

Recurrence * Incidence::recurrence ( ) const

Returns the recurrence rule associated with this incidence.

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

Definition at line 550 of file incidence.cpp.

KDateTime Incidence::recurrenceId ( ) const
virtual

Returns the incidence recurrenceId.

Returns
incidences recurrenceId value
See Also
setRecurrenceId().

Reimplemented from KCalCore::IncidenceBase.

Definition at line 1038 of file incidence.cpp.

ushort Incidence::recurrenceType ( ) const

Returns the event's recurrence status.

See the enumeration at the top of this file for possible values.

Definition at line 569 of file incidence.cpp.

void Incidence::recurrenceUpdated ( Recurrence *  recurrence)
virtual

Observer interface for the recurrence class.

If the recurrence is changed, this method will be called for the incidence the recurrence object belongs to.

Parameters
recurrenceis a pointer to a valid Recurrence object.

If the recurrence is changed, this method will be called for the incidence the recurrence object belongs to.

Definition at line 1066 of file incidence.cpp.

bool Incidence::recurs ( ) const

Returns whether the event recurs at all.

Definition at line 578 of file incidence.cpp.

bool Incidence::recursAt ( const KDateTime &  dt) const

Returns true if the date/time specified is one at which the event will recur.

Times are rounded down to the nearest minute to determine the result.

Parameters
dtis the date/time to check.

Definition at line 593 of file incidence.cpp.

bool Incidence::recursOn ( const QDate &  date,
const KDateTime::Spec &  timeSpec 
) const
virtual

Returns true if the date specified is one on which the event will recur.

Parameters
datedate to check.
timeSpectime specification for date.

Reimplemented in KCalCore::Todo.

Definition at line 587 of file incidence.cpp.

QString Incidence::relatedTo ( RelType  relType = RelTypeParent) const

Returns a UID string for the incidence that is related to this one.

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

Warning
KCalCore only supports one related-to field per reltype for now.
Parameters
relTypespecifies the relation type.
See Also
setRelatedTo().

Definition at line 543 of file incidence.cpp.

void Incidence::removeAlarm ( const Alarm::Ptr &  alarm)

Removes the specified alarm from the incidence.

Parameters
alarmis a pointer to a valid Alarm object.
See Also
addAlarm().

Definition at line 895 of file incidence.cpp.

QStringList Incidence::resources ( ) const

Returns the incidence resources as a list of strings.

See Also
setResources().

Definition at line 796 of file incidence.cpp.

int Incidence::revision ( ) const

Returns the number of revisions this incidence has seen.

See Also
setRevision().

Definition at line 387 of file incidence.cpp.

QString Incidence::richDescription ( ) const

Returns the incidence description in rich text format.

See Also
setDescription().
description().

Definition at line 434 of file incidence.cpp.

QString Incidence::richLocation ( ) const

Returns the incidence location in rich text format.

See Also
setLocation().
location().

Definition at line 947 of file incidence.cpp.

QString Incidence::richSummary ( ) const

Returns the incidence summary in rich text format.

See Also
setSummary().
summary().

Definition at line 470 of file incidence.cpp.

QString Incidence::schedulingID ( ) const

Returns the incidence scheduling ID.

Do not use with journals. If a scheduling ID is not set, then return the incidence UID.

See Also
setSchedulingID().

Definition at line 970 of file incidence.cpp.

Incidence::Secrecy Incidence::secrecy ( ) const

Returns the incidence Secrecy.

See Also
setSecrecy(), secrecyStr().

Definition at line 870 of file incidence.cpp.

void Incidence::setAllDay ( bool  allDay)

Definition at line 345 of file incidence.cpp.

void Incidence::setAltDescription ( const QString &  altdescription)

Sets the incidence's alternative (=text/html) description.

If the text is empty, the property is removed.

Parameters
altdescriptionis the incidence altdescription string.
See Also
altAltdescription().

Definition at line 1087 of file incidence.cpp.

void Incidence::setCategories ( const QStringList &  categories)

Sets the incidence category list.

Parameters
categoriesis a list of category strings.
See Also
setCategories( const QString &), categories().

Definition at line 484 of file incidence.cpp.

void Incidence::setCategories ( const QString &  catStr)

Sets the incidence category list based on a comma delimited string.

Parameters
catStris a QString containing a list of categories which are delimited by a comma character.
See Also
setCategories( const QStringList &), categories().

Definition at line 495 of file incidence.cpp.

void Incidence::setCreated ( const KDateTime &  dt)

Sets the incidence creation date/time.

It is stored as a UTC date/time.

Parameters
dtis the creation date/time.
See Also
created().

Definition at line 356 of file incidence.cpp.

void Incidence::setCustomStatus ( const QString &  status)

Sets the incidence Status to a non-standard status value.

Parameters
statusis a non-standard status string. If empty, the incidence Status will be set to StatusNone.
See Also
setStatus(), status() customStatus().

Definition at line 831 of file incidence.cpp.

void Incidence::setDescription ( const QString &  description,
bool  isRich 
)

Sets the incidence description.

Parameters
descriptionis the incidence description string.
isRichif true indicates the description string contains richtext.
See Also
description().

Definition at line 412 of file incidence.cpp.

void Incidence::setDescription ( const QString &  description)

Sets the incidence description and tries to guess if the description is rich text.

Parameters
descriptionis the incidence description string.
See Also
description().

Definition at line 424 of file incidence.cpp.

void Incidence::setDtStart ( const KDateTime &  dt)
virtual

Sets the incidence starting date/time.

Parameters
dtis the starting date/time.
See Also
IncidenceBase::dtStart().

Reimplemented from KCalCore::IncidenceBase.

Reimplemented in KCalCore::Todo, and KCalCore::Event.

Definition at line 392 of file incidence.cpp.

void Incidence::setGeoLatitude ( float  geolatitude)

Set the incidences geoLatitude.

Parameters
geolatitudeis the incidence geolatitude to set
See Also
geoLatitude().

Definition at line 1006 of file incidence.cpp.

void Incidence::setGeoLongitude ( float  geolongitude)

Set the incidencesgeoLongitude.

Parameters
geolongitudeis the incidence geolongitude to set
See Also
geoLongitude().

Definition at line 1023 of file incidence.cpp.

void Incidence::setHasGeo ( bool  hasGeo)

Sets if the incidence has geo data.

Parameters
hasGeotrue if incidence has geo data, otherwise false
See Also
hasGeo(), geoLatitude(), geoLongitude().

Definition at line 984 of file incidence.cpp.

void Incidence::setLastModified ( const KDateTime &  lm)
virtual

Reimplemented from KCalCore::IncidenceBase.

Definition at line 317 of file incidence.cpp.

void Incidence::setLocalOnly ( bool  localonly)

Set localOnly state of incidence.

A local only incidence can be updated but it will not increase the revision number neither the modified date.

Parameters
localonlyIf true, the incidence is set to localonly, if false the incidence is set to normal stat.

Definition at line 332 of file incidence.cpp.

void Incidence::setLocation ( const QString &  location,
bool  isRich 
)

Sets the incidence location.

Do not use with journals.

Parameters
locationis the incidence location string.
isRichif true indicates the location string contains richtext.
See Also
location().

Definition at line 924 of file incidence.cpp.

void Incidence::setLocation ( const QString &  location)

Sets the incidence location and tries to guess if the location is richtext.

Do not use with journals.

Parameters
locationis the incidence location string.
See Also
location().

Definition at line 937 of file incidence.cpp.

void Incidence::setPriority ( int  priority)

Sets the incidences priority.

The priority must be an integer value between 0 and 9, where 0 is undefined, 1 is the highest, and 9 is the lowest priority (decreasing order).

Parameters
priorityis the incidence priority to set.
See Also
priority().

Definition at line 801 of file incidence.cpp.

void Incidence::setReadOnly ( bool  readonly)
virtual

Set readonly state of incidence.

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

Reimplemented from KCalCore::IncidenceBase.

Definition at line 324 of file incidence.cpp.

void Incidence::setRecurrenceId ( const KDateTime &  recurrenceId)

Set the incidences recurrenceId.

This field indicates that this is an exception to a recurring incidence. The uid of this incidence MUST be the same as the one of the recurring main incidence.

Parameters
recurrenceIdis the incidence recurrenceId to set
See Also
recurrenceId().

Definition at line 1053 of file incidence.cpp.

void Incidence::setRelatedTo ( const QString &  uid,
RelType  relType = RelTypeParent 
)

Relates another incidence to this one, by UID.

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

Parameters
uidis a QString containing a UID for another incidence.
relTypespecifies the relation type.
Warning
KCalCore only supports one related-to field per reltype for now.
See Also
relatedTo().

Definition at line 530 of file incidence.cpp.

void Incidence::setResources ( const QStringList &  resources)

Sets a list of incidence resources.

(Note: resources in this context means items used by the incidence such as money, fuel, hours, etc).

Parameters
resourcesis a list of resource strings.
See Also
resources().

Definition at line 784 of file incidence.cpp.

void Incidence::setRevision ( int  rev)

Sets the number of revisions this incidence has seen.

Parameters
revis the incidence revision number.
See Also
revision().

Definition at line 374 of file incidence.cpp.

void Incidence::setSchedulingID ( const QString &  sid,
const QString &  uid = QString() 
)

Set the incidence scheduling ID.

Do not use with journals. This is used for accepted invitations as the place to store the UID of the invitation. It is later used again if updates to the invitation comes in. If we did not set a new UID on incidences from invitations, we can end up with more than one resource having events with the same UID, if you have access to other peoples resources.

While constructing an incidence, when setting the scheduling ID, you will always want to set the incidence UID too. Instead of calling setUID() separately, you can pass the UID through uid so both members are changed in one atomic operation ( don't forget that setUID() emits incidenceUpdated() and whoever catches that signal will have an half-initialized incidence, therefore, always set the schedulingID and UID at the same time, and never with two separate calls).

Parameters
sidis a QString containing the scheduling ID.
uidis a QString containing the incidence UID to set, if not specified, the current UID isn't changed, and this parameter is ignored.
See Also
schedulingID().

Definition at line 961 of file incidence.cpp.

void Incidence::setSecrecy ( Incidence::Secrecy  secrecy)

Sets the incidence Secrecy.

Parameters
secrecyis the incidence Secrecy to set.
See Also
secrecy(), secrecyStr().

Definition at line 858 of file incidence.cpp.

void Incidence::setStatus ( Incidence::Status  status)

Sets the incidence status to a standard Status value.

Note that StatusX cannot be specified.

Parameters
statusis the incidence Status to set.
See Also
status(), setCustomStatus().

Definition at line 818 of file incidence.cpp.

void Incidence::setSummary ( const QString &  summary,
bool  isRich 
)

Sets the incidence summary.

Parameters
summaryis the incidence summary string.
isRichif true indicates the summary string contains richtext.
See Also
summary().

Definition at line 448 of file incidence.cpp.

void Incidence::setSummary ( const QString &  summary)

Sets the incidence summary and tries to guess if the summary is richtext.

Parameters
summaryis the incidence summary string.
See Also
summary().

Definition at line 460 of file incidence.cpp.

void Incidence::setThisAndFuture ( bool  thisAndFuture)

Set to true if the exception also applies to all future occurrences.

This option is only relevant if the incidence has a recurrenceId set.

Parameters
thisAndFuturevalue
See Also
thisAndFuture(), setRecurrenceId()
Since
4.11

Definition at line 1043 of file incidence.cpp.

void Incidence::shiftTimes ( const KDateTime::Spec &  oldSpec,
const KDateTime::Spec &  newSpec 
)
virtual

Shift the times of the incidence so that they appear at the same clock time as before but in a new time zone.

The shift is done from a viewing time zone rather than from the actual incidence time zone.

For example, shifting an incidence whose start time is 09:00 America/New York, using an old viewing time zone (oldSpec) of Europe/London, to a new time zone (newSpec) of Europe/Paris, will result in the time being shifted from 14:00 (which is the London time of the incidence start) to 14:00 Paris time.

Parameters
oldSpecthe time specification which provides the clock times
newSpecthe new time specification

Reimplemented from KCalCore::IncidenceBase.

Reimplemented in KCalCore::Todo, and KCalCore::Event.

Definition at line 400 of file incidence.cpp.

QList< KDateTime > Incidence::startDateTimesForDate ( const QDate &  date,
const KDateTime::Spec &  timeSpec = KDateTime::LocalZone 
) const
virtual

Calculates the start date/time for all recurrences that happen at some time on the given date (might start before that date, but end on or after the given date).

Parameters
datethe date when the incidence should occur
timeSpectime specification for date.
Returns
the start date/time of all occurrences that overlap with the given date; an empty list if the incidence does not overlap with the date at all.

Definition at line 598 of file incidence.cpp.

QList< KDateTime > Incidence::startDateTimesForDateTime ( const KDateTime &  datetime) const
virtual

Calculates the start date/time for all recurrences that happen at the given time.

Parameters
datetimethe date/time when the incidence should occur.
Returns
the start date/time of all occurrences that overlap with the given date/time; an empty list if the incidence does not happen at the given time at all.

Definition at line 639 of file incidence.cpp.

Incidence::Status Incidence::status ( ) const

Returns the incidence Status.

See Also
setStatus(), setCustomStatus(), statusStr().

Definition at line 844 of file incidence.cpp.

QString Incidence::summary ( ) const

Returns the incidence summary.

See Also
setSummary().
richSummary().

Definition at line 465 of file incidence.cpp.

bool Incidence::summaryIsRich ( ) const

Returns true if incidence summary contains RichText; false otherwise.

See Also
setSummary(), summary().

Definition at line 479 of file incidence.cpp.

bool Incidence::supportsGroupwareCommunication ( ) const

Returns true if the incidence type supports groupware communication.

Since
4.10

Definition at line 1107 of file incidence.cpp.

bool Incidence::thisAndFuture ( ) const

Returns true if the exception also applies to all future occurrences.

Returns
incidences thisAndFuture value
See Also
setThisAndFuture()
Since
4.11

Definition at line 1048 of file incidence.cpp.

QString Incidence::writeAttachmentToTempFile ( const Attachment::Ptr &  attachment) const

Writes the data in the attachment attachment to a temporary file and returns the local name of the temporary file.

Parameters
attachmentis a pointer to a valid Attachment instance.
Returns
a string containing the name of the temporary file containing the attachment.
See Also
clearTempFiles().

Definition at line 752 of file incidence.cpp.


The documentation for this class was generated from the following files:
  • incidence.h
  • incidence.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:02:05 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal