• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.9.5 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
}
enum  IncidenceType {
  TypeEvent = 0, TypeTodo, TypeJournal, TypeFreeBusy,
  TypeUnknown
}
typedef QSharedPointer
< IncidenceBase > 
Ptr

Public Member Functions

 Event ()
 Event (const Event &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)
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
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 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)
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
QString writeAttachmentToTempFile (const Attachment::Ptr &attachment) const
- Public Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase ()
virtual ~IncidenceBase ()
virtual bool accept (Visitor &v, IncidenceBase::Ptr incidence)
void addAttendee (const Attendee::Ptr &attendee, bool doUpdate=true)
void addComment (const QString &comment)
void addContact (const QString &contact)
bool allDay () const
Attendee::Ptr attendeeByMail (const QString &email) const
Attendee::Ptr attendeeByMails (const QStringList &emails, const QString &email=QString()) const
Attendee::Ptr attendeeByUid (const QString &uid) const
int attendeeCount () const
Attendee::List attendees () const
void clearAttendees ()
void clearComments ()
void clearContacts ()
QStringList comments () const
QStringList contacts () const
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 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 startUpdates ()
QString uid () const
void unRegisterObserver (IncidenceObserver *observer)
void update ()
void updated ()
KUrl uri () const
- Public Member Functions inherited from KCalCore::CustomProperties
 CustomProperties ()
 CustomProperties (const CustomProperties &other)
virtual ~CustomProperties ()
QMap< QByteArray, QString > customProperties () const
QString customProperty (const QByteArray &app, const QByteArray &key) const
QString nonKDECustomProperty (const QByteArray &name) const
QString nonKDECustomPropertyParameters (const QByteArray &name) const
CustomProperties & operator= (const CustomProperties &other)
bool operator== (const CustomProperties &properties) const
void removeCustomProperty (const QByteArray &app, const QByteArray &key)
void removeNonKDECustomProperty (const QByteArray &name)
void setCustomProperties (const QMap< QByteArray, QString > &properties)
void setCustomProperty (const QByteArray &app, const QByteArray &key, const QString &value)
void setNonKDECustomProperty (const QByteArray &name, const QString &value, const QString &parameters=QString())
- Public Member Functions inherited from KCalCore::Recurrence::RecurrenceObserver
virtual void recurrenceUpdated (Recurrence *r)=0

Static Public Member Functions

static QLatin1String eventMimeType ()

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

Event::Event ( const Event &  other)

Copy constructor.

Parameters
otheris the event to copy.

Definition at line 74 of file event.cpp.

Event::~Event ( )

Destroys the event.

Definition at line 79 of file event.cpp.

Member Function Documentation

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

Parameters
otheris the IncidenceBase to assign.

Reimplemented from KCalCore::Incidence.

Definition at line 89 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 84 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 167 of file event.cpp.

KDateTime Event::dateTime ( DateTimeRole  role) const
virtual

Parameters
roleis a DateTimeRole.

Implements KCalCore::IncidenceBase.

Definition at line 268 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 146 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 99 of file event.cpp.

QLatin1String Event::eventMimeType ( )
static

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

Definition at line 327 of file event.cpp.

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

Definition at line 183 of file event.cpp.

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

Implements KCalCore::Incidence.

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

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

getting "application/x-vnd.akonadi.calendar.event" for a KCalCore::Event.

Implements KCalCore::IncidenceBase.

Definition at line 322 of file event.cpp.

void Event::setAllDay ( bool  allDay)

has a date but no time attached to it.

Parameters
allDaysets whether the incidence is all-day.
See Also
allDay()
.

Reimplemented from KCalCore::Incidence.

Definition at line 255 of file event.cpp.

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

Parameters
dateTimeis KDateTime value to set.
roleis a DateTimeRole.

Implements KCalCore::IncidenceBase.

Definition at line 300 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 130 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 124 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 249 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.

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

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

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

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

Reimplemented from KCalCore::Incidence.

Definition at line 223 of file event.cpp.

Event::Transparency Event::transparency ( ) const

Returns the event's time transparency level.

Definition at line 244 of file event.cpp.

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

Implements KCalCore::IncidenceBase.

Definition at line 114 of file event.cpp.

QByteArray Event::typeStr ( ) const
virtual

Implements KCalCore::IncidenceBase.

Definition at line 119 of file event.cpp.

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

Parameters
idis any integer unique to this class which we will use to identify the method to be called.
datais a pointer to some glob of data, typically a struct.

Implements KCalCore::IncidenceBase.

Definition at line 315 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-2013 The KDE developers.
Generated on Sat Jan 5 2013 19:43:56 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

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

kdepimlibs-4.9.5 API Reference

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

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