event.h
00001 /* 00002 This file is part of libkcal. 00003 00004 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KCAL_EVENT_H 00022 #define KCAL_EVENT_H 00023 00024 #include "incidence.h" 00025 00026 namespace KCal { 00027 00031 class Event : public Incidence 00032 { 00033 public: 00040 enum Transparency { Opaque, Transparent }; 00041 00042 typedef ListBase<Event> List; 00043 00044 Event(); 00045 Event( const Event & ); 00046 ~Event(); 00047 bool operator==( const Event & ) const; 00048 00049 QCString type() const { return "Event"; } 00050 00054 Event *clone(); 00055 00059 void setDtEnd(const QDateTime &dtEnd); 00063 virtual QDateTime dtEnd() const; 00068 QString dtEndTimeStr() const; 00076 QString dtEndDateStr( bool shortfmt = true ) const; 00081 QString dtEndStr() const; 00082 00086 void setHasEndDate(bool); 00090 bool hasEndDate() const; 00091 00095 bool isMultiDay() const; 00096 00100 void setTransparency( Transparency transparency ); 00104 Transparency transparency() const; 00105 00109 void setDuration( int seconds ); 00110 00111 private: 00112 bool accept( Visitor &v ) { return v.visit( this ); } 00113 00114 QDateTime mDtEnd; 00115 bool mHasEndDate; 00116 Transparency mTransparency; 00117 00118 class Private; 00119 Private *d; 00120 }; 00121 00122 } 00123 00124 #endif