summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/oevent.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/oevent.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/oevent.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/libopie2/opiepim/oevent.h b/libopie2/opiepim/oevent.h
index 9502efa..dc5e4d6 100644
--- a/libopie2/opiepim/oevent.h
+++ b/libopie2/opiepim/oevent.h
@@ -1,9 +1,9 @@
1/* 1/*
2 This file is part of the Opie Project 2 This file is part of the Opie Project
3 Copyright (C) Stefan Eilers (Eilers.Stefan@epost.de) 3 Copyright (C) Stefan Eilers <Eilers.Stefan@epost.de>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org> 4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l. 5 .=l.
6 .>+-= 6 .>+-=
7 _;:, .> :=|. This program is free software; you can 7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public 9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
@@ -25,27 +25,30 @@
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29// CONTAINS GPLed code of TT 29// CONTAINS GPLed code of TT
30 30
31#ifndef OPIE_PIM_EVENT_H 31#ifndef OEVENT_H
32#define OPIE_PIM_EVENT_H 32#define OEVENT_H
33
34#include <qstring.h>
35#include <qdatetime.h>
36#include <qvaluelist.h>
37 33
34/* OPIE */
35#include <opie2/otimezone.h>
36#include <opie2/opimrecord.h>
38#include <qpe/recordfields.h> 37#include <qpe/recordfields.h>
39#include <qpe/palmtopuidgen.h> 38#include <qpe/palmtopuidgen.h>
40 39
41#include <opie2/otimezone.h> 40/* QT */
42#include <opie2/opimrecord.h> 41#include <qstring.h>
42#include <qdatetime.h>
43#include <qvaluelist.h>
43 44
44namespace Opie { 45namespace Opie
45struct OCalendarHelper { 46{
47struct OCalendarHelper
48{
46 /** calculate the week number of the date */ 49 /** calculate the week number of the date */
47 static int week( const QDate& ); 50 static int week( const QDate& );
48 /** calculate the occurence of week days since the start of the month */ 51 /** calculate the occurence of week days since the start of the month */
49 static int ocurrence( const QDate& ); 52 static int ocurrence( const QDate& );
50 53
51 // returns the dayOfWeek for the *first* day it finds (ignores 54 // returns the dayOfWeek for the *first* day it finds (ignores
@@ -62,13 +65,14 @@ class ORecur;
62 65
63/** 66/**
64 * This is the container for all Events. It encapsules all 67 * This is the container for all Events. It encapsules all
65 * available information for a single Event 68 * available information for a single Event
66 * @short container for events. 69 * @short container for events.
67 */ 70 */
68class OEvent : public OPimRecord { 71class OEvent : public OPimRecord
72{
69public: 73public:
70 typedef QValueList<OEvent> ValueList; 74 typedef QValueList<OEvent> ValueList;
71 /** 75 /**
72 * RecordFields contain possible attributes 76 * RecordFields contain possible attributes
73 * used in the Results of toMap().. 77 * used in the Results of toMap()..
74 */ 78 */
@@ -188,12 +192,13 @@ public:
188 bool operator!=( const OEvent& ); 192 bool operator!=( const OEvent& );
189 bool operator<( const OEvent& ); 193 bool operator<( const OEvent& );
190 bool operator<=( const OEvent& ); 194 bool operator<=( const OEvent& );
191 bool operator>( const OEvent& ); 195 bool operator>( const OEvent& );
192 bool operator>=(const OEvent& ); 196 bool operator>=(const OEvent& );
193*/ 197*/
198
194private: 199private:
195 inline void changeOrModify(); 200 inline void changeOrModify();
196 void deref(); 201 void deref();
197 struct Data; 202 struct Data;
198 Data* data; 203 Data* data;
199 class Private; 204 class Private;
@@ -201,13 +206,15 @@ private:
201 206
202}; 207};
203 208
204/** 209/**
205 * AN Event can span through multiple days. We split up a multiday eve 210 * AN Event can span through multiple days. We split up a multiday eve
206 */ 211 */
207class OEffectiveEvent { 212class OEffectiveEvent
213{
214
208public: 215public:
209 typedef QValueList<OEffectiveEvent> ValueList; 216 typedef QValueList<OEffectiveEvent> ValueList;
210 enum Position { MidWay, Start, End, StartEnd }; 217 enum Position { MidWay, Start, End, StartEnd };
211 // If we calculate the effective event of a multi-day event 218 // If we calculate the effective event of a multi-day event
212 // we have to figure out whether we are at the first day, 219 // we have to figure out whether we are at the first day,
213 // at the end, or anywhere else ("middle"). This is important 220 // at the end, or anywhere else ("middle"). This is important