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

KCalCore Library

  • KCalCore
  • Event
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KCalCore::Event Class Reference

#include <event.h>

Inheritance diagram for KCalCore::Event:
Inheritance graph
[legend]

Public Types

typedef QVector< Ptr > List
 
typedef QSharedPointer< Event > Ptr
 
enum  Transparency { Opaque, Transparent }
 
- Public Types inherited from KCalCore::Incidence
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,
  FieldUrl
}
 
enum  IncidenceType {
  TypeEvent = 0, TypeTodo, TypeJournal, TypeFreeBusy,
  TypeUnknown
}
 
typedef QSharedPointer
< IncidenceBase > 
Ptr
 

Public Member Functions

 Event ()
 
 Event (const Event &other)
 
 Event (const Incidence &other)
 
 ~Event ()
 
Event * clone () const
 
QDate dateEnd () const
 
KDateTime dateTime (DateTimeRole role) const
 
virtual KDateTime dtEnd () const
 
bool hasEndDate () const
 
QLatin1String iconName (const KDateTime &recurrenceId=KDateTime()) const
 
bool isMultiDay (const KDateTime::Spec &spec=KDateTime::Spec()) const
 
QLatin1String mimeType () const
 
void setAllDay (bool allDay)
 
void setDateTime (const KDateTime &dateTime, DateTimeRole role)
 
void setDtEnd (const KDateTime &dtEnd)
 
virtual void setDtStart (const KDateTime &dt)
 
void setDuration (const Duration &duration)
 
KCALCORE_DEPRECATED void setHasEndDate (bool b)
 
void setTransparency (Transparency transparency)
 
virtual void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
Transparency transparency () const
 
IncidenceType type () const
 
QByteArray typeStr () const
 
- Public Member Functions inherited from KCalCore::Incidence
 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 ()
 
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
 
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)
 
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 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 ()
 
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
 
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
 
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)
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
void setHasDuration (bool hasDuration)
 
void setOrganizer (const Person::Ptr &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 ()
 
KUrl uri () const
 
QUrl url () 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())
 

Static Public Member Functions

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

Protected Member Functions

virtual IncidenceBase & assign (const IncidenceBase &other)
 
virtual bool equals (const IncidenceBase &event) const
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KCalCore::Incidence
 Incidence (const Incidence &other)
 
void deserialize (QDataStream &in)
 
void serialize (QDataStream &out)
 
- Protected Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase (const IncidenceBase &ib)
 
virtual void customPropertyUpdate ()
 
virtual void customPropertyUpdated ()
 
void setFieldDirty (IncidenceBase::Field field)
 

Additional Inherited Members

- Protected Types inherited from KCalCore::IncidenceBase
enum  VirtualHook { SerializerHook, DeserializerHook }
 
- Protected Attributes inherited from KCalCore::IncidenceBase
bool mReadOnly
 

Detailed Description

This class provides an Event in the sense of RFC2445.

Definition at line 41 of file event.h.

Member Typedef Documentation

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

List of events.

Definition at line 60 of file event.h.

typedef QSharedPointer<Event> KCalCore::Event::Ptr

A shared pointer to an Event object.

Definition at line 55 of file event.h.

Member Enumeration Documentation

enum KCalCore::Event::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 47 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 71 of file event.cpp.

Event::Event ( const Event &  other)

Copy constructor.

Parameters
otheris the event to copy.

Definition at line 76 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 81 of file event.cpp.

Event::~Event ( )

Destroys the event.

Definition at line 87 of file event.cpp.

Member Function Documentation

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

IncidenceBase::assign()

Reimplemented from KCalCore::Incidence.

Definition at line 97 of file event.cpp.

Event * Event::clone ( ) const
virtual

Returns an exact copy of this Event.

The caller owns the returned object.

Implements KCalCore::Incidence.

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

KDateTime Event::dateTime ( DateTimeRole  role) const
virtual

IncidenceBase::dateTime()

Implements KCalCore::IncidenceBase.

Definition at line 278 of file event.cpp.

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

bool Event::equals ( const IncidenceBase &  event) const
protectedvirtual

Compares two events for equality.

Parameters
eventis the event to compare.

Reimplemented from KCalCore::Incidence.

Definition at line 107 of file event.cpp.

QLatin1String Event::eventMimeType ( )
static

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

Definition at line 348 of file event.cpp.

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

Definition at line 193 of file event.cpp.

QLatin1String Event::iconName ( const KDateTime &  recurrenceId = KDateTime()) const
virtual

Incidence::iconName()

Implements KCalCore::Incidence.

Definition at line 353 of file event.cpp.

bool Event::isMultiDay ( const KDateTime::Spec &  spec = KDateTime::Spec()) 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
specIf set, looks if the event is multiday for the given spec. If not set, looks if event this multiday for its spec.

Definition at line 198 of file event.cpp.

QLatin1String KCalCore::Event::mimeType ( ) const
virtual

IncidenceBase::mimeType()

Implements KCalCore::IncidenceBase.

Definition at line 343 of file event.cpp.

void Event::setAllDay ( bool  allDay)

IncidenceBase::setAllDay().

Definition at line 265 of file event.cpp.

void Event::setDateTime ( const KDateTime &  dateTime,
DateTimeRole  role 
)
virtual

IncidenceBase::setDateTime()

Implements KCalCore::IncidenceBase.

Definition at line 310 of file event.cpp.

void Event::setDtEnd ( const KDateTime &  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 KDateTime specifying when the event ends.
See also
dtEnd(), dateEnd().

Definition at line 138 of file event.cpp.

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

Sets the incidence starting date/time.

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

Reimplemented from KCalCore::Incidence.

Definition at line 132 of file event.cpp.

void Event::setDuration ( const Duration &  duration)
virtual

Sets the duration of this event.

Parameters
durationis the event Duration.

Reimplemented from KCalCore::IncidenceBase.

Definition at line 259 of file event.cpp.

void Event::setHasEndDate ( bool  b)

Sets whether the event has an end date/time.

Parameters
bIf set, indicates the event has an end date.
Deprecated:
Use setDtEnd( KDateTime() ) instead of setHasEndDate( false )

Definition at line 187 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 243 of file event.cpp.

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

IncidenceBase::shiftTimes()

Reimplemented from KCalCore::Incidence.

Definition at line 233 of file event.cpp.

Event::Transparency Event::transparency ( ) const

Returns the event's time transparency level.

Definition at line 254 of file event.cpp.

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

IncidenceBase::type()

Implements KCalCore::IncidenceBase.

Definition at line 122 of file event.cpp.

QByteArray Event::typeStr ( ) const
virtual

IncidenceBase::typeStr()

Implements KCalCore::IncidenceBase.

Definition at line 127 of file event.cpp.

void Event::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

IncidenceBase::virtual_hook()

Implements KCalCore::IncidenceBase.

Definition at line 329 of file event.cpp.


The documentation for this class was generated from the following files:
  • event.h
  • event.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:36:53 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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