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

KCal Library

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

#include <event.h>

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

Public Types

typedef boost::shared_ptr
< const Event > 
ConstPtr
 
typedef ListBase< Event > List
 
typedef boost::shared_ptr< Event > Ptr
 
enum  Transparency { Opaque, Transparent }
 
- Public Types inherited from KCal::Incidence
typedef boost::shared_ptr
< const Incidence > 
ConstPtr
 
typedef ListBase< Incidence > List
 
typedef boost::shared_ptr
< Incidence > 
Ptr
 
enum  Secrecy { SecrecyPublic =0, SecrecyPrivate =1, SecrecyConfidential =2 }
 
enum  Status {
  StatusNone, StatusTentative, StatusConfirmed, StatusCompleted,
  StatusNeedsAction, StatusCanceled, StatusInProcess, StatusDraft,
  StatusFinal, StatusX
}
 

Public Member Functions

 Event ()
 
 Event (const Event &other)
 
 ~Event ()
 
Event * clone ()
 
QDate dateEnd () const
 
virtual KDateTime dtEnd () const
 
KCAL_DEPRECATED QString dtEndDateStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
KCAL_DEPRECATED QString dtEndStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
KCAL_DEPRECATED QString dtEndTimeStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
bool hasEndDate () const
 
bool isMultiDay (const KDateTime::Spec &spec=KDateTime::Spec()) const
 
Event & operator= (const Event &other)
 
bool operator== (const Event &event) const
 
void setDtEnd (const KDateTime &dtEnd)
 
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
 
QByteArray type () const
 
- Public Member Functions inherited from KCal::Incidence
 Incidence ()
 
 Incidence (const Incidence &other)
 
 ~Incidence ()
 
void addAlarm (Alarm *alarm)
 
void addAttachment (Attachment *attachment)
 
void addRelation (Incidence *incidence)
 
const Alarm::List & alarms () 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
 
void deleteAttachment (Attachment *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 hasGeo () const
 
bool isAlarmEnabled () const
 
QString location () const
 
bool locationIsRich () const
 
Alarm * newAlarm ()
 
Incidence & operator= (const Incidence &other)
 
bool operator== (const Incidence &incidence) const
 
int priority () const
 
void recreate ()
 
Recurrence * recurrence () 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
 
Incidence * relatedTo () const
 
QString relatedToUid () const
 
Incidence::List relations () const
 
void removeAlarm (Alarm *alarm)
 
void removeRelation (Incidence *incidence)
 
QStringList resources () const
 
int revision () const
 
QString richDescription () const
 
QString richLocation () const
 
QString richSummary () const
 
QString schedulingID () const
 
Secrecy secrecy () const
 
QString secrecyStr () const
 
void setAllDay (bool allDay)
 
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)
 
virtual void setDtStart (const KDateTime &dt)
 
void setGeoLatitude (float geolatitude)
 
void setGeoLongitude (float geolongitude)
 
void setHasGeo (bool hasGeo)
 
void setLocation (const QString &location, bool isRich)
 
void setLocation (const QString &location)
 
void setPriority (int priority)
 
void setReadOnly (bool readonly)
 
void setRelatedTo (Incidence *incidence)
 
void setRelatedToUid (const QString &uid)
 
void setResources (const QStringList &resources)
 
void setRevision (int rev)
 
void setSchedulingID (const QString &sid)
 
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 statusStr () const
 
QString summary () const
 
bool summaryIsRich () const
 
QString writeAttachmentToTempFile (Attachment *attachment) const
 
- Public Member Functions inherited from KCal::IncidenceBase
 IncidenceBase ()
 
 IncidenceBase (const IncidenceBase &ib)
 
virtual ~IncidenceBase ()
 
void addAttendee (Attendee *attendee, bool doUpdate=true)
 
void addComment (const QString &comment)
 
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
 
const Attendee::List & attendees () const
 
void clearAttendees ()
 
void clearComments ()
 
QStringList comments () const
 
virtual KDateTime dtStart () const
 
virtual KCAL_DEPRECATED QString dtStartDateStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
virtual KCAL_DEPRECATED QString dtStartStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
virtual KCAL_DEPRECATED QString dtStartTimeStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
 
Duration duration () const
 
void endUpdates ()
 
bool hasDuration () const
 
bool isReadOnly () const
 
KDateTime lastModified () const
 
IncidenceBase & operator= (const IncidenceBase &other)
 
bool operator== (const IncidenceBase &ib) const
 
Person organizer () const
 
void registerObserver (IncidenceObserver *observer)
 
bool removeComment (const QString &comment)
 
void setAllDay (bool allDay)
 
void setHasDuration (bool hasDuration)
 
void setLastModified (const KDateTime &lm)
 
void setOrganizer (const Person &organizer)
 
void setOrganizer (const QString &organizer)
 
void setUid (const QString &uid)
 
void startUpdates ()
 
QString uid () const
 
void unRegisterObserver (IncidenceObserver *observer)
 
void updated ()
 
KUrl uri () const
 
- Public Member Functions inherited from KCal::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
 
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)
 

Protected Member Functions

virtual KDateTime endDateRecurrenceBase () const
 
- Protected Member Functions inherited from KCal::IncidenceBase
virtual void customPropertyUpdated ()
 

Additional Inherited Members

- Static Public Member Functions inherited from KCal::Incidence
static QStringList secrecyList ()
 
static QString secrecyName (Secrecy secrecy)
 
static QString statusName (Status status)
 
- Static Public Member Functions inherited from KCal::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 
- Protected Attributes inherited from KCal::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 boost::shared_ptr<const Event> KCal::Event::ConstPtr

A shared pointer to a non-mutable Event.

Definition at line 65 of file event.h.

typedef ListBase<Event> KCal::Event::List

List of events.

Definition at line 55 of file event.h.

typedef boost::shared_ptr<Event> KCal::Event::Ptr

A shared pointer to an Event object.

Definition at line 60 of file event.h.

Member Enumeration Documentation

enum KCal::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 67 of file event.cpp.

Event::Event ( const Event &  other)

Copy constructor.

Parameters
otheris the event to copy.

Definition at line 72 of file event.cpp.

Event::~Event ( )

Destroys the event.

Definition at line 77 of file event.cpp.

Member Function Documentation

Event * Event::clone ( )
virtual

IncidenceBase::typeStr() Returns an exact copy of this Event. The caller owns the returned object.

Implements KCal::Incidence.

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

KDateTime Event::dtEnd ( ) const
virtual

Returns the event end date and time.

See also
setDtEnd().

Reimplemented from KCal::Incidence.

Definition at line 132 of file event.cpp.

QString Event::dtEndDateStr ( bool  shortfmt = true,
const KDateTime::Spec &  spec = KDateTime::Spec() 
) const

Returns the event end date as a string formatted according to the user's locale settings.

Parameters
shortfmtIf set, use short date format; else use long format.
specIf set, return the date in the given spec, else use the event's current spec.
Deprecated:
use IncidenceFormatter::dateToString()

Definition at line 179 of file event.cpp.

QString Event::dtEndStr ( bool  shortfmt = true,
const KDateTime::Spec &  spec = KDateTime::Spec() 
) const

Returns the event end date/time as string formatted according to the user's locale settings.

Parameters
shortfmtIf set, use short date format; else use long format.
specIf set, return the date/time in the given spec, else use the event's current spec.
Deprecated:
use IncidenceFormatter::dateTimeToString()

Definition at line 198 of file event.cpp.

QString Event::dtEndTimeStr ( bool  shortfmt = true,
const KDateTime::Spec &  spec = KDateTime::Spec() 
) const

Returns the event end time as a string formatted according to the user's locale settings.

Parameters
shortfmtIf set, use short date format; else use long format.
specIf set, return the time in the given spec, else use the event's current spec.
Deprecated:
use IncidenceFormatter::timeToString()

Definition at line 163 of file event.cpp.

KDateTime Event::endDateRecurrenceBase ( ) const
protectedvirtual

Returns the end date/time of the base incidence.

Reimplemented from KCal::Incidence.

Definition at line 281 of file event.cpp.

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

Definition at line 226 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.

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

Event & Event::operator= ( const Event &  other)

Assignment operator.

Parameters
otheris the event to assign.

Definition at line 87 of file event.cpp.

bool Event::operator== ( const Event &  event) const

Compares two events for equality.

Parameters
eventis the event to compare.

Definition at line 99 of file event.cpp.

void Event::setDtEnd ( const KDateTime &  dtEnd)

Sets the event end date and time.

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

Definition at line 119 of file event.cpp.

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

Sets the duration of this event.

Parameters
durationis the event Duration.

Reimplemented from KCal::IncidenceBase.

Definition at line 275 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 221 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 261 of file event.cpp.

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

IncidenceBase::shiftTimes()

Reimplemented from KCal::Incidence.

Definition at line 251 of file event.cpp.

Event::Transparency Event::transparency ( ) const

Returns the event's time transparency level.

Definition at line 270 of file event.cpp.

QByteArray Event::type ( ) const
virtual

IncidenceBase::type()

Implements KCal::IncidenceBase.

Definition at line 108 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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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