KCal Library
freebusyperiod.cpp
Go to the documentation of this file.00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (c) 2007 David Jarvie <software@astrojar.org.uk> 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 */ 00033 #include "freebusyperiod.h" 00034 00035 #include <kdebug.h> 00036 #include <klocale.h> 00037 00038 using namespace KCal; 00039 00040 //@cond PRIVATE 00041 class KCal::FreeBusyPeriod::Private 00042 { 00043 public: 00044 Private() {} 00045 00046 QString mSummary; 00047 QString mLocation; 00048 }; 00049 //@endcond 00050 00051 FreeBusyPeriod::FreeBusyPeriod() : Period(), d( new KCal::FreeBusyPeriod::Private() ) 00052 { 00053 } 00054 00055 FreeBusyPeriod::FreeBusyPeriod( const KDateTime &start, const KDateTime &end ) 00056 : Period( start, end ), d( new KCal::FreeBusyPeriod::Private() ) 00057 { 00058 } 00059 00060 FreeBusyPeriod::FreeBusyPeriod( const KDateTime &start, const Duration &duration ) 00061 : Period( start, duration ), d( new KCal::FreeBusyPeriod::Private() ) 00062 { 00063 } 00064 00065 FreeBusyPeriod::FreeBusyPeriod( const FreeBusyPeriod &period ) 00066 : Period( period ), d( new KCal::FreeBusyPeriod::Private( *period.d ) ) 00067 { 00068 } 00069 00070 FreeBusyPeriod::FreeBusyPeriod( const Period &period ) 00071 : Period( period ), d( new KCal::FreeBusyPeriod::Private() ) 00072 { 00073 } 00074 00075 FreeBusyPeriod::~FreeBusyPeriod() 00076 { 00077 delete d; 00078 } 00079 00080 FreeBusyPeriod &FreeBusyPeriod::operator=( const FreeBusyPeriod &other ) 00081 { 00082 Period::operator=(other); 00083 *d = *other.d; 00084 return *this; 00085 } 00086 00087 QString FreeBusyPeriod::summary() const 00088 { 00089 return d->mSummary; 00090 } 00091 00092 void FreeBusyPeriod::setSummary( const QString &summary ) 00093 { 00094 d->mSummary = summary; 00095 } 00096 00097 QString FreeBusyPeriod::location() const 00098 { 00099 return d->mLocation; 00100 } 00101 00102 void FreeBusyPeriod::setLocation( const QString &location ) 00103 { 00104 d->mLocation = location; 00105 }