KCalendarCore::Event

#include <event.h>

Inheritance diagram for KCalendarCore::Event:

Public Types

typedef QVector< PtrList
 
typedef QSharedPointer< EventPtr
 
enum  Transparency { Opaque, Transparent }
 
- Public Types inherited from KCalendarCore::Incidence
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

QDateTime dtEnd
 
KCalendarCore::Event::Transparency transparency
 
- Properties inherited from KCalendarCore::Incidence
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
 

Public Member Functions

 Event ()
 
 Event (const Event &other)
 
 Event (const Incidence &other)
 
 ~Event () override
 
Eventclone () const override
 
QDate dateEnd () const
 
QDateTime dateTime (DateTimeRole role) const override
 
virtual QDateTime dtEnd () const
 
bool hasEndDate () const
 
QLatin1String iconName (const QDateTime &recurrenceId={}) const override
 
bool isMultiDay (const QTimeZone &zone={}) const
 
QLatin1String mimeType () const override
 
void setAllDay (bool allDay) override
 
void setDateTime (const QDateTime &dateTime, DateTimeRole role) override
 
void setDtEnd (const QDateTime &dtEnd)
 
void setDtStart (const QDateTime &dt) override
 
void setDuration (const Duration &duration) override
 
void setTransparency (Transparency transparency)
 
void shiftTimes (const QTimeZone &oldZone, const QTimeZone &newZone) override
 
bool supportsGroupwareCommunication () const override
 
Transparency transparency () const
 
IncidenceType type () const override
 
QByteArray typeStr () const override
 
- Public Member Functions inherited from KCalendarCore::Incidence
 Incidence ()
 
 ~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 ()
 
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
 
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 QStringList &categories)
 
void setCategories (const QString &catStr)
 
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, bool isRich)
 
void setDescription (const QString &description)
 
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, bool isRich)
 
void setLocation (const QString &location)
 
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, bool isRich)
 
void setSummary (const QString &summary)
 
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
 
bool thisAndFuture () const
 
- Public Member Functions inherited from KCalendarCore::IncidenceBase
 IncidenceBase ()
 
 ~IncidenceBase () override
 
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
 
QSet< IncidenceBase::FielddirtyFields () const
 
virtual QDateTime dtStart () const
 
Duration duration () const
 
void endUpdates ()
 
bool hasDuration () const
 
bool isReadOnly () const
 
QDateTime lastModified () const
 
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)
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
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 ()
 
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 QLatin1String eventMimeType ()
 
- Static Public Member Functions inherited from KCalendarCore::Incidence
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

IncidenceBaseassign (const IncidenceBase &other) override
 
bool equals (const IncidenceBase &event) const override
 
void virtual_hook (VirtualHook id, void *data) override
 
- Protected Member Functions inherited from KCalendarCore::Incidence
 Incidence (const Incidence &other)
 
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)
 
void customPropertyUpdate () override
 
void customPropertyUpdated () override
 
void setFieldDirty (IncidenceBase::Field field)
 

Additional Inherited Members

- Protected Types inherited from KCalendarCore::IncidenceBase
enum  VirtualHook
 
- Protected Attributes inherited from KCalendarCore::IncidenceBase
bool mReadOnly
 

Detailed Description

This class provides an Event in the sense of RFC2445.

Definition at line 30 of file event.h.

Member Typedef Documentation

List of events.

Definition at line 53 of file event.h.

A shared pointer to an Event object.

Definition at line 48 of file event.h.

Member Enumeration Documentation

The different Event transparency types.

Enumerator
Opaque 

Event appears in free/busy time.

Transparent 

Event does not appear in free/busy time.

Definition at line 39 of file event.h.

Constructor & Destructor Documentation

Event::Event ( )

Constructs an event.

Private class that helps to provide binary compatibility between releases.

Definition at line 43 of file event.cpp.

Event::Event ( const Event other)

Copy constructor.

Parameters
otheris the event to copy.

Definition at line 48 of file event.cpp.

Event::Event ( const Incidence other)

Costructs an event out of an incidence This constructs allows to make it easy to create an event from a todo.

Parameters
otheris the incidence to copy.
Since
4.14

Definition at line 53 of file event.cpp.

Event::~Event ( )
override

Destroys the event.

Definition at line 59 of file event.cpp.

Member Function Documentation

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

IncidenceBase::assign()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 69 of file event.cpp.

Event * Event::clone ( ) const
overridevirtual

Returns an exact copy of this Event.

The caller owns the returned object.

Implements KCalendarCore::Incidence.

Definition at line 64 of file event.cpp.

QDate Event::dateEnd ( ) const

Returns the date when the event ends.

This might be different from dtEnd().date, since the end date/time is non-inclusive. So timed events ending at 0:00 have their end date on the day before.

Definition at line 146 of file event.cpp.

QDateTime Event::dateTime ( DateTimeRole  role) const
overridevirtual

IncidenceBase::dateTime()

Implements KCalendarCore::IncidenceBase.

Definition at line 239 of file event.cpp.

virtual QDateTime KCalendarCore::Event::dtEnd ( ) const
virtual

Returns the event end date and time.

Important note for all day events: the returned end date is inclusive, the event will still occur during dtEnd(). When serializing to iCalendar DTEND will be dtEnd()+1, because the RFC states that DTEND is exclusive.

See also
setDtEnd().
bool Event::equals ( const IncidenceBase event) const
overrideprotectedvirtual

Compares two events for equality.

Parameters
eventis the event to compare.

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 79 of file event.cpp.

QLatin1String Event::eventMimeType ( )
static

Returns the Akonadi specific sub MIME type of a KCalendarCore::Event.

Definition at line 298 of file event.cpp.

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

Definition at line 156 of file event.cpp.

QLatin1String Event::iconName ( const QDateTime recurrenceId = {}) const
overridevirtual

Incidence::iconName()

Implements KCalendarCore::Incidence.

Definition at line 303 of file event.cpp.

bool Event::isMultiDay ( const QTimeZone zone = {}) const

Returns true if the event spans multiple days, otherwise return false.

For recurring events, it returns true if the first occurrence spans multiple days, otherwise returns false. Other occurrences might have a different span due to day light savings changes.

Parameters
zoneIf set, looks if the event is multiday for the given zone. If not set, looks if event this multiday for its zone.

Definition at line 161 of file event.cpp.

QLatin1String KCalendarCore::Event::mimeType ( ) const
overridevirtual

IncidenceBase::mimeType()

Implements KCalendarCore::IncidenceBase.

Definition at line 293 of file event.cpp.

void Event::setAllDay ( bool  allDay)
overridevirtual

IncidenceBase::setAllDay().

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 226 of file event.cpp.

void Event::setDateTime ( const QDateTime dateTime,
DateTimeRole  role 
)
overridevirtual
void Event::setDtEnd ( const QDateTime dtEnd)

Sets the event end date and time.

Important note for all day events: the end date is inclusive, the event will still occur during dtEnd(). When serializing to iCalendar DTEND will be dtEnd()+1, because the RFC states that DTEND is exclusive.

Parameters
dtEndis a QDateTime specifying when the event ends.
See also
dtEnd(), dateEnd().

Definition at line 109 of file event.cpp.

void Event::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 103 of file event.cpp.

void Event::setDuration ( const Duration duration)
overridevirtual

Sets the duration of this event.

Parameters
durationis the event Duration.

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 220 of file event.cpp.

void Event::setTransparency ( Event::Transparency  transparency)

Sets the event's time transparency level.

Parameters
transparencyis the event Transparency level.

Definition at line 204 of file event.cpp.

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

IncidenceBase::shiftTimes()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 195 of file event.cpp.

bool Event::supportsGroupwareCommunication ( ) const
overridevirtual
Transparency KCalendarCore::Event::transparency ( ) const

Returns the event's time transparency level.

Incidence::IncidenceType Event::type ( ) const
overridevirtual

IncidenceBase::type()

Implements KCalendarCore::IncidenceBase.

Definition at line 93 of file event.cpp.

QByteArray Event::typeStr ( ) const
overridevirtual

IncidenceBase::typeStr()

Implements KCalendarCore::IncidenceBase.

Definition at line 98 of file event.cpp.

void Event::virtual_hook ( VirtualHook  id,
void *  data 
)
overrideprotectedvirtual

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Dec 3 2020 22:51:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.