• 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 
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 
00146     bool isMultiDay( const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00147 
00152     virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00153                              const KDateTime::Spec &newSpec );
00154 
00159     void setTransparency( Transparency transparency );
00160 
00164     Transparency transparency() const;
00165 
00170     void setDuration( const Duration &duration );
00171 
00176     void setAllDay( bool allDay );
00177 
00182     KDateTime dateTime( DateTimeRole role ) const;
00183 
00188     void setDateTime( const KDateTime &dateTime, DateTimeRole role );
00189 
00194     QLatin1String mimeType() const;
00195 
00200     QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const;
00201 
00205     static QLatin1String eventMimeType();
00206 
00207   protected:
00212     virtual bool equals( const IncidenceBase &event ) const;
00213 
00218     virtual IncidenceBase &assign( const IncidenceBase &other );
00219 
00224     virtual void virtual_hook( int id, void *data );
00225 
00226   private:
00231     bool accept( Visitor &v, IncidenceBase::Ptr incidence );
00232 
00239     Event &operator=( const Event &other );
00240 
00241     //@cond PRIVATE
00242     class Private;
00243     Private *const d;
00244     //@endcond
00245 };
00246 
00247 } // namespace KCalCore
00248 
00249 Q_DECLARE_TYPEINFO( KCalCore::Event::Ptr, Q_MOVABLE_TYPE );
00250 
00251 //@cond PRIVATE
00252 namespace KPIMUtils
00253 {
00254   // super class trait specialization
00255   template <> struct SuperClass<KCalCore::Event> : public SuperClassTrait<KCalCore::Incidence>{};
00256 }
00257 //@endcond
00258 
00259 #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.7.4
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