KCalCore Library
KCalCore::Event Class Reference
This class provides an Event in the sense of RFC2445. More...
#include <event.h>

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
Member Typedef Documentation
typedef QVector<Ptr> KCalCore::Event::List |
typedef QSharedPointer<Event> KCalCore::Event::Ptr |
A shared pointer to an Event object.
Reimplemented from KCalCore::Incidence.
Member Enumeration Documentation
Constructor & Destructor Documentation
Event::Event | ( | ) |
Event::Event | ( | const Event & | other | ) |
Member Function Documentation
IncidenceBase & Event::assign | ( | const IncidenceBase & | other | ) | [protected, virtual] |
Provides polymorfic assignment.
- Parameters:
-
other is the IncidenceBase to assign.
Reimplemented from KCalCore::Incidence.
Event * Event::clone | ( | ) | const [virtual] |
Returns an exact copy of this Event.
The caller owns the returned object.
Implements KCalCore::Incidence.
QDate Event::dateEnd | ( | ) | const |
KDateTime Event::dateTime | ( | DateTimeRole | role | ) | const [virtual] |
Returns a date/time corresponding to the specified DateTimeRole.
- Parameters:
-
role is a DateTimeRole.
Implements KCalCore::IncidenceBase.
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().
bool Event::equals | ( | const IncidenceBase & | event | ) | const [protected, virtual] |
Compares two events for equality.
- Parameters:
-
event is the event to compare.
Reimplemented from KCalCore::Incidence.
QLatin1String Event::eventMimeType | ( | ) | [static] |
Returns the Akonadi specific sub MIME type of a KCalCore::Event.
bool Event::hasEndDate | ( | ) | const |
QLatin1String Event::iconName | ( | const KDateTime & | recurrenceId = KDateTime() | ) | const [virtual] |
Implements KCalCore::Incidence.
bool Event::isMultiDay | ( | const KDateTime::Spec & | spec = KDateTime::Spec() | ) | const |
QLatin1String KCalCore::Event::mimeType | ( | ) | const [virtual] |
Returns the Akonadi specific sub MIME type of a KCalCore::IncidenceBase item, e.g.
getting "application/x-vnd.akonadi.calendar.event" for a KCalCore::Event.
Implements KCalCore::IncidenceBase.
void Event::setAllDay | ( | bool | allDay | ) |
Sets whether the incidence is all-day, i.e.
has a date but no time attached to it.
- Parameters:
-
allDay sets whether the incidence is all-day.
- See also:
- allDay()
Reimplemented from KCalCore::Incidence.
void Event::setDateTime | ( | const KDateTime & | dateTime, |
DateTimeRole | role | ||
) | [virtual] |
Sets the date/time corresponding to the specified DateTimeRole.
- Parameters:
-
dateTime is KDateTime value to set. role is a DateTimeRole.
Implements KCalCore::IncidenceBase.
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:
-
dtEnd is a KDateTime specifying when the event ends.
void Event::setDtStart | ( | const KDateTime & | dt | ) | [virtual] |
Sets the incidence starting date/time.
- Parameters:
-
dt is the starting date/time.
- See also:
- IncidenceBase::dtStart().
Reimplemented from KCalCore::Incidence.
void Event::setDuration | ( | const Duration & | duration | ) | [virtual] |
Sets the duration of this event.
- Parameters:
-
duration is the event Duration.
Reimplemented from KCalCore::IncidenceBase.
void Event::setHasEndDate | ( | bool | b | ) |
void Event::setTransparency | ( | Event::Transparency | transparency | ) |
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:
-
oldSpec the time specification which provides the clock times newSpec the new time specification
Reimplemented from KCalCore::Incidence.
Event::Transparency Event::transparency | ( | ) | const |
Incidence::IncidenceType Event::type | ( | ) | const [virtual] |
Returns the incidence type.
Implements KCalCore::IncidenceBase.
QByteArray Event::typeStr | ( | ) | const [virtual] |
Prints the type of incidence as a string.
Implements KCalCore::IncidenceBase.
void Event::virtual_hook | ( | int | id, |
void * | data | ||
) | [protected, virtual] |
Standard trick to add virtuals later.
- Parameters:
-
id is any integer unique to this class which we will use to identify the method to be called. data is a pointer to some glob of data, typically a struct.
Implements KCalCore::IncidenceBase.
The documentation for this class was generated from the following files: