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 "freebusyperiod.h"
00036
00037 #include <QtCore/QByteArray>
00038
00039 namespace KCal {
00040
00041 class Calendar;
00042
00049 class KCAL_EXPORT FreeBusy : public IncidenceBase
00050 {
00051 public:
00055 FreeBusy();
00056
00061 FreeBusy( const FreeBusy &other );
00062
00068 explicit FreeBusy( const Period::List &busyPeriods );
00069
00075 explicit FreeBusy( const FreeBusyPeriod::List &busyPeriods );
00076
00083 FreeBusy( const KDateTime &start, const KDateTime &end );
00084
00092 FreeBusy( Calendar *calendar, const KDateTime &start, const KDateTime &end );
00093
00097 ~FreeBusy();
00098
00103 QByteArray type() const;
00104
00112 virtual void setDtStart( const KDateTime &start );
00113
00121 void setDtEnd( const KDateTime &end );
00122
00128 virtual KDateTime dtEnd() const;
00129
00134 virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00135 const KDateTime::Spec &newSpec );
00136
00140 Period::List busyPeriods() const;
00141
00145 FreeBusyPeriod::List fullBusyPeriods() const;
00146
00153 void addPeriod( const KDateTime &start, const KDateTime &end );
00154
00161 void addPeriod( const KDateTime &start, const Duration &duration );
00162
00170 void addPeriods( const Period::List &list );
00171
00179 void addPeriods( const FreeBusyPeriod::List &list );
00180
00184 void sortList();
00185
00191 void merge( FreeBusy *freebusy );
00192
00196 FreeBusy &operator=( const FreeBusy &other );
00197
00203 bool operator==( const FreeBusy &freebusy ) const;
00204
00205 private:
00210 bool accept( Visitor &v ) { return v.visit( this ); }
00211
00212
00213 class Private;
00214 Private *const d;
00215
00216 };
00217
00218 }
00219
00220 #endif