KCalendarCore
incidence.cpp
Go to the documentation of this file.
217 const auto [it1, it2] = std::mismatch(alarmList.cbegin(), alarmList.cend(), otherAlarmsList.cbegin(), otherAlarmsList.cend(), matchFunc);
229 const auto [at1, at2] = std::mismatch(attachmentList.cbegin(), attachmentList.cend(), otherAttachmentList.cbegin(), otherAttachmentList.cend());
245 if (!qFuzzyCompare(d->mGeoLatitude, i2->d_func()->mGeoLatitude) || !qFuzzyCompare(d->mGeoLongitude, i2->d_func()->mGeoLongitude)) {
629 QList<QDateTime> Incidence::startDateTimesForDate(const QDate &date, const QTimeZone &timeZone) const
739 auto it = std::remove_if(d->mAttachments.begin(), d->mAttachments.end(), [&mime](const Attachment &a) {
1203 return QStringList() << QStringLiteral("text/calendar") << KCalendarCore::Event::eventMimeType() << KCalendarCore::Todo::todoMimeType()
1211 out << d->mRevision << d->mDescription << d->mDescriptionIsRich << d->mSummary << d->mSummaryIsRich << d->mLocation << d->mLocationIsRich << d->mCategories
1212 << d->mResources << d->mStatusString << d->mPriority << d->mSchedulingID << d->mGeoLatitude << d->mGeoLongitude
1215 out << d->mThisAndFuture << d->mLocalOnly << d->mStatus << d->mSecrecy << (d->mRecurrence ? true : false) << (qint32)d->mAttachments.count()
1247 in >> d->mRevision >> d->mDescription >> d->mDescriptionIsRich >> d->mSummary >> d->mSummaryIsRich >> d->mLocation >> d->mLocationIsRich >> d->mCategories
1248 >> d->mResources >> d->mStatusString >> d->mPriority >> d->mSchedulingID >> d->mGeoLatitude >> d->mGeoLongitude >> hasGeo;
1250 in >> d->mThisAndFuture >> d->mLocalOnly >> status >> secrecy >> hasRecurrence >> attachmentCount >> alarmCount >> conferencesCount >> relatedToUid;
1298 QVariantList toVariantList(int size, typename QVector<T>::ConstIterator begin, typename QVector<T>::ConstIterator end)
1313 return toVariantList<Attachment>(d->mAttachments.size(), d->mAttachments.cbegin(), d->mAttachments.cend());
bool hasAltDescription() const
Returns true if the alternative (=text/html) description is available.
Definition: incidence.cpp:1174
void setNonKDECustomProperty(const QByteArray &name, const QString &value, const QString ¶meters=QString())
Create or modify a non-KDE or non-standard custom calendar property.
Definition: customproperties.cpp:138
@ FieldGeoLongitude
Field representing the longitude part of the GEO component.
Definition: incidencebase.h:178
QString categoriesStr() const
Returns the incidence categories as a comma separated string.
Definition: incidence.cpp:528
bool descriptionIsRich() const
Returns true if incidence description contains RichText; false otherwise.
Definition: incidence.cpp:436
void serialize(QDataStream &out) const override
Sub-type specific serialization.
Definition: incidence.cpp:1207
QDateTime addSecs(qint64 s) const const
void setSummary(const QString &summary, bool isRich)
Sets the incidence summary.
Definition: incidence.cpp:442
static QStringList mimeTypes()
Returns the list of possible mime types in an Incidence object: "text/calendar" "application/x-vnd....
Definition: incidence.cpp:1201
@ FieldGeoLatitude
Field representing the latitude part of the GEO component.
Definition: incidencebase.h:177
void setCreated(const QDateTime &dt)
Sets the incidence creation date/time.
Definition: incidence.cpp:335
virtual QList< QDateTime > startDateTimesForDate(const QDate &date, const QTimeZone &timeZone) const
Calculates the start date/time for all recurrences that happen at some time on the given date (might ...
Definition: incidence.cpp:629
virtual QByteArray typeStr() const =0
Prints the type of incidence as a string.
QString nonKDECustomPropertyParameters(const QByteArray &name) const
Return the parameters of a non-KDE or non-standard custom calendar property.
Definition: customproperties.cpp:171
void addAttachment(const Attachment &attachment)
Adds an attachment to the incidence.
Definition: incidence.cpp:723
QTimeZone timeZone() const const
QString nonKDECustomProperty(const QByteArray &name) const
Return the value of a non-KDE or non-standard custom calendar property.
Definition: customproperties.cpp:166
QVariant fromValue(const T &value)
QString richLocation() const
Returns the incidence location in rich text format.
Definition: incidence.cpp:1000
QVector::const_iterator cend() const const
void setRecurrenceId(const QDateTime &recurrenceId)
Set the incidences recurrenceId.
Definition: incidence.cpp:1145
Recurrence * recurrence() const
Returns the recurrence rule associated with this incidence.
Definition: incidence.cpp:576
static QLatin1String todoMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Todo.
Definition: todo.cpp:612
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
virtual void setDtStart(const QDateTime &dtStart)
Sets the incidence's starting date/time with a QDateTime.
Definition: incidencebase.cpp:262
QTime time() const const
void append(const T &value)
void update()
Call this to notify the observers after the IncidenceBase object will be changed.
Definition: incidencebase.cpp:523
QString instanceIdentifier() const
Returns a unique identifier for a specific instance of an incidence.
Definition: incidence.cpp:273
QSet< IncidenceBase::Field > dirtyFields() const
Returns a QSet with all Fields that were changed since the incidence was created or resetDirtyFields(...
Definition: incidencebase.cpp:582
void clearAttachments()
Removes all attachments and frees the memory used by them.
Definition: incidence.cpp:768
bool locationIsRich() const
Returns true if incidence location contains RichText; false otherwise.
Definition: incidence.cpp:1010
void removeNonKDECustomProperty(const QByteArray &name)
Delete a non-KDE or non-standard custom calendar property.
Definition: customproperties.cpp:152
void setRevision(int rev)
Sets the number of revisions this incidence has seen.
Definition: incidence.cpp:357
virtual IncidenceBase & assign(const IncidenceBase &other)
Provides polymorfic assignment.
Definition: incidencebase.cpp:108
QDateTime currentDateTimeUtc()
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:59
@ FieldSchedulingId
Field representing the X-KDE-LIBKCAL-ID component.
Definition: incidencebase.h:181
void setAllDay(bool allDay) override
Definition: incidence.cpp:323
bool mightBeRichText(const QString &text)
void setUid(const QString &uid)
Sets the unique id for the incidence to uid.
Definition: incidencebase.cpp:186
void setStatus(Status status)
Sets the incidence status to a standard Status value.
Definition: incidence.cpp:820
void setGeoLatitude(float geolatitude)
Set the incidence's geoLatitude.
Definition: incidence.cpp:1072
void removeAlarm(const Alarm::Ptr &alarm)
Removes the specified alarm from the incidence.
Definition: incidence.cpp:911
void setCustomStatus(const QString &status)
Sets the incidence Status to a non-standard status value.
Definition: incidence.cpp:839
virtual QList< QDateTime > startDateTimesForDateTime(const QDateTime &datetime) const
Calculates the start date/time for all recurrences that happen at the given time.
Definition: incidence.cpp:669
An abstract class that provides a common base for all calendar incidence classes.
Definition: incidencebase.h:98
void shiftTimes(const QTimeZone &oldZone, const QTimeZone &newZone) override
Shift the times of the incidence so that they appear at the same clock time as before but in a new ti...
Definition: incidence.cpp:385
bool recursAt(const QDateTime &dt) const
Returns true if the date/time specified is one at which the event will recur.
Definition: incidence.cpp:623
QStringList resources() const
Returns the incidence resources as a list of strings.
Definition: incidence.cpp:790
Q_SCRIPTABLE Q_NOREPLY void start()
void clearRecurrence()
Removes all recurrence and exception rules and dates.
Definition: incidence.cpp:590
void setAltDescription(const QString &altdescription)
Sets the incidence's alternative (=text/html) description.
Definition: incidence.cpp:1182
void updated()
Call this to notify the observers after the IncidenceBase object has changed.
Definition: incidencebase.cpp:534
QDateTime recurrenceId() const override
Returns the incidence recurrenceId.
Definition: incidence.cpp:1127
QString relatedTo(RelType relType=RelTypeParent) const
Returns a UID string for the incidence that is related to this one.
Definition: incidence.cpp:548
@ FieldRecurrence
Field representing the EXDATE, EXRULE, RDATE, and RRULE components.
Definition: incidencebase.h:170
QVector::const_iterator cbegin() const const
void recurrenceUpdated(Recurrence *recurrence) override
Observer interface for the recurrence class.
Definition: incidence.cpp:1159
bool equals(const IncidenceBase &incidence) const override
Compares this with Incidence incidence for equality.
Definition: incidence.cpp:198
bool isEmpty() const const
bool hasEnabledAlarms() const
Returns true if any of the incidence alarms are enabled; false otherwise.
Definition: incidence.cpp:932
static QLatin1String eventMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Event.
Definition: event.cpp:335
void deserialize(QDataStream &in) override
Sub-type specific deserialization.
Definition: incidence.cpp:1235
Q_SCRIPTABLE CaptureState status()
void setThisAndFuture(bool thisAndFuture)
Set to true if the exception also applies to all future occurrences.
Definition: incidence.cpp:1133
QString color() const
Returns the color, if any is defined, for this incidence.
Definition: incidence.cpp:568
virtual QDateTime endDateForStart(const QDateTime &startDt) const
Returns the end date/time of the incidence occurrence if it starts at specified date/time.
Definition: incidence.cpp:709
void setReadOnly(bool readonly) override
Set readonly state of incidence.
Definition: incidence.cpp:299
void setRelatedTo(const QString &uid, RelType relType=RelTypeParent)
Relates another incidence to this one, by UID.
Definition: incidence.cpp:534
virtual QDateTime dateTime(DateTimeRole role) const =0
Returns a date/time corresponding to the specified DateTimeRole.
Represents information related to an attachment for a Calendar Incidence.
Definition: attachment.h:46
QDate addDays(qint64 ndays) const const
void setResources(const QStringList &resources)
Sets a list of incidence resources.
Definition: incidence.cpp:777
void setGeoLongitude(float geolongitude)
Set the incidence's geoLongitude.
Definition: incidence.cpp:1100
Represents information related to a conference information of an Calendar Incidence,...
Definition: conference.h:31
QDateTime toUTC() const const
void setDtStart(const QDateTime &dt) override
Sets the incidence starting date/time.
Definition: incidence.cpp:376
void setDescription(const QString &description, bool isRich)
Sets the incidence description.
Definition: incidence.cpp:402
void setConferences(const Conference::List &conferences)
Replaces all conferences in the incidence with given conferences.
Definition: incidence.cpp:955
static QLatin1String journalMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Journal.
Definition: journal.cpp:128
QString altDescription() const
Returns the incidence alternative (=text/html) description.
Definition: incidence.cpp:1191
bool thisAndFuture() const
Returns true if the exception also applies to all future occurrences.
Definition: incidence.cpp:1139
void setLocation(const QString &location, bool isRich)
Sets the incidence location.
Definition: incidence.cpp:973
TimeList recurTimesOn(const QDate &date, const QTimeZone &timeZone) const
Returns a list of the times on the specified date at which the recurrence will occur.
Definition: recurrence.cpp:995
This class represents a recurrence rule for a calendar incidence.
Definition: recurrence.h:76
virtual void shiftTimes(const QTimeZone &oldZone, const QTimeZone &newZone)
Shift the times of the incidence so that they appear at the same clock time as before but in a new ti...
Definition: incidencebase.cpp:301
QDate date() const const
@ RoleRecurrenceStart
Role for determining the start of the recurrence.
Definition: incidencebase.h:145
bool summaryIsRich() const
Returns true if incidence summary contains RichText; false otherwise.
Definition: incidence.cpp:478
IncidenceBase & assign(const IncidenceBase &other) override
Provides polymorfic assignment.
Definition: incidence.cpp:184
int count(const T &value) const const
void setCategories(const QStringList &categories)
Sets the incidence category list.
Definition: incidence.cpp:484
virtual bool equals(const IncidenceBase &incidenceBase) const
Provides polymorfic comparison for equality.
Definition: incidencebase.cpp:133
QString richDescription() const
Returns the incidence description in rich text format.
Definition: incidence.cpp:426
void setSchedulingID(const QString &sid, const QString &uid=QString())
Set the incidence scheduling ID.
Definition: incidence.cpp:1016
QString toString(Qt::DateFormat format) const const
bool hasRecurrenceId() const
Returns true if the incidence has recurrenceId, otherwise return false.
Definition: incidence.cpp:1121
int revision() const
Returns the number of revisions this incidence has seen.
Definition: incidence.cpp:370
void setColor(const QString &colorName)
Set the incidence color, as added in RFC7986.
Definition: incidence.cpp:554
void addConference(const Conference &conference)
Adds a conference to the incidence.
Definition: incidence.cpp:946
void deleteAttachments(const QString &mime)
Removes all attachments of the specified MIME type from the incidence.
Definition: incidence.cpp:736
void setFieldDirty(IncidenceBase::Field field)
Marks Field field as dirty.
Definition: incidencebase.cpp:587
void setLastModified(const QDateTime &lm) override
Definition: incidence.cpp:291
ISODate
virtual void setAllDay(bool allDay)
Sets whether the incidence is all-day, i.e.
Definition: incidencebase.cpp:288
QString richSummary() const
Returns the incidence summary in rich text format.
Definition: incidence.cpp:468
virtual void setLastModified(const QDateTime &lm)
Sets the time the incidence was last modified to lm.
Definition: incidencebase.cpp:201
virtual bool recursOn(const QDate &date, const QTimeZone &timeZone) const
Returns true if the date specified is one on which the event will recur.
Definition: incidence.cpp:617
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:53:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:53:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.