libkcal

compat.h
1 /*
2  This file is part of libkcal.
3 
4  Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 #ifndef KCAL_COMPAT_H
23 #define KCAL_COMPAT_H
24 
25 #include <tqstring.h>
26 #include <tqdatetime.h>
27 
28 namespace KCal {
29 
30 class Incidence;
31 class Compat;
32 
37 {
38  public:
39  static Compat *createCompat( const TQString &productId );
40 };
41 
45 class Compat
46 {
47  public:
48  Compat() {};
49  virtual ~Compat() {};
50 
51  virtual void fixRecurrence( Incidence * );
52  virtual void fixEmptySummary( Incidence * );
53  virtual void fixAlarms( Incidence * ) {}
54  virtual void fixFloatingEnd( TQDate & ) {}
55  virtual bool useTimeZoneShift() { return true; }
56  virtual int fixPriority( int prio ) { return prio; }
57 
58  private:
59  class Private;
60  Private *d;
61 };
62 
63 class CompatPre35 : public Compat
64 {
65  public:
66  virtual void fixRecurrence( Incidence * );
67  private:
68  class Private;
69  Private *d;
70 };
71 
72 class CompatPre34 : public CompatPre35
73 {
74  public:
75  virtual int fixPriority( int prio );
76  private:
77  class Private;
78  Private *d;
79 };
80 
81 class CompatPre32 : public CompatPre34
82 {
83  public:
84  virtual void fixRecurrence( Incidence * );
85 
86  private:
87  class Private;
88  Private *d;
89 };
90 
91 class CompatPre31 : public CompatPre32
92 {
93  public:
94  virtual void fixFloatingEnd( TQDate & );
95  virtual void fixRecurrence( Incidence *incidence );
96 
97  private:
98  class Private;
99  Private *d;
100 };
101 
102 class Compat32PrereleaseVersions : public Compat
103 {
104  public:
105  virtual bool useTimeZoneShift() { return false; }
106 
107  private:
108  class Private;
109  Private *d;
110 };
111 
112 class CompatOutlook9 : public Compat
113 {
114  public:
115  virtual void fixAlarms( Incidence * );
116 
117  private:
118  class Private;
119  Private *d;
120 };
121 
122 }
123 
124 #endif
Factory for creating the right Compat object.
Definition: compat.h:37
This class provides compatibility to older (broken) versions of KOrganizer.
Definition: compat.h:46
This class provides the base class common to all calendar components.
Definition: incidence.h:48
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38