KCalendarCore::Incidence

Search for usage in LXR

#include <incidence.h>

Inheritance diagram for KCalendarCore::Incidence:

Public Types

typedef QVector< PtrList
 
typedef QSharedPointer< IncidencePtr
 
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 KCalendarCore::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,
  FieldUrl, FieldConferences, FieldColor
}
 
enum  IncidenceType {
  TypeEvent = 0, TypeTodo, TypeJournal, TypeFreeBusy,
  TypeUnknown
}
 
typedef QSharedPointer< IncidenceBasePtr
 

Properties

QVariantList attachments
 
QStringList categories
 
QVariantList conferences
 
QDateTime created
 
QString description
 
float geoLatitude
 
float geoLongitude
 
bool hasGeo
 
QString location
 
int priority
 
KCalendarCore::Incidence::Secrecy secrecy
 
KCalendarCore::Incidence::Status status
 
QString summary
 
- Properties inherited from KCalendarCore::IncidenceBase
bool allDay
 
QVariantList attendees
 
QDateTime dtStart
 
QDateTime lastModified
 
KCalendarCore::Person organizer
 
QString uid
 
QUrl url
 

Public Member Functions

 Incidence ()
 
 Incidence (IncidencePrivate *p)
 
 ~Incidence () override
 
void addAlarm (const Alarm::Ptr &alarm)
 
void addAttachment (const Attachment &attachment)
 
void addConference (const Conference &conference)
 
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 clearConferences ()
 
void clearRecurrence ()
 
virtual Incidenceclone () const =0
 
QString color () const
 
Conference::List conferences () const
 
QDateTime created () const
 
QString customStatus () const
 
void deleteAttachments (const QString &mime)
 
QString description () const
 
bool descriptionIsRich () const
 
virtual QDateTime endDateForStart (const QDateTime &startDt) const
 
float geoLatitude () const
 
float geoLongitude () const
 
bool hasAltDescription () const
 
bool hasEnabledAlarms () const
 
bool hasGeo () const
 
bool hasRecurrenceId () const
 
virtual QLatin1String iconName (const QDateTime &recurrenceId={}) const =0
 
QString instanceIdentifier () const
 
bool localOnly () const
 
QString location () const
 
bool locationIsRich () const
 
Alarm::Ptr newAlarm ()
 
int priority () const
 
void recreate ()
 
Recurrencerecurrence () const
 
QDateTime recurrenceId () const override
 
ushort recurrenceType () const
 
void recurrenceUpdated (Recurrence *recurrence) override
 
bool recurs () const
 
bool recursAt (const QDateTime &dt) const
 
virtual bool recursOn (const QDate &date, const QTimeZone &timeZone) 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) override
 
void setAltDescription (const QString &altdescription)
 
void setCategories (const QString &catStr)
 
void setCategories (const QStringList &categories)
 
void setColor (const QString &colorName)
 
void setConferences (const Conference::List &conferences)
 
void setCreated (const QDateTime &dt)
 
void setCustomStatus (const QString &status)
 
void setDescription (const QString &description)
 
void setDescription (const QString &description, bool isRich)
 
void setDtStart (const QDateTime &dt) override
 
void setGeoLatitude (float geolatitude)
 
void setGeoLongitude (float geolongitude)
 
void setHasGeo (bool hasGeo)
 
void setLastModified (const QDateTime &lm) override
 
void setLocalOnly (bool localonly)
 
void setLocation (const QString &location)
 
void setLocation (const QString &location, bool isRich)
 
void setPriority (int priority)
 
void setReadOnly (bool readonly) override
 
void setRecurrenceId (const QDateTime &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)
 
void setSummary (const QString &summary, bool isRich)
 
void setThisAndFuture (bool thisAndFuture)
 
void shiftTimes (const QTimeZone &oldZone, const QTimeZone &newZone) override
 
virtual QList< QDateTimestartDateTimesForDate (const QDate &date, const QTimeZone &timeZone) const
 
virtual QList< QDateTimestartDateTimesForDateTime (const QDateTime &datetime) const
 
Status status () const
 
QString summary () const
 
bool summaryIsRich () const
 
virtual bool supportsGroupwareCommunication () const =0
 
bool thisAndFuture () const
 
- Public Member Functions inherited from KCalendarCore::IncidenceBase
 IncidenceBase ()
 
KCALENDARCORE_NO_EXPORT IncidenceBase (IncidenceBasePrivate *p)
 
 ~IncidenceBase () override
 
virtual bool accept (Visitor &v, const IncidenceBase::Ptr &incidence)
 
void addAttendee (const Attendee &attendee, bool doUpdate=true)
 
void addComment (const QString &comment)
 
void addContact (const QString &contact)
 
bool allDay () const
 
Attendee attendeeByMail (const QString &email) const
 
Attendee attendeeByMails (const QStringList &emails, const QString &email=QString()) const
 
Attendee 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 QDateTime dateTime (DateTimeRole role) const =0
 
QSet< IncidenceBase::FielddirtyFields () const
 
virtual QDateTime dtStart () const
 
Duration duration () const
 
void endUpdates ()
 
bool hasDuration () const
 
bool isReadOnly () const
 
QDateTime lastModified () const
 
virtual QLatin1String mimeType () const =0
 
bool operator!= (const IncidenceBase &ib) const
 
IncidenceBaseoperator= (const IncidenceBase &other)
 
bool operator== (const IncidenceBase &ib) const
 
Person organizer () const
 
void registerObserver (IncidenceObserver *observer)
 
bool removeComment (const QString &comment)
 
bool removeContact (const QString &contact)
 
void resetDirtyFields ()
 
void setAttendees (const Attendee::List &attendees, bool doUpdate=true)
 
virtual void setDateTime (const QDateTime &dateTime, DateTimeRole role)=0
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
virtual void setDuration (const Duration &duration)
 
void setHasDuration (bool hasDuration)
 
void setOrganizer (const Person &organizer)
 
void setOrganizer (const QString &organizer)
 
void setUid (const QString &uid)
 
void setUrl (const QUrl &url)
 
void startUpdates ()
 
virtual IncidenceType type () const =0
 
virtual QByteArray typeStr () const =0
 
QString uid () const
 
void unRegisterObserver (IncidenceObserver *observer)
 
void update ()
 
void updated ()
 
QUrl uri () const
 
QUrl url () const
 
- Public Member Functions inherited from KCalendarCore::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QStringcustomProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
QString nonKDECustomPropertyParameters (const QByteArray &name) const
 
CustomPropertiesoperator= (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())
 

Static Public Member Functions

static QStringList mimeTypes ()
 
- Static Public Member Functions inherited from KCalendarCore::IncidenceBase
static quint32 magicSerializationIdentifier ()
 
- Static Public Member Functions inherited from KCalendarCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Protected Member Functions

 Incidence (const Incidence &other)
 
 Incidence (const Incidence &other, IncidencePrivate *p)
 
IncidenceBaseassign (const IncidenceBase &other) override
 
void deserialize (QDataStream &in) override
 
bool equals (const IncidenceBase &incidence) const override
 
void serialize (QDataStream &out) const override
 
- Protected Member Functions inherited from KCalendarCore::IncidenceBase
 IncidenceBase (const IncidenceBase &ib)
 
KCALENDARCORE_NO_EXPORT IncidenceBase (const IncidenceBase &ib, IncidenceBasePrivate *p)
 
void customPropertyUpdate () override
 
void customPropertyUpdated () override
 
void setFieldDirty (IncidenceBase::Field field)
 
virtual void virtual_hook (VirtualHook id, void *data)=0
 

Protected Attributes

IncidencePrivate *const _ = nullptr
 
- Protected Attributes inherited from KCalendarCore::IncidenceBase
IncidenceBasePrivate *const d_ptr
 
bool mReadOnly
 

Additional Inherited Members

- Protected Types inherited from KCalendarCore::IncidenceBase
enum  VirtualHook
 

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

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 59 of file incidence.h.

Member Typedef Documentation

◆ List

List of incidences.

Definition at line 126 of file incidence.h.

◆ Ptr

A shared pointer to an Incidence.

Definition at line 121 of file incidence.h.

Member Enumeration Documentation

◆ 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 112 of file incidence.h.

◆ 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 101 of file incidence.h.

◆ 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 84 of file incidence.h.

Constructor & Destructor Documentation

◆ Incidence() [1/4]

Incidence::Incidence ( )

Constructs an empty incidence.

Deprecated:
Use Incidence(IncidencePrivate *p).

Definition at line 132 of file incidence.cpp.

◆ Incidence() [2/4]

Incidence::Incidence ( IncidencePrivate *  p)

Constructs an empty incidence.

Parameters
p(non-null) a Private data object provided by the instantiated class (Event, Todo, Journal, FreeBusy). It passes ownership of the object to IncidenceBase.

Definition at line 149 of file incidence.cpp.

◆ ~Incidence()

Incidence::~Incidence ( )
override

Destroys an incidence.

Definition at line 165 of file incidence.cpp.

◆ Incidence() [3/4]

Incidence::Incidence ( const Incidence other)
protected

Copy constructor.

Parameters
otheris the incidence to copy.
Deprecated:
Use Incidence(const Incidence &other, IncidencePrivate *p).

Definition at line 139 of file incidence.cpp.

◆ Incidence() [4/4]

Incidence::Incidence ( const Incidence other,
IncidencePrivate *  p 
)
protected
Parameters
otheris the incidence to copy.
p(non-null) a Private data object provided by the instantiated class (Event, Todo, Journal, FreeBusy). It passes ownership of the object to IncidenceBase.

Definition at line 156 of file incidence.cpp.

Member Function Documentation

◆ addAlarm()

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

◆ addAttachment()

void Incidence::addAttachment ( const Attachment attachment)

Adds an attachment to the incidence.

Parameters
attachmenta valid Attachment object.

Definition at line 723 of file incidence.cpp.

◆ addConference()

void Incidence::addConference ( const Conference conference)

Adds a conference to the incidence.

Parameters
confereneA conference to add.
Since
5.77

Definition at line 946 of file incidence.cpp.

◆ alarms()

Alarm::List Incidence::alarms ( ) const

Returns a list of all incidence alarms.

Definition at line 888 of file incidence.cpp.

◆ altDescription()

QString Incidence::altDescription ( ) const

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

See also
setAltDescription().

Definition at line 1191 of file incidence.cpp.

◆ assign()

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

Provides polymorfic assignment.

Parameters
otheris the IncidenceBase to assign.

Reimplemented from KCalendarCore::IncidenceBase.

Reimplemented in KCalendarCore::Todo, and KCalendarCore::Journal.

Definition at line 184 of file incidence.cpp.

◆ attachments() [1/2]

Attachment::List KCalendarCore::Incidence::attachments ( ) const

Returns a list of all incidence attachments.

See also
attachments( const QString &).

◆ attachments() [2/2]

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

◆ categories()

QStringList KCalendarCore::Incidence::categories ( ) const

Returns the incidence categories as a list of strings.

See also
setCategories( const QStringList &), setCategories( const QString &).

◆ categoriesStr()

QString Incidence::categoriesStr ( ) const

Returns the incidence categories as a comma separated string.

See also
categories().

Definition at line 528 of file incidence.cpp.

◆ clearAlarms()

void Incidence::clearAlarms ( )

Removes all alarms.

See also
removeAlarm().

Definition at line 923 of file incidence.cpp.

◆ clearAttachments()

void Incidence::clearAttachments ( )

Removes all attachments and frees the memory used by them.

See also
deleteAttachments( const QString &).

Definition at line 768 of file incidence.cpp.

◆ clearConferences()

void Incidence::clearConferences ( )

Removes all conferences from the incidence.

Since
5.77

Definition at line 964 of file incidence.cpp.

◆ clearRecurrence()

void Incidence::clearRecurrence ( )

Removes all recurrence and exception rules and dates.

Definition at line 590 of file incidence.cpp.

◆ clone()

virtual Incidence* KCalendarCore::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 KCalendarCore::Event, KCalendarCore::Todo, and KCalendarCore::Journal.

◆ color()

QString Incidence::color ( ) const

Returns the color, if any is defined, for this incidence.

Since
: 5.76

Definition at line 568 of file incidence.cpp.

◆ conferences()

Conference::List KCalendarCore::Incidence::conferences ( ) const

Returns list of all incidence conferencing methods.

Since
5.77

◆ created()

QDateTime KCalendarCore::Incidence::created ( ) const

Returns the incidence creation date/time.

See also
setCreated().

◆ customStatus()

QString Incidence::customStatus ( ) const

Returns the non-standard status value.

See also
setCustomStatus().

Definition at line 859 of file incidence.cpp.

◆ deleteAttachments()

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

◆ description()

QString KCalendarCore::Incidence::description ( ) const

Returns the incidence description.

See also
setDescription().
richDescription().

◆ descriptionIsRich()

bool Incidence::descriptionIsRich ( ) const

Returns true if incidence description contains RichText; false otherwise.

See also
setDescription(), description().

Definition at line 436 of file incidence.cpp.

◆ deserialize()

void Incidence::deserialize ( QDataStream in)
overrideprotectedvirtual

Sub-type specific deserialization.

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 1235 of file incidence.cpp.

◆ endDateForStart()

QDateTime Incidence::endDateForStart ( const QDateTime 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 709 of file incidence.cpp.

◆ equals()

bool Incidence::equals ( const IncidenceBase incidence) const
overrideprotectedvirtual

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 KCalendarCore::IncidenceBase.

Reimplemented in KCalendarCore::Todo, and KCalendarCore::Journal.

Definition at line 198 of file incidence.cpp.

◆ geoLatitude()

float KCalendarCore::Incidence::geoLatitude ( ) const

Returns the incidence's geoLatitude as a value between -90.0 and 90.0 or INVALID_LATLON.

If either of geoLatitude() and geoLongitude() are INVALID_LATLON, then both are, and hasGeo() is false.

Returns
incidences geolatitude value
See also
setGeoLatitude().

◆ geoLongitude()

float KCalendarCore::Incidence::geoLongitude ( ) const

Returns the incidence's geoLongitude as a value between -180.0 and 180.0 or INVALID_LATLON.

If either of geoLatitude() and geoLongitude() are INVALID_LATLON, then both are, and hasGeo() is false.

Returns
incidences geolongitude value
See also
setGeoLongitude().

◆ hasAltDescription()

bool Incidence::hasAltDescription ( ) const

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

See also
setAltDescription(), altDescription()

Definition at line 1174 of file incidence.cpp.

◆ hasEnabledAlarms()

bool Incidence::hasEnabledAlarms ( ) const

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

Definition at line 932 of file incidence.cpp.

◆ hasGeo()

bool KCalendarCore::Incidence::hasGeo ( ) const

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

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

◆ hasRecurrenceId()

bool Incidence::hasRecurrenceId ( ) const

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

See also
setRecurrenceId(QDateTime)

Definition at line 1121 of file incidence.cpp.

◆ iconName()

virtual QLatin1String KCalendarCore::Incidence::iconName ( const QDateTime recurrenceId = {}) 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 KCalendarCore::Todo, KCalendarCore::Event, and KCalendarCore::Journal.

◆ instanceIdentifier()

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 KCalendarCore::Incidence.

Since
4.11

Definition at line 273 of file incidence.cpp.

◆ localOnly()

bool Incidence::localOnly ( ) const

Get the localOnly status.

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

Definition at line 317 of file incidence.cpp.

◆ location()

QString KCalendarCore::Incidence::location ( ) const

Returns the incidence location.

Do not use with journals.

See also
setLocation().
richLocation().

◆ locationIsRich()

bool Incidence::locationIsRich ( ) const

Returns true if incidence location contains RichText; false otherwise.

See also
setLocation(), location().

Definition at line 1010 of file incidence.cpp.

◆ mimeTypes()

QStringList Incidence::mimeTypes ( )
static

Returns the list of possible mime types in an Incidence object: "text/calendar" "application/x-vnd.akonadi.calendar.event" "application/x-vnd.akonadi.calendar.todo" "application/x-vnd.akonadi.calendar.journal".

static

Since
4.12

Definition at line 1201 of file incidence.cpp.

◆ newAlarm()

Alarm::Ptr Incidence::newAlarm ( )

Create a new incidence alarm.

Definition at line 894 of file incidence.cpp.

◆ priority()

int KCalendarCore::Incidence::priority ( ) const

Returns the incidence priority.

See also
setPriority().

◆ recreate()

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

◆ recurrence()

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

◆ recurrenceId()

QDateTime Incidence::recurrenceId ( ) const
overridevirtual

Returns the incidence recurrenceId.

Returns
incidences recurrenceId value
See also
setRecurrenceId().

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 1127 of file incidence.cpp.

◆ recurrenceType()

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

◆ recurrenceUpdated()

void Incidence::recurrenceUpdated ( Recurrence recurrence)
override

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

◆ recurs()

bool Incidence::recurs ( ) const

Returns whether the event recurs at all.

Definition at line 607 of file incidence.cpp.

◆ recursAt()

bool Incidence::recursAt ( const QDateTime 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 623 of file incidence.cpp.

◆ recursOn()

bool Incidence::recursOn ( const QDate date,
const QTimeZone timeZone 
) const
virtual

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

Parameters
datedate to check.
timeZonetime zone for the date.

Reimplemented in KCalendarCore::Todo.

Definition at line 617 of file incidence.cpp.

◆ relatedTo()

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
KCalendarCore only supports one related-to field per reltype for now.
Parameters
relTypespecifies the relation type.
See also
setRelatedTo().

Definition at line 548 of file incidence.cpp.

◆ removeAlarm()

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

◆ resources()

QStringList Incidence::resources ( ) const

Returns the incidence resources as a list of strings.

See also
setResources().

Definition at line 790 of file incidence.cpp.

◆ revision()

int Incidence::revision ( ) const

Returns the number of revisions this incidence has seen.

See also
setRevision().

Definition at line 370 of file incidence.cpp.

◆ richDescription()

QString Incidence::richDescription ( ) const

Returns the incidence description in rich text format.

See also
setDescription().
description().

Definition at line 426 of file incidence.cpp.

◆ richLocation()

QString Incidence::richLocation ( ) const

Returns the incidence location in rich text format.

See also
setLocation().
location().

Definition at line 1000 of file incidence.cpp.

◆ richSummary()

QString Incidence::richSummary ( ) const

Returns the incidence summary in rich text format.

See also
setSummary().
summary().

Definition at line 468 of file incidence.cpp.

◆ schedulingID()

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

◆ secrecy()

Secrecy KCalendarCore::Incidence::secrecy ( ) const

Returns the incidence Secrecy.

See also
setSecrecy(), secrecyStr().

◆ serialize()

void Incidence::serialize ( QDataStream out) const
overrideprotectedvirtual

Sub-type specific serialization.

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 1207 of file incidence.cpp.

◆ setAllDay()

void Incidence::setAllDay ( bool  allDay)
overridevirtual

Reimplemented from KCalendarCore::IncidenceBase.

Reimplemented in KCalendarCore::Todo.

Definition at line 323 of file incidence.cpp.

◆ setAltDescription()

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

◆ setCategories() [1/2]

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

◆ setCategories() [2/2]

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.

◆ setColor()

void Incidence::setColor ( const QString colorName)

Set the incidence color, as added in RFC7986.

Parameters
colorNamea named color as defined in CSS3 color name, see https://www.w3.org/TR/css-color-3/#svg-color.
Since
: 5.76

Definition at line 554 of file incidence.cpp.

◆ setConferences()

void Incidence::setConferences ( const Conference::List conferences)

Replaces all conferences in the incidence with given conferences.

Parameters
conferencesNew conferences to store in the incidence.
Since
5.77

Definition at line 955 of file incidence.cpp.

◆ setCreated()

void Incidence::setCreated ( const QDateTime 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 335 of file incidence.cpp.

◆ setCustomStatus()

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

◆ setDescription() [1/2]

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

◆ setDescription() [2/2]

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

◆ setDtStart()

void Incidence::setDtStart ( const QDateTime dt)
overridevirtual

Sets the incidence starting date/time.

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

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 376 of file incidence.cpp.

◆ setGeoLatitude()

void Incidence::setGeoLatitude ( float  geolatitude)

Set the incidence's geoLatitude.

Parameters
geolatitudeis the incidence geolatitude to set; a value between -90.0 and 90.0, or INVALID_LATLON (or NaN, which is treated as INVALID_LATLON).
See also
geoLatitude().

Definition at line 1072 of file incidence.cpp.

◆ setGeoLongitude()

void Incidence::setGeoLongitude ( float  geolongitude)

Set the incidence's geoLongitude.

Parameters
geolongitudeis the incidence geolongitude to set; a value between -180.0 and 180.0, or INVALID_LATLON (or NaN, which is treated as INVALID_LATLON).
See also
geoLongitude().

Definition at line 1100 of file incidence.cpp.

◆ setHasGeo()

void Incidence::setHasGeo ( bool  hasGeo)

Sets if the incidence has geo data.

Parameters
hasGeoif true, latitude and longitude must be set to valid values. If false, geoLatitude() and geoLongitude() will return INVALID_LATLON.
Deprecated:
since 5.89. Use setGeoLatitude() and setGeoLongitude().
See also
hasGeo(), geoLatitude(), geoLongitude().

Definition at line 1047 of file incidence.cpp.

◆ setLastModified()

void Incidence::setLastModified ( const QDateTime lm)
overridevirtual

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 291 of file incidence.cpp.

◆ setLocalOnly()

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

◆ setLocation() [1/2]

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

◆ setLocation() [2/2]

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

◆ setPriority()

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

◆ setReadOnly()

void Incidence::setReadOnly ( bool  readonly)
overridevirtual

Set readonly state of incidence.

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

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 299 of file incidence.cpp.

◆ setRecurrenceId()

void Incidence::setRecurrenceId ( const QDateTime 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 1145 of file incidence.cpp.

◆ setRelatedTo()

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
KCalendarCore only supports one related-to field per reltype for now.
See also
relatedTo().

Definition at line 534 of file incidence.cpp.

◆ setResources()

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

◆ setRevision()

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

◆ setSchedulingID()

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

◆ setSecrecy()

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

Sets the incidence Secrecy.

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

Definition at line 869 of file incidence.cpp.

◆ setStatus()

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

Sets the incidence status to a standard Status value.

Events, Todos, and Journals each have a different set of valid statuses. Note that StatusX cannot be specified. Invalid statuses are logged and ignored.

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

Definition at line 820 of file incidence.cpp.

◆ setSummary() [1/2]

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

◆ setSummary() [2/2]

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

◆ setThisAndFuture()

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

◆ shiftTimes()

void Incidence::shiftTimes ( const QTimeZone oldZone,
const QTimeZone newZone 
)
overridevirtual

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
oldZonethe time zone which provides the clock times
newZonethe new time zone

Reimplemented from KCalendarCore::IncidenceBase.

Reimplemented in KCalendarCore::Todo.

Definition at line 385 of file incidence.cpp.

◆ startDateTimesForDate()

QList< QDateTime > Incidence::startDateTimesForDate ( const QDate date,
const QTimeZone timeZone 
) 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 629 of file incidence.cpp.

◆ startDateTimesForDateTime()

QList< QDateTime > Incidence::startDateTimesForDateTime ( const QDateTime 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 669 of file incidence.cpp.

◆ status()

Status KCalendarCore::Incidence::status ( ) const

Returns the incidence Status.

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

◆ summary()

QString KCalendarCore::Incidence::summary ( ) const

Returns the incidence summary.

See also
setSummary().
richSummary().

◆ summaryIsRich()

bool Incidence::summaryIsRich ( ) const

Returns true if incidence summary contains RichText; false otherwise.

See also
setSummary(), summary().

Definition at line 478 of file incidence.cpp.

◆ supportsGroupwareCommunication()

virtual bool KCalendarCore::Incidence::supportsGroupwareCommunication ( ) const
pure virtual

Returns true if the incidence type supports groupware communication.

Since
4.10

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

◆ thisAndFuture()

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


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Dec 6 2023 04:00:55 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.