KCalendarCore::FreeBusy

#include <freebusy.h>

Inheritance diagram for KCalendarCore::FreeBusy:

Public Types

typedef QVector< PtrList
 
typedef QSharedPointer< FreeBusyPtr
 
- Public Types inherited from KCalendarCore::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< IncidenceBasePtr
 

Public Member Functions

 FreeBusy ()
 
 FreeBusy (const FreeBusy &other)
 
 FreeBusy (const Period::List &busyPeriods)
 
 FreeBusy (const FreeBusyPeriod::List &busyPeriods)
 
 FreeBusy (const QDateTime &start, const QDateTime &end)
 
 FreeBusy (const Event::List &events, const QDateTime &start, const QDateTime &end)
 
 ~FreeBusy () override
 
void addPeriod (const QDateTime &start, const QDateTime &end)
 
void addPeriod (const QDateTime &start, const Duration &duration)
 
void addPeriods (const Period::List &list)
 
void addPeriods (const FreeBusyPeriod::List &list)
 
Period::List busyPeriods () const
 
QDateTime dateTime (DateTimeRole role) const override
 
virtual QDateTime dtEnd () const
 
FreeBusyPeriod::List fullBusyPeriods () const
 
void merge (const FreeBusy::Ptr &freebusy)
 
QLatin1String mimeType () const override
 
void setDateTime (const QDateTime &dateTime, DateTimeRole role) override
 
void setDtEnd (const QDateTime &end)
 
void setDtStart (const QDateTime &start) override
 
void shiftTimes (const QTimeZone &oldZone, const QTimeZone &newZone) override
 
void sortList ()
 
IncidenceType type () const override
 
QByteArray typeStr () const override
 
- Public Member Functions inherited from KCalendarCore::IncidenceBase
 IncidenceBase ()
 
 ~IncidenceBase () override
 
void addAttendee (const Attendee &attendee, bool doUpdate=true)
 
void addComment (const QString &comment)
 
void addContact (const QString &contact)
 
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
 
Attendee::List attendees () const
 
void clearAttendees ()
 
void clearComments ()
 
void clearContacts ()
 
QStringList comments () const
 
QStringList contacts () const
 
QSet< IncidenceBase::FielddirtyFields () const
 
virtual QDateTime dtStart () const
 
Duration duration () const
 
void endUpdates ()
 
bool hasDuration () const
 
bool isReadOnly () const
 
QDateTime lastModified () const
 
bool operator!= (const IncidenceBase &ib) const
 
IncidenceBaseoperator= (const IncidenceBase &other)
 
bool operator== (const IncidenceBase &ib) const
 
Person organizer () const
 
virtual QDateTime recurrenceId () const
 
void registerObserver (IncidenceObserver *observer)
 
bool removeComment (const QString &comment)
 
bool removeContact (const QString &contact)
 
void resetDirtyFields ()
 
virtual void setAllDay (bool allDay)
 
void setAttendees (const Attendee::List &attendees, bool doUpdate=true)
 
void setDirtyFields (const QSet< IncidenceBase::Field > &)
 
virtual void setDuration (const Duration &duration)
 
void setHasDuration (bool hasDuration)
 
virtual void setLastModified (const QDateTime &lm)
 
void setOrganizer (const Person &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 ()
 
QUrl uri () const
 
QUrl url () const
 
- Public Member Functions inherited from KCalendarCore::CustomProperties
 CustomProperties ()
 
 CustomProperties (const CustomProperties &other)
 
virtual ~CustomProperties ()
 
QMap< QByteArray, QStringcustomProperties () const
 
QString customProperty (const QByteArray &app, const QByteArray &key) const
 
QString nonKDECustomProperty (const QByteArray &name) const
 
QString nonKDECustomPropertyParameters (const QByteArray &name) const
 
CustomPropertiesoperator= (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 KCalendarCore::IncidenceBase
static quint32 magicSerializationIdentifier ()
 
- Static Public Member Functions inherited from KCalendarCore::CustomProperties
static QByteArray customPropertyName (const QByteArray &app, const QByteArray &key)
 

Protected Member Functions

IncidenceBaseassign (const IncidenceBase &other) override
 
bool equals (const IncidenceBase &freebusy) const override
 
void virtual_hook (VirtualHook id, void *data) override
 
- Protected Member Functions inherited from KCalendarCore::IncidenceBase
 IncidenceBase (const IncidenceBase &ib)
 
void customPropertyUpdate () override
 
void customPropertyUpdated () override
 
virtual void deserialize (QDataStream &in)
 
virtual void serialize (QDataStream &out) const
 
void setFieldDirty (IncidenceBase::Field field)
 

Friends

KCALENDARCORE_EXPORT QDataStreamoperator<< (QDataStream &s, const KCalendarCore::FreeBusy::Ptr &freebusy)
 
KCALENDARCORE_EXPORT QDataStreamoperator>> (QDataStream &s, KCalendarCore::FreeBusy::Ptr &freebusy)
 

Additional Inherited Members

- Properties inherited from KCalendarCore::IncidenceBase
bool allDay
 
QVariantList attendees
 
QDateTime dtStart
 
QDateTime lastModified
 
KCalendarCore::Person organizer
 
QString uid
 
- Protected Types inherited from KCalendarCore::IncidenceBase
enum  VirtualHook
 
- Protected Attributes inherited from KCalendarCore::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 40 of file freebusy.h.

Member Typedef Documentation

List of FreeBusy objects.

Definition at line 57 of file freebusy.h.

A shared pointer to a FreeBusy object.

Definition at line 52 of file freebusy.h.

Constructor & Destructor Documentation

FreeBusy::FreeBusy ( )

Constructs an free/busy without any periods.

Definition at line 66 of file freebusy.cpp.

FreeBusy::FreeBusy ( const FreeBusy other)

Copy constructor.

Parameters
otheris the free/busy to copy.

Definition at line 71 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 178 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 184 of file freebusy.cpp.

FreeBusy::FreeBusy ( const QDateTime start,
const QDateTime 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 77 of file freebusy.cpp.

FreeBusy::FreeBusy ( const Event::List events,
const QDateTime start,
const QDateTime 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 84 of file freebusy.cpp.

FreeBusy::~FreeBusy ( )
override

Destroys a free/busy.

Definition at line 189 of file freebusy.cpp.

Member Function Documentation

void FreeBusy::addPeriod ( const QDateTime start,
const QDateTime 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 257 of file freebusy.cpp.

void FreeBusy::addPeriod ( const QDateTime 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 263 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 242 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 251 of file freebusy.cpp.

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

IncidenceBase::assign()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 300 of file freebusy.cpp.

Period::List FreeBusy::busyPeriods ( ) const

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

Definition at line 220 of file freebusy.cpp.

QDateTime FreeBusy::dateTime ( DateTimeRole  role) const
overridevirtual
QDateTime 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 215 of file freebusy.cpp.

bool FreeBusy::equals ( const IncidenceBase freebusy) const
overrideprotectedvirtual

Compare this with freebusy for equality.

Parameters
freebusyis the FreeBusy to compare.

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 310 of file freebusy.cpp.

QLatin1String KCalendarCore::FreeBusy::freeBusyMimeType ( )
static

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

Definition at line 390 of file freebusy.cpp.

FreeBusyPeriod::List FreeBusy::fullBusyPeriods ( ) const

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

Definition at line 232 of file freebusy.cpp.

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

Merges another free/busy into this free/busy.

Parameters
freebusyis a pointer to a valid FreeBusy object.

Definition at line 269 of file freebusy.cpp.

QLatin1String FreeBusy::mimeType ( ) const
overridevirtual
void FreeBusy::setDateTime ( const QDateTime dateTime,
DateTimeRole  role 
)
overridevirtual
void FreeBusy::setDtEnd ( const QDateTime 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 QDateTime specifying an end datetime.
See also
dtEnd(), setDtStart().

Definition at line 210 of file freebusy.cpp.

void FreeBusy::setDtStart ( const QDateTime start)
overridevirtual

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 QDateTime specifying an start datetime.
See also
IncidenceBase::dtStart(), setDtEnd().

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 204 of file freebusy.cpp.

void FreeBusy::shiftTimes ( const QTimeZone oldZone,
const QTimeZone newZone 
)
overridevirtual

IncidenceBase::shiftTimes()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 288 of file freebusy.cpp.

void FreeBusy::sortList ( )

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

Definition at line 237 of file freebusy.cpp.

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

IncidenceBase::type()

Implements KCalendarCore::IncidenceBase.

Definition at line 194 of file freebusy.cpp.

QByteArray FreeBusy::typeStr ( ) const
overridevirtual

IncidenceBase::typeStr()

Implements KCalendarCore::IncidenceBase.

Definition at line 199 of file freebusy.cpp.

void FreeBusy::virtual_hook ( VirtualHook  id,
void *  data 
)
overrideprotectedvirtual

Friends And Related Function Documentation

KCALENDARCORE_EXPORT QDataStream& operator<< ( QDataStream s,
const KCalendarCore::FreeBusy::Ptr freebusy 
)
friend

Serializes the freebusy object into the stream.

KCALENDARCORE_EXPORT QDataStream& operator>> ( QDataStream s,
KCalendarCore::FreeBusy::Ptr freebusy 
)
friend

Initializes the freebusy object from the stream.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 14 2020 22:50:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.