KCalendarCore

incidencebase.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <[email protected]>
5  SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <[email protected]>
6  SPDX-FileCopyrightText: 2005 Rafal Rzepecki <[email protected]>
7  SPDX-FileCopyrightText: 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
8  SPDX-FileContributor: Alvaro Manera <[email protected]>
9 
10  SPDX-License-Identifier: LGPL-2.0-or-later
11 */
12 /**
13  @file
14  This file is part of the API for handling calendar data and
15  defines the IncidenceBase class.
16 
17  @author Cornelius Schumacher <[email protected]>
18  @author Reinhold Kainhofer <[email protected]>
19  @author Rafal Rzepecki <[email protected]>
20 
21  @glossary @anchor incidence @b incidence:
22  General term for a calendar component.
23  Examples are events, to-dos, and journals.
24 
25  @glossary @anchor event @b event:
26  An @ref incidence that has a start and end time, typically representing some
27  occurrence of social or personal importance. May be recurring.
28  Examples are appointments, meetings, or holidays.
29 
30  @glossary @anchor to-do @b to-do:
31  An @ref incidence that has an optional start time and an optional due time
32  typically representing some undertaking to be performed. May be recurring.
33  Examples are "fix the bug" or "pay the bills".
34 
35  @glossary @anchor todo @b todo:
36  See @ref to-do.
37 
38  @glossary @anchor journal @b journal:
39  An @ref incidence with a start date that represents a diary or daily record
40  of one's activities. May @b not be recurring.
41 */
42 
43 #ifndef KCALCORE_INCIDENCEBASE_H
44 #define KCALCORE_INCIDENCEBASE_H
45 
46 #include "attendee.h"
47 #include "customproperties.h"
48 #include "duration.h"
49 #include "person.h"
50 
51 #include <QDataStream>
52 #include <QDateTime>
53 #include <QSet>
54 #include <QSharedPointer>
55 #include <QUrl>
56 
57 class QUrl;
58 class QDate;
59 class QTimeZone;
60 
61 namespace KCalendarCore
62 {
63 /** List of dates */
65 
66 /** List of times */
68 
69 class Event;
70 class Todo;
71 class Journal;
72 class FreeBusy;
73 class Visitor;
74 
75 /**
76  @brief
77  An abstract class that provides a common base for all calendar incidence
78  classes.
79 
80  define: organizer (person)
81  define: uid (same as the attendee uid?)
82 
83  Several properties are not allowed for VFREEBUSY objects (see rfc:2445),
84  so they are not in IncidenceBase. The hierarchy is:
85 
86  IncidenceBase
87  + FreeBusy
88  + Incidence
89  + Event
90  + Todo
91  + Journal
92 
93  So IncidenceBase contains all properties that are common to all classes,
94  and Incidence contains all additional properties that are common to
95  Events, Todos and Journals, but are not allowed for FreeBusy entries.
96 */
97 class KCALENDARCORE_EXPORT IncidenceBase : public CustomProperties
98 {
99  Q_GADGET
100  Q_PROPERTY(QString uid READ uid WRITE setUid)
101  Q_PROPERTY(QDateTime lastModified READ lastModified WRITE setLastModified)
102  Q_PROPERTY(QDateTime dtStart READ dtStart WRITE setDtStart)
103  Q_PROPERTY(bool allDay READ allDay WRITE setAllDay)
104  Q_PROPERTY(KCalendarCore::Person organizer READ organizer WRITE setOrganizer)
105  Q_PROPERTY(QVariantList attendees READ attendeesVariant)
106 
107 public:
108  /**
109  A shared pointer to an IncidenceBase.
110  */
112 
113  /**
114  The different types of incidences, per RFC2445.
115  @see type(), typeStr()
116  */
118  TypeEvent = 0, /**< Type is an event */
119  TypeTodo, /**< Type is a to-do */
120  TypeJournal, /**< Type is a journal */
121  TypeFreeBusy, /**< Type is a free/busy */
122  TypeUnknown, /**< Type unknown */
123  };
124 
125  /**
126  The different types of incidence date/times roles.
127  @see dateTime()
128  */
130  RoleAlarmStartOffset = 0, /**< Role for an incidence alarm's starting offset date/time */
131  RoleAlarmEndOffset, /**< Role for an incidence alarm's ending offset date/time */
132  RoleSort, /**< Role for an incidence's date/time used when sorting */
133  RoleCalendarHashing, /**< Role for looking up an incidence in a Calendar */
134  RoleStartTimeZone, /**< Role for determining an incidence's starting timezone */
135  RoleEndTimeZone, /**< Role for determining an incidence's ending timezone */
136  RoleEndRecurrenceBase,
137  RoleEnd, /**< Role for determining an incidence's dtEnd, will return
138  an invalid QDateTime if the incidence does not support dtEnd */
139  RoleDisplayEnd, /**< Role used for display purposes, represents the end boundary
140  if an incidence supports dtEnd */
141  RoleAlarm, /**< Role for determining the date/time of the first alarm.
142  Returns invalid time if the incidence doesn't have any alarm */
143  RoleRecurrenceStart, /**< Role for determining the start of the recurrence.
144  Currently that's DTSTART for an event and DTDUE for a to-do.
145  (NOTE: If the incidence is a to-do, recurrence should be
146  calculated having DTSTART for a reference, not DT-DUE.
147  This is one place KCalendarCore isn't compliant with RFC2445) */
148  RoleDisplayStart, /**< Role for display purposes, represents the start boundary of an
149  incidence. To-dos return dtDue here, for historical reasons */
150  RoleDnD, /**< Role for determining new start and end dates after a DnD */
151  };
152 
153  /**
154  The different types of incidence fields.
155  */
156  enum Field {
157  FieldDtStart, ///< Field representing the DTSTART component.
158  FieldDtEnd, ///< Field representing the DTEND component.
159  FieldLastModified, ///< Field representing the LAST-MODIFIED component.
160  FieldDescription, ///< Field representing the DESCRIPTION component.
161  FieldSummary, ///< Field representing the SUMMARY component.
162  FieldLocation, ///< Field representing the LOCATION component.
163  FieldCompleted, ///< Field representing the COMPLETED component.
164  FieldPercentComplete, ///< Field representing the PERCENT-COMPLETE component.
165  FieldDtDue, ///< Field representing the DUE component.
166  FieldCategories, ///< Field representing the CATEGORIES component.
167  FieldRelatedTo, ///< Field representing the RELATED-TO component.
168  FieldRecurrence, ///< Field representing the EXDATE, EXRULE, RDATE, and RRULE components.
169  FieldAttachment, ///< Field representing the ATTACH component.
170  FieldSecrecy, ///< Field representing the CLASS component.
171  FieldStatus, ///< Field representing the STATUS component.
172  FieldTransparency, ///< Field representing the TRANSPARENCY component.
173  FieldResources, ///< Field representing the RESOURCES component.
174  FieldPriority, ///< Field representing the PRIORITY component.
175  FieldGeoLatitude, ///< Field representing the latitude part of the GEO component.
176  FieldGeoLongitude, ///< Field representing the longitude part of the GEO component.
177  FieldRecurrenceId, ///< Field representing the RECURRENCE-ID component.
178  FieldAlarms, ///< Field representing the VALARM component.
179  FieldSchedulingId, ///< Field representing the X-KDE-LIBKCAL-ID component.
180  FieldAttendees, ///< Field representing the ATTENDEE component.
181  FieldOrganizer, ///< Field representing the ORGANIZER component.
182  FieldCreated, ///< Field representing the CREATED component.
183  FieldRevision, ///< Field representing the SEQUENCE component.
184  FieldDuration, ///< Field representing the DURATION component.
185  FieldContact, ///< Field representing the CONTACT component.
186  FieldComment, ///< Field representing the COMMENT component.
187  FieldUid, ///< Field representing the UID component.
188  FieldUnknown, ///< Something changed. Always set when you use the assignment operator.
189  FieldUrl, ///< Field representing the URL component.
190  FieldConferences, ///< Field representing the CONFERENCE component.
191  FieldColor, ///< Field representing the COLOR component.
192  };
193 
194  /**
195  The IncidenceObserver class.
196  */
197  class KCALENDARCORE_EXPORT IncidenceObserver
198  {
199  public:
200  /**
201  Destroys the IncidenceObserver.
202  */
203  virtual ~IncidenceObserver();
204 
205  /**
206  The IncidenceObserver interface.
207  This function is called before any changes are made.
208  @param uid is the string containing the incidence @ref uid.
209  @param recurrenceId is possible recurrenceid of incidence.
210  */
211  virtual void incidenceUpdate(const QString &uid, const QDateTime &recurrenceId) = 0;
212 
213  /**
214  The IncidenceObserver interface.
215  This function is called after changes are completed.
216  @param uid is the string containing the incidence @ref uid.
217  @param recurrenceId is possible recurrenceid of incidence.
218  */
219  virtual void incidenceUpdated(const QString &uid, const QDateTime &recurrenceId) = 0;
220  };
221 
222  /**
223  Constructs an empty IncidenceBase.
224  */
225  IncidenceBase();
226 
227  /**
228  Destroys the IncidenceBase.
229  */
230  ~IncidenceBase() override;
231 
232  /**
233  Assignment operator.
234  All data belonging to derived classes are also copied. @see assign().
235  The caller guarantees that both types match.
236 
237  @code
238  if ( i1.type() == i2.type() ) {
239  i1 = i2;
240  } else {
241  qCDebug(KCALCORE_LOG) << "Invalid assignment!";
242  }
243  @endcode
244 
245  Dirty field FieldUnknown will be set.
246 
247  @param other is the IncidenceBase to assign.
248  */
249  IncidenceBase &operator=(const IncidenceBase &other);
250 
251  /**
252  Compares this with IncidenceBase @p ib for equality.
253  All data belonging to derived classes are also compared. @see equals().
254  @param ib is the IncidenceBase to compare against.
255  @return true if the incidences are equal; false otherwise.
256  */
257  bool operator==(const IncidenceBase &ib) const;
258 
259  /**
260  Compares this with IncidenceBase @p ib for inequality.
261  @param ib is the IncidenceBase to compare against.
262  @return true if the incidences are /not/ equal; false otherwise.
263  */
264  bool operator!=(const IncidenceBase &ib) const;
265 
266  /**
267  Accept IncidenceVisitor. A class taking part in the visitor mechanism
268  has to provide this implementation:
269  <pre>
270  bool accept(Visitor &v) { return v.visit(this); }
271  </pre>
272 
273  @param v is a reference to a Visitor object.
274  @param incidence is a valid IncidenceBase object for visting.
275  */
276  virtual bool accept(Visitor &v, const IncidenceBase::Ptr &incidence);
277 
278  /**
279  Returns the incidence type.
280  */
281  virtual IncidenceType type() const = 0;
282 
283  /**
284  Prints the type of incidence as a string.
285  */
286  virtual QByteArray typeStr() const = 0;
287 
288  /**
289  Sets the unique id for the incidence to @p uid.
290  @param uid is the string containing the incidence @ref uid.
291  @see uid()
292  */
293  void setUid(const QString &uid);
294 
295  /**
296  Returns the unique id (@ref uid) for the incidence.
297  @see setUid()
298  */
299  Q_REQUIRED_RESULT QString uid() const;
300 
301  /**
302  Returns the uri for the incidence, of form urn:x-ical:<uid>
303  */
304  Q_REQUIRED_RESULT QUrl uri() const;
305 
306  /**
307  Sets the time the incidence was last modified to @p lm.
308  It is stored as a UTC date/time.
309 
310  @param lm is the QDateTime when the incidence was last modified.
311 
312  @see lastModified()
313  */
314  virtual void setLastModified(const QDateTime &lm);
315 
316  /**
317  Returns the time the incidence was last modified.
318  @see setLastModified()
319  */
320  Q_REQUIRED_RESULT QDateTime lastModified() const;
321 
322  /**
323  Sets the organizer for the incidence.
324 
325  @param organizer is a non-null Person to use as the incidence @ref organizer.
326  @see organizer(), setOrganizer(const QString &)
327  */
328  void setOrganizer(const Person &organizer);
329 
330  /**
331  Sets the incidence organizer to any string @p organizer.
332 
333  @param organizer is a string to use as the incidence @ref organizer.
334  @see organizer(), setOrganizer(const Person &)
335  */
336  void setOrganizer(const QString &organizer);
337 
338  /**
339  Returns the Person associated with this incidence.
340  If no Person was set through setOrganizer(), a default Person()
341  is returned.
342  @see setOrganizer(const QString &), setOrganizer(const Person &)
343  */
344  Person organizer() const;
345 
346  /**
347  Sets readonly status.
348 
349  @param readOnly if set, the incidence is read-only; else the incidence
350  can be modified.
351  @see isReadOnly().
352  */
353  virtual void setReadOnly(bool readOnly);
354 
355  /**
356  Returns true the object is read-only; false otherwise.
357  @see setReadOnly()
358  */
359  Q_REQUIRED_RESULT bool isReadOnly() const;
360 
361  /**
362  Sets the incidence's starting date/time with a QDateTime.
363  The incidence's all-day status is set according to whether @p dtStart
364  is a date/time (not all-day) or date-only (all-day).
365 
366  @param dtStart is the incidence start date/time.
367  @see dtStart().
368  */
369  virtual void setDtStart(const QDateTime &dtStart);
370 
371  /**
372  Returns an incidence's starting date/time as a QDateTime.
373  @see setDtStart().
374  */
375  virtual QDateTime dtStart() const;
376 
377  /**
378  Sets the incidence duration.
379 
380  @param duration the incidence duration
381 
382  @see duration()
383  */
384  virtual void setDuration(const Duration &duration);
385 
386  /**
387  Returns the length of the incidence duration.
388  @see setDuration()
389  */
390  Q_REQUIRED_RESULT Duration duration() const;
391 
392  /**
393  Sets if the incidence has a duration.
394  @param hasDuration true if the incidence has a duration; false otherwise.
395  @see hasDuration()
396  */
397  void setHasDuration(bool hasDuration);
398 
399  /**
400  Returns true if the incidence has a duration; false otherwise.
401  @see setHasDuration()
402  */
403  Q_REQUIRED_RESULT bool hasDuration() const;
404 
405  /**
406  Returns true or false depending on whether the incidence is all-day.
407  i.e. has a date but no time attached to it.
408  @see setAllDay()
409  */
410  Q_REQUIRED_RESULT bool allDay() const;
411 
412  /**
413  Sets whether the incidence is all-day, i.e. has a date but no time
414  attached to it.
415 
416  @param allDay sets whether the incidence is all-day.
417 
418  @see allDay()
419  */
420  virtual void setAllDay(bool allDay);
421 
422  /**
423  Shift the times of the incidence so that they appear at the same clock
424  time as before but in a new time zone. The shift is done from a viewing
425  time zone rather than from the actual incidence time zone.
426 
427  For example, shifting an incidence whose start time is 09:00
428  America/New York, using an old viewing time zone (@p oldSpec)
429  of Europe/London, to a new time zone (@p newSpec) of Europe/Paris,
430  will result in the time being shifted from 14:00 (which is the London
431  time of the incidence start) to 14:00 Paris time.
432 
433  @param oldZone the time zone which provides the clock times
434  @param newZone the new time zone
435  */
436  virtual void shiftTimes(const QTimeZone &oldZone, const QTimeZone &newZone);
437 
438  /**
439  Adds a comment to the incidence. Does not add a linefeed character; simply
440  appends the text as specified.
441 
442  @param comment is the QString containing the comment to add.
443  @see removeComment().
444  */
445  void addComment(const QString &comment);
446 
447  /**
448  Removes a comment from the incidence. Removes the first comment whose
449  string is an exact match for the specified string in @p comment.
450 
451  @param comment is the QString containing the comment to remove.
452  @return true if match found, false otherwise.
453  @see addComment().
454  */
455  Q_REQUIRED_RESULT bool removeComment(const QString &comment);
456 
457  /**
458  Deletes all incidence comments.
459  */
460  void clearComments();
461 
462  /**
463  Returns all incidence comments as a list of strings.
464  */
465  Q_REQUIRED_RESULT QStringList comments() const;
466 
467  /**
468  Adds a contact to thieincidence. Does not add a linefeed character; simply
469  appends the text as specified.
470 
471  @param contact is the QString containing the contact to add.
472  @see removeContact().
473  */
474  void addContact(const QString &contact);
475 
476  /**
477  Removes a contact from the incidence. Removes the first contact whose
478  string is an exact match for the specified string in @p contact.
479 
480  @param contact is the QString containing the contact to remove.
481  @return true if match found, false otherwise.
482  @see addContact().
483  */
484  Q_REQUIRED_RESULT bool removeContact(const QString &contact);
485 
486  /**
487  Deletes all incidence contacts.
488  */
489  void clearContacts();
490 
491  /**
492  Returns all incidence contacts as a list of strings.
493  */
494  Q_REQUIRED_RESULT QStringList contacts() const;
495 
496  /**
497  Add Attendee to this incidence.
498 
499  @param attendee the attendee to add
500  @param doUpdate If true the Observers are notified, if false they are not.
501  */
502  void addAttendee(const Attendee &attendee, bool doUpdate = true);
503 
504  /**
505  Removes all attendees from the incidence.
506  */
507  void clearAttendees();
508 
509  /**
510  Set the attendees of this incidence.
511  This replaces all previously set attendees, unlike addAttendee.
512 
513  @param attendees A list of attendees.
514  @param doUpdate If true the Observers are notified, if false they are not.
515  */
516  void setAttendees(const Attendee::List &attendees, bool doUpdate = true);
517 
518  /**
519  Returns a list of incidence attendees.
520  All pointers in the list are valid.
521  */
522  Q_REQUIRED_RESULT Attendee::List attendees() const;
523 
524  /**
525  Returns the number of incidence attendees.
526  */
527  Q_REQUIRED_RESULT int attendeeCount() const;
528 
529  /**
530  Returns the attendee with the specified email address.
531 
532  @param email is a QString containing an email address of the
533  form "FirstName LastName <emailaddress>".
534  @see attendeeByMails(), attendeesByUid().
535  */
536  Attendee attendeeByMail(const QString &email) const;
537 
538  /**
539  Returns the first incidence attendee with one of the specified
540  email addresses.
541 
542  @param emails is a list of QStrings containing email addresses of the
543  form "FirstName LastName <emailaddress>".
544  @param email is a QString containing a single email address to search
545  in addition to the list specified in @p emails.
546  @see attendeeByMail(), attendeesByUid().
547  */
548  Attendee attendeeByMails(const QStringList &emails, const QString &email = QString()) const;
549 
550  /**
551  Returns the incidence attendee with the specified attendee @acronym UID.
552 
553  @param uid is a QString containing an attendee @acronym UID.
554  @see attendeeByMail(), attendeeByMails().
555  */
556  Attendee attendeeByUid(const QString &uid) const;
557 
558  /**
559  Sets the incidences url.
560 
561  This property can be used to point to a more dynamic rendition of the incidence.
562  I.e. a website related to the incidence.
563 
564  @param url of the incience.
565  @see url()
566  @since 4.12
567  */
568  void setUrl(const QUrl &url);
569 
570  /**
571  Returns the url.
572  @return incidences url value
573  @see setUrl()
574  @since 4.12
575  */
576  Q_REQUIRED_RESULT QUrl url() const;
577 
578  /**
579  Register observer. The observer is notified when the observed object
580  changes.
581 
582  @param observer is a pointer to an IncidenceObserver object that will be
583  watching this incidence.
584  @see unRegisterObserver()
585  */
586  void registerObserver(IncidenceObserver *observer);
587 
588  /**
589  Unregister observer. It isn't notified anymore about changes.
590 
591  @param observer is a pointer to an IncidenceObserver object that will be
592  watching this incidence.
593  @see registerObserver().
594  */
595  void unRegisterObserver(IncidenceObserver *observer);
596 
597  /**
598  Call this to notify the observers after the IncidenceBase object will be
599  changed.
600  */
601  void update();
602 
603  /**
604  Call this to notify the observers after the IncidenceBase object has
605  changed.
606  */
607  void updated();
608 
609  /**
610  Call this when a group of updates is going to be made. This suppresses
611  change notifications until endUpdates() is called, at which point
612  updated() will automatically be called.
613  */
614  void startUpdates();
615 
616  /**
617  Call this when a group of updates is complete, to notify observers that
618  the instance has changed. This should be called in conjunction with
619  startUpdates().
620  */
621  void endUpdates();
622 
623  /**
624  Returns a date/time corresponding to the specified DateTimeRole.
625  @param role is a DateTimeRole.
626  */
627  virtual QDateTime dateTime(DateTimeRole role) const = 0;
628 
629  /**
630  Sets the date/time corresponding to the specified DateTimeRole.
631  @param dateTime is QDateTime value to set.
632  @param role is a DateTimeRole.
633  */
634  virtual void setDateTime(const QDateTime &dateTime, DateTimeRole role) = 0;
635 
636  /**
637  Returns the Akonadi specific sub MIME type of a KCalendarCore::IncidenceBase item,
638  e.g. getting "application/x-vnd.akonadi.calendar.event" for a KCalendarCore::Event.
639  */
640  virtual QLatin1String mimeType() const = 0;
641 
642  /**
643  Returns the incidence recurrenceId.
644  @return incidences recurrenceId value
645  @see setRecurrenceId().
646  */
647  virtual QDateTime recurrenceId() const;
648 
649  /**
650  Returns a QSet with all Fields that were changed since the incidence was created
651  or resetDirtyFields() was called.
652 
653  @see resetDirtyFields()
654  */
655  QSet<IncidenceBase::Field> dirtyFields() const;
656 
657  /**
658  Sets which fields are dirty.
659  @see dirtyFields()
660  @since 4.8
661  */
662  void setDirtyFields(const QSet<IncidenceBase::Field> &);
663 
664  /**
665  Resets dirty fields.
666  @see dirtyFields()
667  */
668  void resetDirtyFields();
669 
670  /**
671  * Constant that identifies KCalendarCore data in a binary stream.
672  *
673  * @since 4.12
674  */
675  Q_REQUIRED_RESULT static quint32 magicSerializationIdentifier();
676 
677 protected:
678  /**
679  Marks Field @p field as dirty.
680  @param field is the Field type to mark as dirty.
681  @see dirtyFields()
682  */
683  void setFieldDirty(IncidenceBase::Field field);
684 
685  /**
686  @copydoc
687  CustomProperties::customPropertyUpdate()
688  */
689  void customPropertyUpdate() override;
690 
691  /**
692  @copydoc
693  CustomProperties::customPropertyUpdated()
694  */
695  void customPropertyUpdated() override;
696 
697  /**
698  Constructs an IncidenceBase as a copy of another IncidenceBase object.
699  @param ib is the IncidenceBase to copy.
700  */
701  IncidenceBase(const IncidenceBase &ib);
702 
703  /**
704  Provides polymorfic comparison for equality.
705  Only called by IncidenceBase::operator==() which guarantees that
706  @p incidenceBase is of the right type.
707  @param incidenceBase is the IncidenceBase to compare against.
708  @return true if the incidences are equal; false otherwise.
709  */
710  virtual bool equals(const IncidenceBase &incidenceBase) const;
711 
712  /**
713  Provides polymorfic assignment.
714  @param other is the IncidenceBase to assign.
715  */
716  virtual IncidenceBase &assign(const IncidenceBase &other);
717 
718  /**
719  * Sub-type specific serialization.
720  */
721  virtual void serialize(QDataStream &out) const;
722  /**
723  * Sub-type specific deserialization.
724  */
725  virtual void deserialize(QDataStream &in);
726 
727  enum VirtualHook {};
728 
729  /**
730  Standard trick to add virtuals later.
731 
732  @param id is any integer unique to this class which we will use to identify the method
733  to be called.
734  @param data is a pointer to some glob of data, typically a struct.
735  */
736  virtual void virtual_hook(VirtualHook id, void *data) = 0;
737 
738  /**
739  Identifies a read-only incidence.
740  */
741  bool mReadOnly;
742 
743 private:
744  //@cond PRIVATE
745  class Private;
746  Private *const d;
747 
748  Q_DECL_HIDDEN QVariantList attendeesVariant() const;
749  //@endcond
750 
751  friend KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const KCalendarCore::IncidenceBase::Ptr &);
752 
753  friend KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &stream, KCalendarCore::IncidenceBase::Ptr &);
754 };
755 
756 /**
757  * Incidence serializer.
758  *
759  * @since 4.12
760  */
761 KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &out, const KCalendarCore::IncidenceBase::Ptr &);
762 
763 /**
764  * Incidence deserializer.
765  *
766  * @since 4.12
767  */
769 }
770 
771 Q_DECLARE_METATYPE(KCalendarCore::IncidenceBase *)
772 Q_DECLARE_METATYPE(KCalendarCore::IncidenceBase::Ptr)
773 
774 #endif
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Alarm serializer.
Definition: alarm.cpp:821
This file is part of the API for handling calendar data and defines the Attendee class.
Field representing the CREATED component.
Role for determining new start and end dates after a DnD.
A class to manage custom calendar properties.
This class provides the interface for a visitor of calendar components.
Definition: visitor.h:30
This file is part of the API for handling calendar data and defines the CustomProperties class...
Represents a person, by name and email address.
Definition: person.h:37
Field representing the COMPLETED component.
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition: attendee.h:44
Provides a Journal in the sense of RFC2445.
Definition: journal.h:29
Field representing the URL component.
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Alarm deserializer.
Definition: alarm.cpp:834
Provides information about the free/busy time of a calendar.
Definition: freebusy.h:39
Field representing the EXDATE, EXRULE, RDATE, and RRULE components.
Field
The different types of incidence fields.
Field representing the PRIORITY component.
Field representing the STATUS component.
Field representing the RECURRENCE-ID component.
DateTimeRole
The different types of incidence date/times roles.
Field representing the TRANSPARENCY component.
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:97
Role for an incidence&#39;s date/time used when sorting.
This file is part of the API for handling calendar data and defines the Person class.
Field representing the X-KDE-LIBKCAL-ID component.
Represents a span of time measured in seconds or days.
Definition: duration.h:43
Role for determining an incidence&#39;s starting timezone.
Field representing the CATEGORIES component.
Role for determining an incidence&#39;s ending timezone.
This class provides an Event in the sense of RFC2445.
Definition: event.h:29
Field representing the PERCENT-COMPLETE component.
Role for looking up an incidence in a Calendar.
Something changed. Always set when you use the assignment operator.
Provides a To-do in the sense of RFC2445.
Definition: todo.h:30
IncidenceType
The different types of incidences, per RFC2445.
Field representing the DUE component.
Field representing the RESOURCES component.
Field representing the CONTACT component.
Field representing the longitude part of the GEO component.
Field representing the ORGANIZER component.
Field representing the DTEND component.
Field representing the ATTENDEE component.
Field representing the COMMENT component.
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Field representing the DTSTART component.
Field representing the UID component.
This file is part of the API for handling calendar data and defines the Duration class.
Field representing the LOCATION component.
Field representing the COLOR component.
Field representing the ATTACH component.
Field representing the RELATED-TO component.
Field representing the DESCRIPTION component.
Field representing the latitude part of the GEO component.
Field representing the VALARM component.
Field representing the CLASS component.
QList< QDate > DateList
List of dates.
Definition: incidencebase.h:64
Field representing the SEQUENCE component.
Field representing the DURATION component.
Field representing the CONFERENCE component.
Field representing the LAST-MODIFIED component.
Field representing the SUMMARY component.
Namespace for all KCalendarCore types.
Definition: alarm.h:36
Role for an incidence alarm&#39;s ending offset date/time.
QList< QDateTime > DateTimeList
List of times.
Definition: incidencebase.h:67
bool mReadOnly
Identifies a read-only incidence.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu May 6 2021 22:50:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.