-rw-r--r-- | libopie2/opiepim/oevent.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/libopie2/opiepim/oevent.h b/libopie2/opiepim/oevent.h index 9eb948f..9502efa 100644 --- a/libopie2/opiepim/oevent.h +++ b/libopie2/opiepim/oevent.h | |||
@@ -1,39 +1,68 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de) | ||
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | */ | ||
1 | // CONTAINS GPLed code of TT | 29 | // CONTAINS GPLed code of TT |
2 | 30 | ||
3 | #ifndef OPIE_PIM_EVENT_H | 31 | #ifndef OPIE_PIM_EVENT_H |
4 | #define OPIE_PIM_EVENT_H | 32 | #define OPIE_PIM_EVENT_H |
5 | 33 | ||
6 | #include <qstring.h> | 34 | #include <qstring.h> |
7 | #include <qdatetime.h> | 35 | #include <qdatetime.h> |
8 | #include <qvaluelist.h> | 36 | #include <qvaluelist.h> |
9 | 37 | ||
10 | #include <qpe/recordfields.h> | 38 | #include <qpe/recordfields.h> |
11 | #include <qpe/palmtopuidgen.h> | 39 | #include <qpe/palmtopuidgen.h> |
12 | 40 | ||
13 | #include "otimezone.h" | 41 | #include <opie2/otimezone.h> |
14 | #include "opimrecord.h" | 42 | #include <opie2/opimrecord.h> |
15 | 43 | ||
44 | namespace Opie { | ||
16 | struct OCalendarHelper { | 45 | struct OCalendarHelper { |
17 | /** calculate the week number of the date */ | 46 | /** calculate the week number of the date */ |
18 | static int week( const QDate& ); | 47 | static int week( const QDate& ); |
19 | /** calculate the occurence of week days since the start of the month */ | 48 | /** calculate the occurence of week days since the start of the month */ |
20 | static int ocurrence( const QDate& ); | 49 | static int ocurrence( const QDate& ); |
21 | 50 | ||
22 | // returns the dayOfWeek for the *first* day it finds (ignores | 51 | // returns the dayOfWeek for the *first* day it finds (ignores |
23 | // any further days!). Returns 1 (Monday) if there isn't any day found | 52 | // any further days!). Returns 1 (Monday) if there isn't any day found |
24 | static int dayOfWeek( char day ); | 53 | static int dayOfWeek( char day ); |
25 | 54 | ||
26 | /** returns the diff of month */ | 55 | /** returns the diff of month */ |
27 | static int monthDiff( const QDate& first, const QDate& second ); | 56 | static int monthDiff( const QDate& first, const QDate& second ); |
28 | 57 | ||
29 | }; | 58 | }; |
30 | 59 | ||
31 | class OPimNotifyManager; | 60 | class OPimNotifyManager; |
32 | class ORecur; | 61 | class ORecur; |
33 | 62 | ||
34 | /** | 63 | /** |
35 | * This is the container for all Events. It encapsules all | 64 | * This is the container for all Events. It encapsules all |
36 | * available information for a single Event | 65 | * available information for a single Event |
37 | * @short container for events. | 66 | * @short container for events. |
38 | */ | 67 | */ |
39 | class OEvent : public OPimRecord { | 68 | class OEvent : public OPimRecord { |
@@ -212,25 +241,28 @@ public: | |||
212 | 241 | ||
213 | /* return the length in hours */ | 242 | /* return the length in hours */ |
214 | int length()const; | 243 | int length()const; |
215 | int size()const; | 244 | int size()const; |
216 | 245 | ||
217 | QDate startDate()const; | 246 | QDate startDate()const; |
218 | QDate endDate()const; | 247 | QDate endDate()const; |
219 | 248 | ||
220 | bool operator<( const OEffectiveEvent &e ) const; | 249 | bool operator<( const OEffectiveEvent &e ) const; |
221 | bool operator<=( const OEffectiveEvent &e ) const; | 250 | bool operator<=( const OEffectiveEvent &e ) const; |
222 | bool operator==( const OEffectiveEvent &e ) const; | 251 | bool operator==( const OEffectiveEvent &e ) const; |
223 | bool operator!=( const OEffectiveEvent &e ) const; | 252 | bool operator!=( const OEffectiveEvent &e ) const; |
224 | bool operator>( const OEffectiveEvent &e ) const; | 253 | bool operator>( const OEffectiveEvent &e ) const; |
225 | bool operator>= ( const OEffectiveEvent &e ) const; | 254 | bool operator>= ( const OEffectiveEvent &e ) const; |
226 | 255 | ||
227 | private: | 256 | private: |
228 | void deref(); | 257 | void deref(); |
229 | inline void changeOrModify(); | 258 | inline void changeOrModify(); |
230 | class Private; | 259 | class Private; |
231 | Private* priv; | 260 | Private* priv; |
232 | struct Data; | 261 | struct Data; |
233 | Data* data; | 262 | Data* data; |
234 | 263 | ||
235 | }; | 264 | }; |
265 | |||
266 | } | ||
267 | |||
236 | #endif | 268 | #endif |