author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/incidence.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkcal/incidence.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f89942f..2940129 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h | |||
@@ -20,17 +20,19 @@ | |||
20 | #ifndef INCIDENCE_H | 20 | #ifndef INCIDENCE_H |
21 | #define INCIDENCE_H | 21 | #define INCIDENCE_H |
22 | // | 22 | // |
23 | // Incidence - base class of calendaring components | 23 | // Incidence - base class of calendaring components |
24 | // | 24 | // |
25 | 25 | ||
26 | #include <qdatetime.h> | 26 | #include <qdatetime.h> |
27 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
28 | #include <qvaluelist.h> | 28 | #include <q3valuelist.h> |
29 | //Added by qt3to4: | ||
30 | #include <Q3PtrList> | ||
29 | 31 | ||
30 | #include "recurrence.h" | 32 | #include "recurrence.h" |
31 | #include "alarm.h" | 33 | #include "alarm.h" |
32 | #include "attachment.h" | 34 | #include "attachment.h" |
33 | #include "listbase.h" | 35 | #include "listbase.h" |
34 | #include "incidencebase.h" | 36 | #include "incidencebase.h" |
35 | 37 | ||
36 | namespace KCal { | 38 | namespace KCal { |
@@ -108,17 +110,17 @@ class Incidence : public IncidenceBase | |||
108 | <pre> | 110 | <pre> |
109 | bool accept(Visitor &v) { return v.visit(this); } | 111 | bool accept(Visitor &v) { return v.visit(this); } |
110 | </pre> | 112 | </pre> |
111 | */ | 113 | */ |
112 | virtual bool accept(Visitor &) { return false; } | 114 | virtual bool accept(Visitor &) { return false; } |
113 | 115 | ||
114 | virtual Incidence *clone() = 0; | 116 | virtual Incidence *clone() = 0; |
115 | virtual void cloneRelations( Incidence * ); | 117 | virtual void cloneRelations( Incidence * ); |
116 | void addRelationsToList(QPtrList<Incidence> *rel); | 118 | void addRelationsToList(Q3PtrList<Incidence> *rel); |
117 | void clearRelations(); | 119 | void clearRelations(); |
118 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; | 120 | virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; |
119 | void setReadOnly( bool ); | 121 | void setReadOnly( bool ); |
120 | 122 | ||
121 | /** | 123 | /** |
122 | Recreate event. The event is made a new unique event, but already stored | 124 | Recreate event. The event is made a new unique event, but already stored |
123 | event information is preserved. Sets uniquie id, creation date, last | 125 | event information is preserved. Sets uniquie id, creation date, last |
124 | modification date and revision number. | 126 | modification date and revision number. |
@@ -172,17 +174,17 @@ class Incidence : public IncidenceBase | |||
172 | * exists. */ | 174 | * exists. */ |
173 | QString relatedToUid() const; | 175 | QString relatedToUid() const; |
174 | /** point at some other event to which the event relates */ | 176 | /** point at some other event to which the event relates */ |
175 | void setRelatedTo(Incidence *relatedTo); | 177 | void setRelatedTo(Incidence *relatedTo); |
176 | void resetRelatedTo(); | 178 | void resetRelatedTo(); |
177 | /** what event does this one relate to? */ | 179 | /** what event does this one relate to? */ |
178 | Incidence *relatedTo() const; | 180 | Incidence *relatedTo() const; |
179 | /** All events that are related to this event */ | 181 | /** All events that are related to this event */ |
180 | QPtrList<Incidence> relations() const; | 182 | Q3PtrList<Incidence> relations() const; |
181 | /** Add an event which is related to this event */ | 183 | /** Add an event which is related to this event */ |
182 | void addRelation(Incidence *); | 184 | void addRelation(Incidence *); |
183 | /** Remove event that is related to this event */ | 185 | /** Remove event that is related to this event */ |
184 | void removeRelation(Incidence *); | 186 | void removeRelation(Incidence *); |
185 | 187 | ||
186 | /** returns the list of dates which are exceptions to the recurrence rule */ | 188 | /** returns the list of dates which are exceptions to the recurrence rule */ |
187 | DateList exDates() const; | 189 | DateList exDates() const; |
188 | /** sets the list of dates which are exceptions to the recurrence rule */ | 190 | /** sets the list of dates which are exceptions to the recurrence rule */ |
@@ -197,19 +199,19 @@ class Incidence : public IncidenceBase | |||
197 | 199 | ||
198 | /** add attachment to this event */ | 200 | /** add attachment to this event */ |
199 | void addAttachment(Attachment *attachment); | 201 | void addAttachment(Attachment *attachment); |
200 | /** remove and delete a specific attachment */ | 202 | /** remove and delete a specific attachment */ |
201 | void deleteAttachment(Attachment *attachment); | 203 | void deleteAttachment(Attachment *attachment); |
202 | /** remove and delete all attachments with this mime type */ | 204 | /** remove and delete all attachments with this mime type */ |
203 | void deleteAttachments(const QString& mime); | 205 | void deleteAttachments(const QString& mime); |
204 | /** return list of all associated attachments */ | 206 | /** return list of all associated attachments */ |
205 | QPtrList<Attachment> attachments() const; | 207 | Q3PtrList<Attachment> attachments() const; |
206 | /** find a list of attachments with this mime type */ | 208 | /** find a list of attachments with this mime type */ |
207 | QPtrList<Attachment> attachments(const QString& mime) const; | 209 | Q3PtrList<Attachment> attachments(const QString& mime) const; |
208 | 210 | ||
209 | /** sets the event's status the value specified. See the enumeration | 211 | /** sets the event's status the value specified. See the enumeration |
210 | * above for possible values. */ | 212 | * above for possible values. */ |
211 | void setSecrecy(int); | 213 | void setSecrecy(int); |
212 | /** return the event's secrecy. */ | 214 | /** return the event's secrecy. */ |
213 | int secrecy() const; | 215 | int secrecy() const; |
214 | /** return the event's secrecy in string format. */ | 216 | /** return the event's secrecy in string format. */ |
215 | QString secrecyStr() const; | 217 | QString secrecyStr() const; |
@@ -230,17 +232,17 @@ class Incidence : public IncidenceBase | |||
230 | QStringList resources() const; | 232 | QStringList resources() const; |
231 | 233 | ||
232 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ | 234 | /** set the event's priority, 0 is undefined, 1 highest (decreasing order) */ |
233 | void setPriority(int priority); | 235 | void setPriority(int priority); |
234 | /** get the event's priority */ | 236 | /** get the event's priority */ |
235 | int priority() const; | 237 | int priority() const; |
236 | 238 | ||
237 | /** All alarms that are associated with this incidence */ | 239 | /** All alarms that are associated with this incidence */ |
238 | QPtrList<Alarm> alarms() const; | 240 | Q3PtrList<Alarm> alarms() const; |
239 | /** Create a new alarm which is associated with this incidence */ | 241 | /** Create a new alarm which is associated with this incidence */ |
240 | Alarm* newAlarm(); | 242 | Alarm* newAlarm(); |
241 | /** Add an alarm which is associated with this incidence */ | 243 | /** Add an alarm which is associated with this incidence */ |
242 | void addAlarm(Alarm*); | 244 | void addAlarm(Alarm*); |
243 | /** Remove an alarm that is associated with this incidence */ | 245 | /** Remove an alarm that is associated with this incidence */ |
244 | void removeAlarm(Alarm*); | 246 | void removeAlarm(Alarm*); |
245 | /** Remove all alarms that are associated with this incidence */ | 247 | /** Remove all alarms that are associated with this incidence */ |
246 | void clearAlarms(); | 248 | void clearAlarms(); |
@@ -283,18 +285,18 @@ class Incidence : public IncidenceBase | |||
283 | QString lastModifiedSubSortKey() const; | 285 | QString lastModifiedSubSortKey() const; |
284 | QString recurrenceText() const; | 286 | QString recurrenceText() const; |
285 | void setLastModifiedSubInvalid(); | 287 | void setLastModifiedSubInvalid(); |
286 | 288 | ||
287 | virtual QString durationText(); | 289 | virtual QString durationText(); |
288 | QString durationText4Time( int secs ); | 290 | QString durationText4Time( int secs ); |
289 | Recurrence *mRecurrence; | 291 | Recurrence *mRecurrence; |
290 | protected: | 292 | protected: |
291 | QPtrList<Alarm> mAlarms; | 293 | Q3PtrList<Alarm> mAlarms; |
292 | QPtrList<Incidence> mRelations; | 294 | Q3PtrList<Incidence> mRelations; |
293 | QDateTime mRecurrenceID; | 295 | QDateTime mRecurrenceID; |
294 | bool mHasRecurrenceID; | 296 | bool mHasRecurrenceID; |
295 | private: | 297 | private: |
296 | void checkCategories(); | 298 | void checkCategories(); |
297 | QString mLastModifiedSubSortKey; | 299 | QString mLastModifiedSubSortKey; |
298 | bool mHoliday, mBirthday, mAnniversary; | 300 | bool mHoliday, mBirthday, mAnniversary; |
299 | int mRevision; | 301 | int mRevision; |
300 | bool mCancelled; | 302 | bool mCancelled; |
@@ -303,17 +305,17 @@ protected: | |||
303 | QDateTime mCreated; | 305 | QDateTime mCreated; |
304 | QDateTime mLastModifiedSub; | 306 | QDateTime mLastModifiedSub; |
305 | QString mDescription; | 307 | QString mDescription; |
306 | QString mSummary; | 308 | QString mSummary; |
307 | QStringList mCategories; | 309 | QStringList mCategories; |
308 | Incidence *mRelatedTo; | 310 | Incidence *mRelatedTo; |
309 | QString mRelatedToUid; | 311 | QString mRelatedToUid; |
310 | DateList mExDates; | 312 | DateList mExDates; |
311 | QPtrList<Attachment> mAttachments; | 313 | Q3PtrList<Attachment> mAttachments; |
312 | QStringList mResources; | 314 | QStringList mResources; |
313 | bool mHasStartDate; // if todo has associated start date | 315 | bool mHasStartDate; // if todo has associated start date |
314 | 316 | ||
315 | int mSecrecy; | 317 | int mSecrecy; |
316 | int mPriority; // 1 = highest, 2 = less, etc. | 318 | int mPriority; // 1 = highest, 2 = less, etc. |
317 | 319 | ||
318 | //QPtrList<Alarm> mAlarms; | 320 | //QPtrList<Alarm> mAlarms; |
319 | 321 | ||