KCal Library
freebusy.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 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_DEPRECATED 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 //KDE5: QString typeStr() const; 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 //@cond PRIVATE 00230 class Private; 00231 Private *const d; 00232 //@endcond 00233 }; 00234 00235 } 00236 00237 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:42 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:42 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.