KCalendarCore::Event

Search for usage in LXR

#include <event.h>

Inheritance diagram for KCalendarCore::Event:

Public Types

typedef QList< PtrList
 
typedef QSharedPointer< EventPtr
 
enum  Transparency { Opaque , Transparent }
 
- Public Types inherited from KCalendarCore::Incidence
typedef QList< 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
QList< KCalendarCore::Attachmentattachments
 
QStringList categories
 
QList< KCalendarCore::Conferenceconferences
 
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
 
QList< KCalendarCore::Attendeeattendees
 
QDateTime dtStart
 
QDateTime lastModified
 
KCalendarCore::Person organizer
 
QString uid
 
QUrl url
 

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 (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 ()
 
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 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 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
 
bool thisAndFuture () const
 
- Public Member Functions inherited from KCalendarCore::IncidenceBase
KCALENDARCORE_NO_EXPORT IncidenceBase (IncidenceBasePrivate *p)
 
 ~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 &)=delete
 
 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 &)=delete
 
KCALENDARCORE_NO_EXPORT IncidenceBase (const IncidenceBase &ib, IncidenceBasePrivate *p)
 
void customPropertyUpdate () override
 
void customPropertyUpdated () override
 
void setFieldDirty (IncidenceBase::Field field)
 
- Protected Member Functions inherited from KCalendarCore::CustomProperties

Additional Inherited Members

- Protected Types inherited from KCalendarCore::IncidenceBase
enum  VirtualHook
 
- Protected Attributes inherited from KCalendarCore::IncidenceBase
IncidenceBasePrivate *const d_ptr
 
bool mReadOnly
 

Detailed Description

This class provides an Event in the sense of RFC2445.

Definition at line 32 of file event.h.

Member Typedef Documentation

◆ List

List of events.

Definition at line 55 of file event.h.

◆ Ptr

A shared pointer to an Event object.

Definition at line 50 of file event.h.

Member Enumeration Documentation

◆ Transparency

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 41 of file event.h.

Property Documentation

◆ dtEnd

QDateTime KCalendarCore::Event::dtEnd
readwrite

Definition at line 35 of file event.h.

◆ transparency

KCalendarCore::Event::Transparency KCalendarCore::Event::transparency
readwrite

Definition at line 36 of file event.h.

Constructor & Destructor Documentation

◆ Event() [1/3]

Event::Event ( )

Constructs an event.

Private class that helps to provide binary compatibility between releases.

Definition at line 65 of file event.cpp.

◆ Event() [2/3]

Event::Event ( const Event & other)

Copy constructor.

Parameters
otheris the event to copy.

Definition at line 70 of file event.cpp.

◆ Event() [3/3]

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 75 of file event.cpp.

◆ ~Event()

Event::~Event ( )
overridedefault

Destroys the event.

Member Function Documentation

◆ assign()

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

IncidenceBase::assign()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 87 of file event.cpp.

◆ clone()

Event * Event::clone ( ) const
overridevirtual

Returns an exact copy of this Event.

The caller owns the returned object.

Implements KCalendarCore::Incidence.

Definition at line 82 of file event.cpp.

◆ dateEnd()

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 168 of file event.cpp.

◆ dateTime()

QDateTime Event::dateTime ( DateTimeRole role) const
overridevirtual

IncidenceBase::dateTime()

Implements KCalendarCore::IncidenceBase.

Definition at line 276 of file event.cpp.

◆ dtEnd()

QDateTime 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().

Definition at line 146 of file event.cpp.

◆ equals()

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 101 of file event.cpp.

◆ eventMimeType()

QLatin1String Event::eventMimeType ( )
static

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

Definition at line 335 of file event.cpp.

◆ hasEndDate()

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

Definition at line 178 of file event.cpp.

◆ iconName()

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

Incidence::iconName()

Implements KCalendarCore::Incidence.

Definition at line 340 of file event.cpp.

◆ isMultiDay()

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 184 of file event.cpp.

◆ mimeType()

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

IncidenceBase::mimeType()

Implements KCalendarCore::IncidenceBase.

Definition at line 330 of file event.cpp.

◆ setAllDay()

void Event::setAllDay ( bool allDay)
overridevirtual

IncidenceBase::setAllDay().

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 261 of file event.cpp.

◆ setDateTime()

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

◆ setDtEnd()

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 129 of file event.cpp.

◆ setDtStart()

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 122 of file event.cpp.

◆ setDuration()

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 254 of file event.cpp.

◆ setTransparency()

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

Sets the event's time transparency level.

Parameters
transparencyis the event Transparency level.

Definition at line 236 of file event.cpp.

◆ shiftTimes()

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

IncidenceBase::shiftTimes()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 223 of file event.cpp.

◆ supportsGroupwareCommunication()

bool Event::supportsGroupwareCommunication ( ) const
overridevirtual

◆ transparency()

Event::Transparency Event::transparency ( ) const

Returns the event's time transparency level.

Definition at line 248 of file event.cpp.

◆ type()

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

IncidenceBase::type()

Implements KCalendarCore::IncidenceBase.

Definition at line 112 of file event.cpp.

◆ typeStr()

QByteArray Event::typeStr ( ) const
overridevirtual

IncidenceBase::typeStr()

Implements KCalendarCore::IncidenceBase.

Definition at line 117 of file event.cpp.

◆ virtual_hook()

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-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:07:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.