• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

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 
00108     void setDtEnd( const KDateTime &dtEnd );
00109 
00114     virtual KDateTime dtEnd() const;
00115 
00121     QDate dateEnd() const;
00122 
00127     void setHasEndDate( bool b );
00128 
00132     bool hasEndDate() const;
00133 
00140     bool isMultiDay( const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00141 
00146     virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00147                              const KDateTime::Spec &newSpec );
00148 
00153     void setTransparency( Transparency transparency );
00154 
00158     Transparency transparency() const;
00159 
00164     void setDuration( const Duration &duration );
00165 
00170     void setAllDay( bool allDay );
00171 
00176     KDateTime dateTime( DateTimeRole role ) const;
00177 
00182     void setDateTime( const KDateTime &dateTime, DateTimeRole role );
00183 
00188     QLatin1String mimeType() const;
00189 
00194     QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const;
00195 
00199     static QLatin1String eventMimeType();
00200 
00201   protected:
00206     virtual bool equals( const IncidenceBase &event ) const;
00207 
00212     virtual IncidenceBase &assign( const IncidenceBase &other );
00213 
00218     virtual void virtual_hook( int id, void *data );
00219 
00220   private:
00225     bool accept( Visitor &v, IncidenceBase::Ptr incidence );
00226 
00233     Event &operator=( const Event &other );
00234 
00235     //@cond PRIVATE
00236     class Private;
00237     Private *const d;
00238     //@endcond
00239 };
00240 
00241 } // namespace KCalCore
00242 
00243 Q_DECLARE_TYPEINFO( KCalCore::Event::Ptr, Q_MOVABLE_TYPE );
00244 
00245 //@cond PRIVATE
00246 namespace KPIMUtils
00247 {
00248   // super class trait specialization
00249   template <> struct SuperClass<KCalCore::Event> : public SuperClassTrait<KCalCore::Incidence>{};
00250 }
00251 //@endcond
00252 
00253 #endif

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal