-rw-r--r-- | libkcal/incidence.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index de2a381..38d2aaa 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -170,130 +170,139 @@ class Incidence : public IncidenceBase | |||
170 | void setRelatedTo(Incidence *relatedTo); | 170 | void setRelatedTo(Incidence *relatedTo); |
171 | /** what event does this one relate to? */ | 171 | /** what event does this one relate to? */ |
172 | Incidence *relatedTo() const; | 172 | Incidence *relatedTo() const; |
173 | /** All events that are related to this event */ | 173 | /** All events that are related to this event */ |
174 | QPtrList<Incidence> relations() const; | 174 | QPtrList<Incidence> relations() const; |
175 | /** Add an event which is related to this event */ | 175 | /** Add an event which is related to this event */ |
176 | void addRelation(Incidence *); | 176 | void addRelation(Incidence *); |
177 | /** Remove event that is related to this event */ | 177 | /** Remove event that is related to this event */ |
178 | void removeRelation(Incidence *); | 178 | void removeRelation(Incidence *); |
179 | 179 | ||
180 | /** returns the list of dates which are exceptions to the recurrence rule */ | 180 | /** returns the list of dates which are exceptions to the recurrence rule */ |
181 | DateList exDates() const; | 181 | DateList exDates() const; |
182 | /** sets the list of dates which are exceptions to the recurrence rule */ | 182 | /** sets the list of dates which are exceptions to the recurrence rule */ |
183 | void setExDates(const DateList &_exDates); | 183 | void setExDates(const DateList &_exDates); |
184 | void setExDates(const char *dates); | 184 | void setExDates(const char *dates); |
185 | /** Add a date to the list of exceptions of the recurrence rule. */ | 185 | /** Add a date to the list of exceptions of the recurrence rule. */ |
186 | void addExDate(const QDate &date); | 186 | void addExDate(const QDate &date); |
187 | 187 | ||
188 | /** returns true if there is an exception for this date in the recurrence | 188 | /** returns true if there is an exception for this date in the recurrence |
189 | rule set, or false otherwise. */ | 189 | rule set, or false otherwise. */ |
190 | bool isException(const QDate &qd) const; | 190 | bool isException(const QDate &qd) const; |
191 | 191 | ||
192 | /** add attachment to this event */ | 192 | /** add attachment to this event */ |
193 | void addAttachment(Attachment *attachment); | 193 | void addAttachment(Attachment *attachment); |
194 | /** remove and delete a specific attachment */ | 194 | /** remove and delete a specific attachment */ |
195 | void deleteAttachment(Attachment *attachment); | 195 | void deleteAttachment(Attachment *attachment); |
196 | /** remove and delete all attachments with this mime type */ | 196 | /** remove and delete all attachments with this mime type */ |
197 | void deleteAttachments(const QString& mime); | 197 | void deleteAttachments(const QString& mime); |
198 | /** return list of all associated attachments */ | 198 | /** return list of all associated attachments */ |
199 | QPtrList<Attachment> attachments() const; | 199 | QPtrList<Attachment> attachments() const; |
200 | /** find a list of attachments with this mime type */ | 200 | /** find a list of attachments with this mime type */ |
201 | QPtrList<Attachment> attachments(const QString& mime) const; | 201 | QPtrList<Attachment> attachments(const QString& mime) const; |
202 | 202 | ||
203 | /** sets the event's status the value specified. See the enumeration | 203 | /** sets the event's status the value specified. See the enumeration |
204 | * above for possible values. */ | 204 | * above for possible values. */ |
205 | void setSecrecy(int); | 205 | void setSecrecy(int); |
206 | /** return the event's secrecy. */ | 206 | /** return the event's secrecy. */ |
207 | int secrecy() const; | 207 | int secrecy() const; |
208 | /** return the event's secrecy in string format. */ | 208 | /** return the event's secrecy in string format. */ |
209 | QString secrecyStr() const; | 209 | QString secrecyStr() const; |
210 | /** return list of all availbale secrecy classes */ | 210 | /** return list of all availbale secrecy classes */ |
211 | static QStringList secrecyList(); | 211 | static QStringList secrecyList(); |
212 | /** return human-readable name of secrecy class */ | 212 | /** return human-readable name of secrecy class */ |
213 | static QString secrecyName(int); | 213 | static QString secrecyName(int); |
214 | 214 | ||
215 | /** returns TRUE if the date specified is one on which the event will | 215 | /** returns TRUE if the date specified is one on which the event will |
216 | * recur. */ | 216 | * recur. */ |
217 | bool recursOn(const QDate &qd) const; | 217 | bool recursOn(const QDate &qd) const; |
218 | 218 | ||
219 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): | 219 | // VEVENT and VTODO, but not VJOURNAL (move to EventBase class?): |
220 | 220 | ||
221 | /** set resources used, such as Office, Car, etc. */ | 221 | /** set resources used, such as Office, Car, etc. */ |
222 | void setResources(const QStringList &resources); | 222 | void setResources(const QStringList &resources); |
223 | /** return list of current resources */ | 223 | /** return list of current resources */ |
224 | QStringList resources() const; | 224 | QStringList resources() const; |
225 | 225 | ||
226 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ | 226 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ |
227 | void setPriority(int priority); | 227 | void setPriority(int priority); |
228 | /** get the event's priority */ | 228 | /** get the event's priority */ |
229 | int priority() const; | 229 | int priority() const; |
230 | 230 | ||
231 | /** All alarms that are associated with this incidence */ | 231 | /** All alarms that are associated with this incidence */ |
232 | QPtrList<Alarm> alarms() const; | 232 | QPtrList<Alarm> alarms() const; |
233 | /** Create a new alarm which is associated with this incidence */ | 233 | /** Create a new alarm which is associated with this incidence */ |
234 | Alarm* newAlarm(); | 234 | Alarm* newAlarm(); |
235 | /** Add an alarm which is associated with this incidence */ | 235 | /** Add an alarm which is associated with this incidence */ |
236 | void addAlarm(Alarm*); | 236 | void addAlarm(Alarm*); |
237 | /** Remove an alarm that is associated with this incidence */ | 237 | /** Remove an alarm that is associated with this incidence */ |
238 | void removeAlarm(Alarm*); | 238 | void removeAlarm(Alarm*); |
239 | /** Remove all alarms that are associated with this incidence */ | 239 | /** Remove all alarms that are associated with this incidence */ |
240 | void clearAlarms(); | 240 | void clearAlarms(); |
241 | /** return whether any alarm associated with this incidence is enabled */ | 241 | /** return whether any alarm associated with this incidence is enabled */ |
242 | bool isAlarmEnabled() const; | 242 | bool isAlarmEnabled() const; |
243 | 243 | ||
244 | /** | 244 | /** |
245 | Return the recurrence rule associated with this incidence. If there is | 245 | Return the recurrence rule associated with this incidence. If there is |
246 | none, returns an appropriate (non-0) object. | 246 | none, returns an appropriate (non-0) object. |
247 | */ | 247 | */ |
248 | Recurrence *recurrence() const; | 248 | Recurrence *recurrence() const; |
249 | void setRecurrence(Recurrence * r); | 249 | void setRecurrence(Recurrence * r); |
250 | /** | 250 | /** |
251 | Forward to Recurrence::doesRecur(). | 251 | Forward to Recurrence::doesRecur(). |
252 | */ | 252 | */ |
253 | ushort doesRecur() const; | 253 | ushort doesRecur() const; |
254 | 254 | ||
255 | /** set the event's/todo's location. Do _not_ use it with journal */ | 255 | /** set the event's/todo's location. Do _not_ use it with journal */ |
256 | void setLocation(const QString &location); | 256 | void setLocation(const QString &location); |
257 | /** return the event's/todo's location. Do _not_ use it with journal */ | 257 | /** return the event's/todo's location. Do _not_ use it with journal */ |
258 | QString location() const; | 258 | QString location() const; |
259 | /** returns TRUE or FALSE depending on whether the todo has a start date */ | 259 | /** returns TRUE or FALSE depending on whether the todo has a start date */ |
260 | bool hasStartDate() const; | 260 | bool hasStartDate() const; |
261 | /** sets the event's hasStartDate value. */ | 261 | /** sets the event's hasStartDate value. */ |
262 | void setHasStartDate(bool f); | 262 | void setHasStartDate(bool f); |
263 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; | 263 | QDateTime getNextOccurence( const QDateTime& dt, bool* yes ) const; |
264 | bool cancelled() const; | 264 | bool cancelled() const; |
265 | void setCancelled( bool b ); | 265 | void setCancelled( bool b ); |
266 | |||
267 | bool hasRecurrenceID() const; | ||
268 | void setHasRecurrenceID( bool b ); | ||
269 | |||
270 | void setRecurrenceID(QDateTime); | ||
271 | QDateTime recurrenceID () const; | ||
272 | |||
266 | 273 | ||
267 | protected: | 274 | protected: |
268 | QPtrList<Alarm> mAlarms; | 275 | QPtrList<Alarm> mAlarms; |
269 | QPtrList<Incidence> mRelations; | 276 | QPtrList<Incidence> mRelations; |
270 | private: | 277 | private: |
271 | int mRevision; | 278 | int mRevision; |
272 | bool mCancelled; | 279 | bool mCancelled; |
273 | 280 | ||
274 | // base components of jounal, event and todo | 281 | // base components of jounal, event and todo |
282 | QDateTime mRecurrenceID; | ||
283 | bool mHasRecurrenceID; | ||
275 | QDateTime mCreated; | 284 | QDateTime mCreated; |
276 | QString mDescription; | 285 | QString mDescription; |
277 | QString mSummary; | 286 | QString mSummary; |
278 | QStringList mCategories; | 287 | QStringList mCategories; |
279 | Incidence *mRelatedTo; | 288 | Incidence *mRelatedTo; |
280 | QString mRelatedToUid; | 289 | QString mRelatedToUid; |
281 | DateList mExDates; | 290 | DateList mExDates; |
282 | QPtrList<Attachment> mAttachments; | 291 | QPtrList<Attachment> mAttachments; |
283 | QStringList mResources; | 292 | QStringList mResources; |
284 | bool mHasStartDate; // if todo has associated start date | 293 | bool mHasStartDate; // if todo has associated start date |
285 | 294 | ||
286 | int mSecrecy; | 295 | int mSecrecy; |
287 | int mPriority; // 1 = highest, 2 = less, etc. | 296 | int mPriority; // 1 = highest, 2 = less, etc. |
288 | 297 | ||
289 | //QPtrList<Alarm> mAlarms; | 298 | //QPtrList<Alarm> mAlarms; |
290 | Recurrence *mRecurrence; | 299 | Recurrence *mRecurrence; |
291 | 300 | ||
292 | QString mLocation; | 301 | QString mLocation; |
293 | }; | 302 | }; |
294 | 303 | ||
295 | bool operator==( const Incidence&, const Incidence& ); | 304 | bool operator==( const Incidence&, const Incidence& ); |
296 | 305 | ||
297 | } | 306 | } |
298 | 307 | ||
299 | #endif | 308 | #endif |