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

KCalCore Library

  • KCalCore
  • Event
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
KCalCore::Event Class Reference

#include <event.h>

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

List of all members.

Public Types

typedef QVector< Ptr > List
typedef QSharedPointer< Event > Ptr
enum  Transparency { Opaque, Transparent }

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

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)

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.

Reimplemented from KCalCore::Incidence.

Definition at line 60 of file event.h.

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

A shared pointer to an Event object.

Reimplemented from KCalCore::Incidence.

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) [protected, virtual]

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 [protected, virtual]

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 318 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 323 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 313 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 
) [protected, virtual]

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 306 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-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:22 by doxygen 1.8.0 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.8.3 API Reference

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