• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCal Library

  • KCal
  • Event
Public Types | Public Member Functions | Protected Member Functions
KCal::Event Class Reference

This class provides an Event in the sense of RFC2445. More...

#include <event.h>

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

List of all members.

Public Types

typedef boost::shared_ptr
< const Event > 
ConstPtr
typedef ListBase< Event > List
typedef boost::shared_ptr< Event > Ptr
enum  Transparency { Opaque, Transparent }

Public Member Functions

 Event ()
 Event (const Event &other)
 ~Event ()
Event * clone ()
QDate dateEnd () const
virtual KDateTime dtEnd () const
QString dtEndDateStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
QString dtEndStr (bool shortfmt=true, const KDateTime::Spec &spec=KDateTime::Spec()) const
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

Protected Member Functions

virtual KDateTime endDateRecurrenceBase () const

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.

Reimplemented from KCal::Incidence.

Definition at line 65 of file event.h.

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

List of events.

Reimplemented from KCal::Incidence.

Definition at line 55 of file event.h.

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

A shared pointer to an Event object.

Reimplemented from KCal::Incidence.

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

Event::Event ( const Event &  other)

Copy constructor.

Parameters:
otheris the event to copy.

Definition at line 71 of file event.cpp.

Event::~Event ( )

Destroys the event.

Definition at line 76 of file event.cpp.


Member Function Documentation

Event * Event::clone ( ) [virtual]

Returns an exact copy of this Event.

The caller owns the returned object.

Implements KCal::Incidence.

Definition at line 81 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 152 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 131 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 178 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 197 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 162 of file event.cpp.

KDateTime Event::endDateRecurrenceBase ( ) const [protected, virtual]

Returns the end date/time of the base incidence.

Reimplemented from KCal::Incidence.

Definition at line 280 of file event.cpp.

bool Event::hasEndDate ( ) const

Returns whether the event has an end date/time.

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

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

Assignment operator.

Parameters:
otheris the event to assign.

Definition at line 86 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 98 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 118 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 274 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 220 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 260 of file event.cpp.

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

Shift the times of the incidence so that they appear at the same clock time as before but in a new time zone.

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 KCal::Incidence.

Definition at line 250 of file event.cpp.

Event::Transparency Event::transparency ( ) const

Returns the event's time transparency level.

Definition at line 269 of file event.cpp.

QByteArray Event::type ( ) const [virtual]

Prints the type of Incidence as a string.

Implements KCal::IncidenceBase.

Definition at line 107 of file event.cpp.


The documentation for this class was generated from the following files:
  • event.h
  • event.cpp

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • 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
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal