libkcal

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     bool operator==( const Event & ) const;
00049 
00050     QCString type() const { return "Event"; }
00051 
00055     Event *clone();
00056 
00060     void setDtEnd(const QDateTime &dtEnd);
00064     virtual QDateTime dtEnd() const;
00070     QDate dateEnd() const;
00075     QString dtEndTimeStr() const;
00083     QString dtEndDateStr( bool shortfmt = true ) const;
00088     QString dtEndStr() const;
00089 
00093     void setHasEndDate(bool);
00097     bool hasEndDate() const;
00098 
00102     bool isMultiDay() const;
00103 
00107     void setTransparency( Transparency transparency );
00111     Transparency transparency() const;
00112 
00116     void setDuration( int seconds );
00117 
00118   protected:
00120     virtual QDateTime endDateRecurrenceBase() const { return dtEnd(); }
00121   private:
00122     bool accept( Visitor &v ) { return v.visit( this ); }
00123 
00124     QDateTime mDtEnd;
00125     bool mHasEndDate;
00126     Transparency mTransparency;
00127 
00128     class Private;
00129     Private *d;
00130 };
00131 
00132 }
00133 
00134 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys