KCal Library
freebusy.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00031 #ifndef KCAL_FREEBUSY_H
00032 #define KCAL_FREEBUSY_H
00033
00034 #include "incidencebase.h"
00035 #include "event.h"
00036 #include "freebusyperiod.h"
00037
00038 #include <QtCore/QByteArray>
00039
00040 namespace KCal {
00041
00042 class Calendar;
00043
00050 class KCAL_EXPORT FreeBusy : public IncidenceBase
00051 {
00052 public:
00056 FreeBusy();
00057
00062 FreeBusy( const FreeBusy &other );
00063
00069 explicit FreeBusy( const Period::List &busyPeriods );
00070
00076 explicit FreeBusy( const FreeBusyPeriod::List &busyPeriods );
00077
00084 FreeBusy( const KDateTime &start, const KDateTime &end );
00085
00093 FreeBusy( Calendar *calendar, const KDateTime &start, const KDateTime &end );
00094
00103 FreeBusy( const Event::List &events, const KDateTime &start, const KDateTime &end );
00104
00108 ~FreeBusy();
00109
00114 QByteArray type() const;
00115
00120
00121
00129 virtual void setDtStart( const KDateTime &start );
00130
00138 void setDtEnd( const KDateTime &end );
00139
00145 virtual KDateTime dtEnd() const;
00146
00151 virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00152 const KDateTime::Spec &newSpec );
00153
00157 Period::List busyPeriods() const;
00158
00162 FreeBusyPeriod::List fullBusyPeriods() const;
00163
00170 void addPeriod( const KDateTime &start, const KDateTime &end );
00171
00178 void addPeriod( const KDateTime &start, const Duration &duration );
00179
00187 void addPeriods( const Period::List &list );
00188
00196 void addPeriods( const FreeBusyPeriod::List &list );
00197
00201 void sortList();
00202
00208 void merge( FreeBusy *freebusy );
00209
00213 FreeBusy &operator=( const FreeBusy &other );
00214
00220 bool operator==( const FreeBusy &freebusy ) const;
00221
00222 private:
00227 bool accept( Visitor &v ) { return v.visit( this ); }
00228
00229
00230 class Private;
00231 Private *const d;
00232
00233 };
00234
00235 }
00236
00237 #endif