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