-rw-r--r-- | libopie/pim/oevent.h | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/libopie/pim/oevent.h b/libopie/pim/oevent.h index 30f442e..9218c97 100644 --- a/libopie/pim/oevent.h +++ b/libopie/pim/oevent.h | |||
@@ -28,66 +28,75 @@ struct OCalendarHelper { | |||
28 | 28 | ||
29 | }; | 29 | }; |
30 | 30 | ||
31 | class OPimNotifyManager; | 31 | class OPimNotifyManager; |
32 | class ORecur; | 32 | class ORecur; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * This is the container for all Events. It encapsules all | 35 | * This is the container for all Events. It encapsules all |
36 | * available information for a single Event | 36 | * available information for a single Event |
37 | * @short container for events. | 37 | * @short container for events. |
38 | */ | 38 | */ |
39 | class OEvent : public OPimRecord { | 39 | class OEvent : public OPimRecord { |
40 | public: | 40 | public: |
41 | typedef QValueList<OEvent> ValueList; | 41 | typedef QValueList<OEvent> ValueList; |
42 | /** | 42 | /** |
43 | * RecordFields contain possible attributes | 43 | * RecordFields contain possible attributes |
44 | * used in the Results of toMap().. | ||
44 | */ | 45 | */ |
45 | enum RecordFields { | 46 | enum RecordFields { |
46 | Uid = Qtopia::UID_ID, | 47 | FUid = Qtopia::UID_ID, |
47 | Category = Qtopia::CATEGORY_ID, | 48 | FCategories = Qtopia::CATEGORY_ID, |
48 | Description, | 49 | FDescription = 0, |
49 | Location, | 50 | FLocation, |
50 | Alarm, | 51 | FType, |
51 | Reminder, | 52 | FAlarm, |
52 | Recurrence, | 53 | FSound, |
53 | Note, | 54 | FRType, |
54 | Created, | 55 | FRWeekdays, |
55 | StartDate, | 56 | FRPosition, |
56 | EndDate, | 57 | FRFreq, |
57 | AllDay, | 58 | FRHasEndDate, |
58 | TimeZone | 59 | FREndDate, |
60 | FRCreated, | ||
61 | FRExceptions, | ||
62 | FStart, | ||
63 | FEnd, | ||
64 | FNote, | ||
65 | FTimeZone, | ||
66 | FRecParent, | ||
67 | FRecChildren, | ||
59 | }; | 68 | }; |
60 | 69 | ||
61 | /** | 70 | /** |
62 | * Start with an Empty OEvent. UID == 0 means that it is empty | 71 | * Start with an Empty OEvent. UID == 0 means that it is empty |
63 | */ | 72 | */ |
64 | OEvent(int uid = 0); | 73 | OEvent(int uid = 0); |
65 | 74 | ||
66 | /** | 75 | /** |
67 | * copy c'tor | 76 | * copy c'tor |
68 | */ | 77 | */ |
69 | OEvent( const OEvent& ); | 78 | OEvent( const OEvent& ); |
70 | ~OEvent(); | 79 | ~OEvent(); |
71 | OEvent &operator=( const OEvent& ); | 80 | OEvent &operator=( const OEvent& ); |
72 | 81 | ||
73 | QString description()const; | 82 | QString description()const; |
74 | void setDescription( const QString& description ); | 83 | void setDescription( const QString& description ); |
75 | 84 | ||
76 | QString location()const; | 85 | QString location()const; |
77 | void setLocation( const QString& loc ); | 86 | void setLocation( const QString& loc ); |
78 | 87 | ||
79 | bool hasNotifiers()const; | 88 | bool hasNotifiers()const; |
80 | OPimNotifyManager ¬ifiers()const; | 89 | OPimNotifyManager ¬ifiers()const; |
81 | 90 | ||
82 | ORecur recurrence()const; | 91 | ORecur recurrence()const; |
83 | void setRecurrence( const ORecur& ); | 92 | void setRecurrence( const ORecur& ); |
84 | bool hasRecurrence()const; | 93 | bool hasRecurrence()const; |
85 | 94 | ||
86 | QString note()const; | 95 | QString note()const; |
87 | void setNote( const QString& note ); | 96 | void setNote( const QString& note ); |
88 | 97 | ||
89 | 98 | ||
90 | QDateTime createdDateTime()const; | 99 | QDateTime createdDateTime()const; |
91 | void setCreatedDateTime( const QDateTime& dt); | 100 | void setCreatedDateTime( const QDateTime& dt); |
92 | 101 | ||
93 | /** set the date to dt. dt is the QDateTime in localtime */ | 102 | /** set the date to dt. dt is the QDateTime in localtime */ |
@@ -119,32 +128,33 @@ public: | |||
119 | QArray<int> children()const; | 128 | QArray<int> children()const; |
120 | void setChildren( const QArray<int>& ); | 129 | void setChildren( const QArray<int>& ); |
121 | void addChild( int uid ); | 130 | void addChild( int uid ); |
122 | void removeChild( int uid ); | 131 | void removeChild( int uid ); |
123 | 132 | ||
124 | /** return the parent OEvent */ | 133 | /** return the parent OEvent */ |
125 | int parent()const; | 134 | int parent()const; |
126 | void setParent( int uid ); | 135 | void setParent( int uid ); |
127 | 136 | ||
128 | 137 | ||
129 | /* needed reimp */ | 138 | /* needed reimp */ |
130 | QString toRichText()const; | 139 | QString toRichText()const; |
131 | QString toShortText()const; | 140 | QString toShortText()const; |
132 | QString type()const; | 141 | QString type()const; |
133 | 142 | ||
134 | QMap<int, QString> toMap()const; | 143 | QMap<int, QString> toMap()const; |
144 | void fromMap( const QMap<int, QString>& map ); | ||
135 | QString recordField(int )const; | 145 | QString recordField(int )const; |
136 | 146 | ||
137 | static int rtti(); | 147 | static int rtti(); |
138 | 148 | ||
139 | bool loadFromStream( QDataStream& ); | 149 | bool loadFromStream( QDataStream& ); |
140 | bool saveToStream( QDataStream& )const; | 150 | bool saveToStream( QDataStream& )const; |
141 | 151 | ||
142 | /* bool operator==( const OEvent& ); | 152 | /* bool operator==( const OEvent& ); |
143 | bool operator!=( const OEvent& ); | 153 | bool operator!=( const OEvent& ); |
144 | bool operator<( const OEvent& ); | 154 | bool operator<( const OEvent& ); |
145 | bool operator<=( const OEvent& ); | 155 | bool operator<=( const OEvent& ); |
146 | bool operator>( const OEvent& ); | 156 | bool operator>( const OEvent& ); |
147 | bool operator>=(const OEvent& ); | 157 | bool operator>=(const OEvent& ); |
148 | */ | 158 | */ |
149 | private: | 159 | private: |
150 | inline void changeOrModify(); | 160 | inline void changeOrModify(); |