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., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 #ifndef KCAL_EVENT_H 00022 #define KCAL_EVENT_H 00023 00024 #include "incidence.h" 00025 #include <kdepimmacros.h> 00026 00027 namespace KCal { 00028 00032 class LIBKCAL_EXPORT Event : public Incidence 00033 { 00034 public: 00041 enum Transparency { Opaque, Transparent }; 00042 00043 typedef ListBase<Event> List; 00044 00045 Event(); 00046 Event( const Event & ); 00047 ~Event(); 00048 Event& operator=( const Event &e ); 00049 bool operator==( const Event & ) const; 00050 00051 TQCString type() const { return "Event"; } 00052 00056 Event *clone(); 00057 00061 void setDtEnd(const TQDateTime &dtEnd); 00065 virtual TQDateTime dtEnd() const; 00071 TQDate dateEnd() const; 00077 TQString KDE_DEPRECATED dtEndTimeStr() const; 00086 TQString KDE_DEPRECATED dtEndDateStr( bool shortfmt = true ) const; 00092 TQString KDE_DEPRECATED dtEndStr() const; 00093 00097 void setHasEndDate(bool); 00101 bool hasEndDate() const; 00102 00106 bool isMultiDay() const; 00107 00111 void setTransparency( Transparency transparency ); 00115 Transparency transparency() const; 00116 00120 void setDuration( int seconds ); 00121 00122 protected: 00124 virtual TQDateTime endDateRecurrenceBase() const { return dtEnd(); } 00125 private: 00126 bool accept( Visitor &v ) { return v.visit( this ); } 00127 00128 TQDateTime mDtEnd; 00129 bool mHasEndDate; 00130 Transparency mTransparency; 00131 00132 class Private; 00133 Private *d; 00134 }; 00135 00136 } 00137 00138 #endif