KCal Library
KCal::FreeBusy Class Reference
Provides information about the free/busy time of a calendar. More...
#include <freebusy.h>

Public Member Functions | |
void | addPeriod (const KDateTime &start, const Duration &duration) |
void | addPeriod (const KDateTime &start, const KDateTime &end) |
void | addPeriods (const FreeBusyPeriod::List &list) |
void | addPeriods (const Period::List &list) |
Period::List | busyPeriods () const |
virtual KDateTime | dtEnd () const |
FreeBusy (Calendar *calendar, const KDateTime &start, const KDateTime &end) | |
FreeBusy (const KDateTime &start, const KDateTime &end) | |
FreeBusy (const FreeBusyPeriod::List &busyPeriods) | |
FreeBusy (const Period::List &busyPeriods) | |
FreeBusy (const FreeBusy &other) | |
FreeBusy () | |
FreeBusyPeriod::List | fullBusyPeriods () const |
void | merge (FreeBusy *freebusy) |
FreeBusy & | operator= (const FreeBusy &other) |
bool | operator== (const FreeBusy &freebusy) const |
void | setDtEnd (const KDateTime &end) |
virtual void | setDtStart (const KDateTime &start) |
virtual void | shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec) |
void | sortList () |
QByteArray | type () const |
~FreeBusy () |
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 49 of file freebusy.h.
Constructor & Destructor Documentation
FreeBusy::FreeBusy | ( | ) |
FreeBusy::FreeBusy | ( | const FreeBusy & | other | ) |
Copy constructor.
- Parameters:
-
other is the free/busy to copy.
Definition at line 84 of file freebusy.cpp.
FreeBusy::FreeBusy | ( | const Period::List & | busyPeriods | ) | [explicit] |
Constructs a free/busy from a list of periods.
- Parameters:
-
busyPeriods is a QList of periods.
Definition at line 193 of file freebusy.cpp.
KCal::FreeBusy::FreeBusy | ( | const FreeBusyPeriod::List & | busyPeriods | ) | [explicit] |
FreeBusy::FreeBusy | ( | const KDateTime & | start, | |
const KDateTime & | end | |||
) |
Constructs a free/busy from a single period.
- Parameters:
-
start is the start datetime of the period. end is the end datetime of the period.
Definition at line 90 of file freebusy.cpp.
FreeBusy::FreeBusy | ( | Calendar * | calendar, | |
const KDateTime & | start, | |||
const KDateTime & | end | |||
) |
Constructs a freebusy for a specified calendar give a single period.
- Parameters:
-
calendar is a pointer to a valid Calendar object. start is the start datetime of the period. end is the end datetime of the period.
Definition at line 97 of file freebusy.cpp.
FreeBusy::~FreeBusy | ( | ) |
Member Function Documentation
void FreeBusy::addPeriod | ( | const KDateTime & | start, | |
const Duration & | duration | |||
) |
Adds a period to the freebusy list and sorts the list.
- Parameters:
-
start is the start datetime of the period. duration is the Duration of the period.
Definition at line 272 of file freebusy.cpp.
void FreeBusy::addPeriod | ( | const KDateTime & | start, | |
const KDateTime & | end | |||
) |
Adds a period to the freebusy list and sorts the list.
- Parameters:
-
start is the start datetime of the period. end is the end datetime of the period.
Definition at line 266 of file freebusy.cpp.
void KCal::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:
-
list is a QList of FreeBusyPeriod objects.
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.
Definition at line 252 of file freebusy.cpp.
Period::List FreeBusy::busyPeriods | ( | ) | const |
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 225 of file freebusy.cpp.
FreeBusyPeriod::List FreeBusy::fullBusyPeriods | ( | ) | const |
void FreeBusy::merge | ( | FreeBusy * | freebusy | ) |
Merges another free/busy into this free/busy.
- Parameters:
-
freebusy is a pointer to a valid FreeBusy object.
Definition at line 278 of file freebusy.cpp.
bool FreeBusy::operator== | ( | const FreeBusy & | freebusy | ) | const |
Compare this with freebusy
for equality.
- Parameters:
-
freebusy is the FreeBusy to compare.
Definition at line 313 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:
-
end is a KDateTime specifying an end datetime.
- See also:
- dtEnd(), setDtStart().
Definition at line 220 of file freebusy.cpp.
void FreeBusy::setDtStart | ( | const KDateTime & | start | ) | [virtual] |
Sets the start datetime for the free/busy.
Note that this datetime may be later or earlier than all periods within the free/busy.
- Parameters:
-
start is a KDateTime specifying an start datetime.
- See also:
- IncidenceBase::dtStart(), setDtEnd().
Reimplemented from KCal::IncidenceBase.
Definition at line 214 of file freebusy.cpp.
void FreeBusy::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 KCal::IncidenceBase.
Definition at line 295 of file freebusy.cpp.
void FreeBusy::sortList | ( | ) |
Sorts the list of free/busy periods into ascending order.
Definition at line 246 of file freebusy.cpp.
QByteArray FreeBusy::type | ( | ) | const [virtual] |
Prints the type of Incidence as a string.
Implements KCal::IncidenceBase.
Definition at line 209 of file freebusy.cpp.
The documentation for this class was generated from the following files: