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