KCalendarCore::FreeBusy

Search for usage in LXR

#include <freebusy.h>

Inheritance diagram for KCalendarCore::FreeBusy:

Public Types

typedef QList< 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 , FieldConferences , FieldColor
}
 
enum  IncidenceType {
  TypeEvent = 0 , TypeTodo , TypeJournal , TypeFreeBusy ,
  TypeUnknown
}
 
typedef QSharedPointer< IncidenceBasePtr
 

Public Member Functions

 FreeBusy ()
 
 FreeBusy (const Event::List &events, const QDateTime &start, const QDateTime &end)
 
 FreeBusy (const FreeBusy &other)
 
 FreeBusy (const FreeBusyPeriod::List &busyPeriods)
 
 FreeBusy (const Period::List &busyPeriods)
 
 FreeBusy (const QDateTime &start, const QDateTime &end)
 
 ~FreeBusy () override
 
void addPeriod (const QDateTime &start, const Duration &duration)
 
void addPeriod (const QDateTime &start, const QDateTime &end)
 
void addPeriods (const FreeBusyPeriod::List &list)
 
void addPeriods (const Period::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
KCALENDARCORE_NO_EXPORT IncidenceBase (IncidenceBasePrivate *p)
 
 ~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 &)=delete
 
KCALENDARCORE_NO_EXPORT IncidenceBase (const IncidenceBase &ib, IncidenceBasePrivate *p)
 
void customPropertyUpdate () override
 
void customPropertyUpdated () override
 
virtual void deserialize (QDataStream &in)
 
virtual void serialize (QDataStream &out) const
 
void setFieldDirty (IncidenceBase::Field field)
 
- Protected Member Functions inherited from KCalendarCore::CustomProperties

Additional Inherited Members

- Properties inherited from KCalendarCore::IncidenceBase
bool allDay
 
QList< KCalendarCore::Attendeeattendees
 
QDateTime dtStart
 
QDateTime lastModified
 
KCalendarCore::Person organizer
 
QString uid
 
QUrl url
 
- Protected Types inherited from KCalendarCore::IncidenceBase
enum  VirtualHook
 
- Protected Attributes inherited from KCalendarCore::IncidenceBase
IncidenceBasePrivate *const d_ptr
 
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 42 of file freebusy.h.

Member Typedef Documentation

◆ List

List of FreeBusy objects.

Definition at line 56 of file freebusy.h.

◆ Ptr

A shared pointer to a FreeBusy object.

Definition at line 51 of file freebusy.h.

Constructor & Destructor Documentation

◆ FreeBusy() [1/6]

FreeBusy::FreeBusy ( )

Constructs an free/busy without any periods.

Definition at line 67 of file freebusy.cpp.

◆ FreeBusy() [2/6]

FreeBusy::FreeBusy ( const FreeBusy & other)

Copy constructor.

Parameters
otheris the free/busy to copy.

Definition at line 72 of file freebusy.cpp.

◆ FreeBusy() [3/6]

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 175 of file freebusy.cpp.

◆ FreeBusy() [4/6]

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 181 of file freebusy.cpp.

◆ FreeBusy() [5/6]

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() [6/6]

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::~FreeBusy ( )
overridedefault

Destroys a free/busy.

Member Function Documentation

◆ addPeriod() [1/2]

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 267 of file freebusy.cpp.

◆ addPeriod() [2/2]

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 260 of file freebusy.cpp.

◆ addPeriods() [1/2]

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 253 of file freebusy.cpp.

◆ addPeriods() [2/2]

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 243 of file freebusy.cpp.

◆ assign()

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

IncidenceBase::assign()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 309 of file freebusy.cpp.

◆ busyPeriods()

Period::List FreeBusy::busyPeriods ( ) const

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

Definition at line 218 of file freebusy.cpp.

◆ dateTime()

QDateTime FreeBusy::dateTime ( DateTimeRole role) const
overridevirtual

◆ dtEnd()

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 212 of file freebusy.cpp.

◆ equals()

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 320 of file freebusy.cpp.

◆ freeBusyMimeType()

QLatin1String KCalendarCore::FreeBusy::freeBusyMimeType ( )
static

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

Definition at line 394 of file freebusy.cpp.

◆ fullBusyPeriods()

FreeBusyPeriod::List FreeBusy::fullBusyPeriods ( ) const

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

Definition at line 231 of file freebusy.cpp.

◆ merge()

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 274 of file freebusy.cpp.

◆ mimeType()

QLatin1String FreeBusy::mimeType ( ) const
overridevirtual

◆ setDateTime()

void FreeBusy::setDateTime ( const QDateTime & dateTime,
DateTimeRole role )
overridevirtual

◆ setDtEnd()

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 203 of file freebusy.cpp.

◆ setDtStart()

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 198 of file freebusy.cpp.

◆ shiftTimes()

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

IncidenceBase::shiftTimes()

Reimplemented from KCalendarCore::IncidenceBase.

Definition at line 293 of file freebusy.cpp.

◆ sortList()

void FreeBusy::sortList ( )

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

Definition at line 237 of file freebusy.cpp.

◆ type()

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

IncidenceBase::type()

Implements KCalendarCore::IncidenceBase.

Definition at line 188 of file freebusy.cpp.

◆ typeStr()

QByteArray FreeBusy::typeStr ( ) const
overridevirtual

IncidenceBase::typeStr()

Implements KCalendarCore::IncidenceBase.

Definition at line 193 of file freebusy.cpp.

◆ virtual_hook()

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

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.