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

KCalCore Library

  • KCalCore
  • FreeBusy
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
KCalCore::FreeBusy Class Reference

#include <freebusy.h>

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

Public Types

typedef QVector< Ptr > List
 
typedef QSharedPointer< FreeBusy > Ptr
 
- 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,
  FieldUrl
}
 
enum  IncidenceType {
  TypeEvent = 0, TypeTodo, TypeJournal, TypeFreeBusy,
  TypeUnknown
}
 
typedef QSharedPointer
< IncidenceBase > 
Ptr
 

Public Member Functions

 FreeBusy ()
 
 FreeBusy (const FreeBusy &other)
 
 FreeBusy (const Period::List &busyPeriods)
 
 FreeBusy (const FreeBusyPeriod::List &busyPeriods)
 
 FreeBusy (const KDateTime &start, const KDateTime &end)
 
 FreeBusy (const Event::List &events, const KDateTime &start, const KDateTime &end)
 
 ~FreeBusy ()
 
void addPeriod (const KDateTime &start, const KDateTime &end)
 
void addPeriod (const KDateTime &start, const Duration &duration)
 
void addPeriods (const Period::List &list)
 
void addPeriods (const FreeBusyPeriod::List &list)
 
Period::List busyPeriods () const
 
KDateTime dateTime (DateTimeRole role) const
 
virtual KDateTime dtEnd () const
 
FreeBusyPeriod::List fullBusyPeriods () const
 
void merge (FreeBusy::Ptr freebusy)
 
QLatin1String mimeType () const
 
void setDateTime (const KDateTime &dateTime, DateTimeRole role)
 
void setDtEnd (const KDateTime &end)
 
virtual void setDtStart (const KDateTime &start)
 
virtual void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
void sortList ()
 
IncidenceType type () const
 
QByteArray typeStr () const
 
- Public Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase ()
 
virtual ~IncidenceBase ()
 
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
 
virtual KDateTime recurrenceId () const
 
void registerObserver (IncidenceObserver *observer)
 
bool removeComment (const QString &comment)
 
bool removeContact (const QString &contact)
 
void resetDirtyFields ()
 
void setAllDay (bool allDay)
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
virtual void setDuration (const Duration &duration)
 
void setHasDuration (bool hasDuration)
 
virtual void setLastModified (const KDateTime &lm)
 
void setOrganizer (const Person::Ptr &organizer)
 
void setOrganizer (const QString &organizer)
 
virtual void setReadOnly (bool readOnly)
 
void setUid (const QString &uid)
 
void setUrl (const QUrl &url)
 
void startUpdates ()
 
QString uid () const
 
void unRegisterObserver (IncidenceObserver *observer)
 
void update ()
 
void updated ()
 
KUrl uri () const
 
QUrl url () 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())
 

Static Public Member Functions

static QLatin1String freeBusyMimeType ()
 
- Static Public Member Functions inherited from KCalCore::IncidenceBase
static quint32 magicSerializationIdentifier ()
 
- Static Public Member Functions inherited from KCalCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Protected Member Functions

virtual IncidenceBase & assign (const IncidenceBase &other)
 
virtual bool equals (const IncidenceBase &freebusy) const
 
virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KCalCore::IncidenceBase
 IncidenceBase (const IncidenceBase &ib)
 
virtual void customPropertyUpdate ()
 
virtual void customPropertyUpdated ()
 
void setFieldDirty (IncidenceBase::Field field)
 

Friends

KCALCORE_EXPORT QDataStream & operator<< (QDataStream &s, const KCalCore::FreeBusy::Ptr &freebusy)
 
KCALCORE_EXPORT QDataStream & operator>> (QDataStream &s, KCalCore::FreeBusy::Ptr &freebusy)
 

Additional Inherited Members

- Protected Types inherited from KCalCore::IncidenceBase
enum  VirtualHook { SerializerHook, DeserializerHook }
 
- Protected Attributes inherited from KCalCore::IncidenceBase
bool mReadOnly
 

Detailed Description

Provides information about the free/busy time of a calendar.

A free/busy is a collection of Periods (

See also
Period).

Definition at line 52 of file freebusy.h.

Member Typedef Documentation

typedef QVector<Ptr> KCalCore::FreeBusy::List

List of FreeBusy objects.

Definition at line 69 of file freebusy.h.

typedef QSharedPointer<FreeBusy> KCalCore::FreeBusy::Ptr

A shared pointer to a FreeBusy object.

Definition at line 64 of file freebusy.h.

Constructor & Destructor Documentation

FreeBusy::FreeBusy ( )

Constructs an free/busy without any periods.

Definition at line 78 of file freebusy.cpp.

FreeBusy::FreeBusy ( const FreeBusy &  other)

Copy constructor.

Parameters
otheris the free/busy to copy.

Definition at line 83 of file freebusy.cpp.

FreeBusy::FreeBusy ( const Period::List &  busyPeriods)
explicit

Constructs a free/busy from a list of periods.

Parameters
busyPeriodsis a list of periods.

Definition at line 191 of file freebusy.cpp.

FreeBusy::FreeBusy ( const FreeBusyPeriod::List &  busyPeriods)
explicit

Constructs a free/busy from a list of periods.

Parameters
busyPeriodsis a list of periods.

Definition at line 197 of file freebusy.cpp.

FreeBusy::FreeBusy ( const KDateTime &  start,
const KDateTime &  end 
)

Constructs a free/busy from a single period.

Parameters
startis the start date/time of the period.
endis the end date/time of the period.

Definition at line 89 of file freebusy.cpp.

FreeBusy::FreeBusy ( const Event::List &  events,
const KDateTime &  start,
const KDateTime &  end 
)

Constructs a freebusy for a specified list of events given a single period.

Parameters
eventslist of events.
startis the start date/time of the period.
endis the end date/time of the period.

Definition at line 96 of file freebusy.cpp.

FreeBusy::~FreeBusy ( )

Destroys a free/busy.

Definition at line 202 of file freebusy.cpp.

Member Function Documentation

void FreeBusy::addPeriod ( const KDateTime &  start,
const KDateTime &  end 
)

Adds a period to the freebusy list and sorts the list.

Parameters
startis the start datetime of the period.
endis the end datetime of the period.

Definition at line 269 of file freebusy.cpp.

void FreeBusy::addPeriod ( const KDateTime &  start,
const Duration &  duration 
)

Adds a period to the freebusy list and sorts the list.

Parameters
startis the start datetime of the period.
durationis the Duration of the period.

Definition at line 275 of file freebusy.cpp.

void FreeBusy::addPeriods ( const Period::List &  list)

Adds a list of periods to the freebusy object and then sorts that list.

Use this if you are adding many items, instead of the addPeriod method, to avoid sorting repeatedly.

Parameters
listis a list of Period objects.

Definition at line 255 of file freebusy.cpp.

void FreeBusy::addPeriods ( const FreeBusyPeriod::List &  list)

Adds a list of periods to the freebusy object and then sorts that list.

Use this if you are adding many items, instead of the addPeriod method, to avoid sorting repeatedly.

Parameters
listis a list of FreeBusyPeriod objects.

Definition at line 263 of file freebusy.cpp.

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

IncidenceBase::assign()

Reimplemented from KCalCore::IncidenceBase.

Definition at line 312 of file freebusy.cpp.

Period::List FreeBusy::busyPeriods ( ) const

Returns the list of all periods within the free/busy.

Definition at line 233 of file freebusy.cpp.

KDateTime FreeBusy::dateTime ( DateTimeRole  role) const
virtual

IncidenceBase::dateTime()

Implements KCalCore::IncidenceBase.

Definition at line 340 of file freebusy.cpp.

KDateTime FreeBusy::dtEnd ( ) const
virtual

Returns the end datetime for the free/busy.

FIXME: calling addPeriod() does not change mDtEnd. Is that incorrect?

See also
setDtEnd().

Definition at line 228 of file freebusy.cpp.

bool FreeBusy::equals ( const IncidenceBase &  freebusy) const
protectedvirtual

Compare this with freebusy for equality.

Parameters
freebusyis the FreeBusy to compare.

Reimplemented from KCalCore::IncidenceBase.

Definition at line 322 of file freebusy.cpp.

QLatin1String KCalCore::FreeBusy::freeBusyMimeType ( )
static

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

Definition at line 402 of file freebusy.cpp.

FreeBusyPeriod::List FreeBusy::fullBusyPeriods ( ) const

Returns the list of all periods within the free/busy.

Definition at line 244 of file freebusy.cpp.

void FreeBusy::merge ( FreeBusy::Ptr  freebusy)

Merges another free/busy into this free/busy.

Parameters
freebusyis a pointer to a valid FreeBusy object.

Definition at line 281 of file freebusy.cpp.

QLatin1String FreeBusy::mimeType ( ) const
virtual

IncidenceBase::mimeType()

Implements KCalCore::IncidenceBase.

Definition at line 397 of file freebusy.cpp.

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

IncidenceBase::setDateTime()

Implements KCalCore::IncidenceBase.

Definition at line 347 of file freebusy.cpp.

void FreeBusy::setDtEnd ( const KDateTime &  end)

Sets the end datetime for the free/busy.

Note that this datetime may be later or earlier than all periods within the free/busy.

Parameters
endis a KDateTime specifying an end datetime.
See also
dtEnd(), setDtStart().

Definition at line 223 of file freebusy.cpp.

void FreeBusy::setDtStart ( const KDateTime &  start)
virtual

Sets the start date/time for the free/busy.

Note that this date/time may be later or earlier than all periods within the free/busy.

Parameters
startis a KDateTime specifying an start datetime.
See also
IncidenceBase::dtStart(), setDtEnd().

Reimplemented from KCalCore::IncidenceBase.

Definition at line 217 of file freebusy.cpp.

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

IncidenceBase::shiftTimes()

Reimplemented from KCalCore::IncidenceBase.

Definition at line 299 of file freebusy.cpp.

void FreeBusy::sortList ( )

Sorts the list of free/busy periods into ascending order.

Definition at line 249 of file freebusy.cpp.

IncidenceBase::IncidenceType FreeBusy::type ( ) const
virtual

IncidenceBase::type()

Implements KCalCore::IncidenceBase.

Definition at line 207 of file freebusy.cpp.

QByteArray FreeBusy::typeStr ( ) const
virtual

IncidenceBase::typeStr()

Implements KCalCore::IncidenceBase.

Definition at line 212 of file freebusy.cpp.

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

IncidenceBase::virtual_hook()

Implements KCalCore::IncidenceBase.

Definition at line 353 of file freebusy.cpp.

Friends And Related Function Documentation

KCALCORE_EXPORT QDataStream& operator<< ( QDataStream &  s,
const KCalCore::FreeBusy::Ptr &  freebusy 
)
friend

Serializes the freebusy object into the stream.

KCALCORE_EXPORT QDataStream& operator>> ( QDataStream &  s,
KCalCore::FreeBusy::Ptr &  freebusy 
)
friend

Initializes the freebusy object from the stream.


The documentation for this class was generated from the following files:
  • freebusy.h
  • freebusy.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:58 by doxygen 1.8.7 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 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