libkcal

compat.h

Go to the documentation of this file.
00001 /*
00002     This file is part of libkcal.
00003 
00004     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00005     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Library General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Library General Public License for more details.
00016 
00017     You should have received a copy of the GNU Library General Public License
00018     along with this library; see the file COPYING.LIB.  If not, write to
00019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020     Boston, MA 02110-1301, USA.
00021 */
00022 #ifndef KCAL_COMPAT_H
00023 #define KCAL_COMPAT_H
00024 
00025 #include <qstring.h>
00026 #include <qdatetime.h>
00027 
00028 namespace KCal {
00029 
00030 class Incidence;
00031 class Compat;
00032 
00036 class CompatFactory
00037 {
00038   public:
00039     static Compat *createCompat( const QString &productId );
00040 };
00041 
00045 class Compat
00046 {
00047   public:
00048     Compat() {};
00049     virtual ~Compat() {};
00050 
00051     virtual void fixRecurrence( Incidence * );
00052     virtual void fixEmptySummary( Incidence * );
00053     virtual void fixAlarms( Incidence * ) {}
00054     virtual void fixFloatingEnd( QDate & ) {}
00055     virtual bool useTimeZoneShift() { return true; }
00056     virtual int fixPriority( int prio ) { return prio; }
00057 
00058   private:
00059     class Private;
00060     Private *d;
00061 };
00062 
00063 class CompatPre35 : public Compat
00064 {
00065   public:
00066     virtual void fixRecurrence( Incidence * );
00067   private:
00068     class Private;
00069     Private *d;
00070 };
00071 
00072 class CompatPre34 : public CompatPre35
00073 {
00074   public:
00075     virtual int fixPriority( int prio );
00076   private:
00077     class Private;
00078     Private *d;
00079 };
00080 
00081 class CompatPre32 : public CompatPre34
00082 {
00083   public:
00084     virtual void fixRecurrence( Incidence * );
00085 
00086   private:
00087     class Private;
00088     Private *d;
00089 };
00090 
00091 class CompatPre31 : public CompatPre32
00092 {
00093   public:
00094     virtual void fixFloatingEnd( QDate & );
00095     virtual void fixRecurrence( Incidence *incidence );
00096 
00097   private:
00098     class Private;
00099     Private *d;
00100 };
00101 
00102 class Compat32PrereleaseVersions : public Compat
00103 {
00104   public:
00105     virtual bool useTimeZoneShift() { return false; }
00106 
00107   private:
00108     class Private;
00109     Private *d;
00110 };
00111 
00112 class CompatOutlook9 : public Compat
00113 {
00114   public:
00115     virtual void fixAlarms( Incidence * );
00116 
00117   private:
00118     class Private;
00119     Private *d;
00120 };
00121 
00122 }
00123 
00124 #endif