KCalCore Library
event.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcalcore library. 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 */ 00028 #ifndef KCALCORE_EVENT_H 00029 #define KCALCORE_EVENT_H 00030 00031 #include "kcalcore_export.h" 00032 #include "incidence.h" 00033 #include "supertrait.h" 00034 00035 namespace KCalCore { 00036 00041 class KCALCORE_EXPORT Event : public Incidence 00042 { 00043 public: 00047 enum Transparency { 00048 Opaque, 00049 Transparent 00050 }; 00051 00055 typedef QSharedPointer<Event> Ptr; 00056 00060 typedef QVector<Ptr> List; 00061 00065 Event(); 00066 00071 Event( const Event &other ); 00072 00076 ~Event(); 00077 00082 IncidenceType type() const; 00083 00088 QByteArray typeStr() const; 00089 00093 Event *clone() const; 00094 00101 virtual void setDtStart( const KDateTime &dt ); 00102 00111 void setDtEnd( const KDateTime &dtEnd ); 00112 00120 virtual KDateTime dtEnd() const; 00121 00127 QDate dateEnd() const; 00128 00133 void setHasEndDate( bool b ); 00134 00138 bool hasEndDate() const; 00139 00150 bool isMultiDay( const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00151 00156 virtual void shiftTimes( const KDateTime::Spec &oldSpec, 00157 const KDateTime::Spec &newSpec ); 00158 00163 void setTransparency( Transparency transparency ); 00164 00168 Transparency transparency() const; 00169 00174 void setDuration( const Duration &duration ); 00175 00180 void setAllDay( bool allDay ); 00181 00186 KDateTime dateTime( DateTimeRole role ) const; 00187 00192 void setDateTime( const KDateTime &dateTime, DateTimeRole role ); 00193 00198 QLatin1String mimeType() const; 00199 00204 QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const; 00205 00209 static QLatin1String eventMimeType(); 00210 00211 protected: 00216 virtual bool equals( const IncidenceBase &event ) const; 00217 00222 virtual IncidenceBase &assign( const IncidenceBase &other ); 00223 00228 virtual void virtual_hook( int id, void *data ); 00229 00230 private: 00235 bool accept( Visitor &v, IncidenceBase::Ptr incidence ); 00236 00243 Event &operator=( const Event &other ); 00244 00245 //@cond PRIVATE 00246 class Private; 00247 Private *const d; 00248 //@endcond 00249 }; 00250 00251 } // namespace KCalCore 00252 00253 Q_DECLARE_TYPEINFO( KCalCore::Event::Ptr, Q_MOVABLE_TYPE ); 00254 00255 //@cond PRIVATE 00256 namespace KPIMUtils 00257 { 00258 // super class trait specialization 00259 template <> struct SuperClass<KCalCore::Event> : public SuperClassTrait<KCalCore::Incidence>{}; 00260 } 00261 //@endcond 00262 00263 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:54:01 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:54:01 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.