KCalendarCore
incidence.cpp
Go to the documentation of this file.
131Incidence::Incidence(IncidencePrivate *p)
199 const auto [it1, it2] = std::mismatch(alarmList.cbegin(), alarmList.cend(), otherAlarmsList.cbegin(), otherAlarmsList.cend(), matchFunc);
211 const auto [at1, at2] = std::mismatch(attachmentList.cbegin(), attachmentList.cend(), otherAttachmentList.cbegin(), otherAttachmentList.cend());
611QList<QDateTime> Incidence::startDateTimesForDate(const QDate &date, const QTimeZone &timeZone) const
729 auto it = std::remove_if(d->mAttachments.begin(), d->mAttachments.end(), [&mime](const Attachment &a) {
1175 return QStringList() << QStringLiteral("text/calendar") << KCalendarCore::Event::eventMimeType() << KCalendarCore::Todo::todoMimeType()
1183 out << d->mRevision << d->mDescription << d->mDescriptionIsRich << d->mSummary << d->mSummaryIsRich << d->mLocation << d->mLocationIsRich << d->mCategories
1184 << d->mResources << d->mStatusString << d->mPriority << d->mSchedulingID << d->mGeoLatitude << d->mGeoLongitude
1219 in >> d->mRevision >> d->mDescription >> d->mDescriptionIsRich >> d->mSummary >> d->mSummaryIsRich >> d->mLocation >> d->mLocationIsRich >> d->mCategories
1220 >> d->mResources >> d->mStatusString >> d->mPriority >> d->mSchedulingID >> d->mGeoLatitude >> d->mGeoLongitude >> hasGeo;
1222 in >> d->mThisAndFuture >> d->mLocalOnly >> status >> secrecy >> hasRecurrence >> attachmentCount >> alarmCount >> conferencesCount >> relatedToUid;
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
Represents information related to an attachment for a Calendar Incidence.
Definition attachment.h:47
Represents information related to a conference information of an Calendar Incidence,...
Definition conference.h:32
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
QString nonKDECustomPropertyParameters(const QByteArray &name) const
Return the parameters of a non-KDE or non-standard custom calendar property.
Definition customproperties.cpp:171
void removeNonKDECustomProperty(const QByteArray &name)
Delete a non-KDE or non-standard custom calendar property.
Definition customproperties.cpp:152
QString nonKDECustomProperty(const QByteArray &name) const
Return the value of a non-KDE or non-standard custom calendar property.
Definition customproperties.cpp:166
static QLatin1String eventMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Event.
Definition event.cpp:335
An abstract class that provides a common base for all calendar incidence classes.
Definition incidencebase.h:99
void updated()
Call this to notify the observers after the IncidenceBase object has changed.
Definition incidencebase.cpp:518
virtual void setDtStart(const QDateTime &dtStart)
Sets the incidence's starting date/time with a QDateTime.
Definition incidencebase.cpp:246
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:285
void update()
Call this to notify the observers after the IncidenceBase object will be changed.
Definition incidencebase.cpp:507
QSet< IncidenceBase::Field > dirtyFields() const
Returns a QSet with all Fields that were changed since the incidence was created or resetDirtyFields(...
Definition incidencebase.cpp:566
virtual void setLastModified(const QDateTime &lm)
Sets the time the incidence was last modified to lm.
Definition incidencebase.cpp:185
@ FieldGeoLongitude
Field representing the longitude part of the GEO component.
Definition incidencebase.h:178
@ FieldRecurrence
Field representing the EXDATE, EXRULE, RDATE, and RRULE components.
Definition incidencebase.h:170
@ FieldGeoLatitude
Field representing the latitude part of the GEO component.
Definition incidencebase.h:177
virtual IncidenceBase & assign(const IncidenceBase &other)
Provides polymorfic assignment.
Definition incidencebase.cpp:92
virtual QByteArray typeStr() const =0
Prints the type of incidence as a string.
void setFieldDirty(IncidenceBase::Field field)
Marks Field field as dirty.
Definition incidencebase.cpp:571
@ RoleRecurrenceStart
Role for determining the start of the recurrence.
Definition incidencebase.h:145
void setUid(const QString &uid)
Sets the unique id for the incidence to uid.
Definition incidencebase.cpp:170
virtual void setAllDay(bool allDay)
Sets whether the incidence is all-day, i.e.
Definition incidencebase.cpp:272
virtual QDateTime dateTime(DateTimeRole role) const =0
Returns a date/time corresponding to the specified DateTimeRole.
virtual bool equals(const IncidenceBase &incidenceBase) const
Provides polymorfic comparison for equality.
Definition incidencebase.cpp:117
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition incidence.h:60
QString relatedTo(RelType relType=RelTypeParent) const
Returns a UID string for the incidence that is related to this one.
Definition incidence.cpp:530
void recurrenceUpdated(Recurrence *recurrence) override
Observer interface for the recurrence class.
Definition incidence.cpp:1131
void addConference(const Conference &conference)
Adds a conference to the incidence.
Definition incidence.cpp:936
void setSchedulingID(const QString &sid, const QString &uid=QString())
Set the incidence scheduling ID.
Definition incidence.cpp:1006
void setAltDescription(const QString &altdescription)
Sets the incidence's alternative (=text/html) description.
Definition incidence.cpp:1154
QString categoriesStr() const
Returns the incidence categories as a comma separated string.
Definition incidence.cpp:510
bool locationIsRich() const
Returns true if incidence location contains RichText; false otherwise.
Definition incidence.cpp:1000
void setCustomStatus(const QString &status)
Sets the incidence Status to a non-standard status value.
Definition incidence.cpp:829
void setRecurrenceId(const QDateTime &recurrenceId)
Set the incidences recurrenceId.
Definition incidence.cpp:1117
void removeAlarm(const Alarm::Ptr &alarm)
Removes the specified alarm from the incidence.
Definition incidence.cpp:901
void clearAttachments()
Removes all attachments and frees the memory used by them.
Definition incidence.cpp:758
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:611
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:655
void setLastModified(const QDateTime &lm) override
Sets the time the incidence was last modified to lm.
Definition incidence.cpp:273
bool hasAltDescription() const
Returns true if the alternative (=text/html) description is available.
Definition incidence.cpp:1146
int revision() const
Returns the number of revisions this incidence has seen.
Definition incidence.cpp:352
void setColor(const QString &colorName)
Set the incidence color, as added in RFC7986.
Definition incidence.cpp:536
void setLocation(const QString &location, bool isRich)
Sets the incidence location.
Definition incidence.cpp:963
QString richLocation() const
Returns the incidence location in rich text format.
Definition incidence.cpp:990
bool hasRecurrenceId() const
Returns true if the incidence has recurrenceId, otherwise return false.
Definition incidence.cpp:1093
void setGeoLongitude(float geolongitude)
Set the incidence's geoLongitude.
Definition incidence.cpp:1072
static QStringList mimeTypes()
Returns the list of possible mime types in an Incidence object: "text/calendar" "application/x-vnd....
Definition incidence.cpp:1173
bool hasEnabledAlarms() const
Returns true if any of the incidence alarms are enabled; false otherwise.
Definition incidence.cpp:922
void setSummary(const QString &summary, bool isRich)
Sets the incidence summary.
Definition incidence.cpp:424
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:599
void setStatus(Status status)
Sets the incidence status to a standard Status value.
Definition incidence.cpp:810
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:699
void setAllDay(bool allDay) override
Sets whether the incidence is all-day, i.e.
Definition incidence.cpp:305
QStringList resources() const
Returns the incidence resources as a list of strings.
Definition incidence.cpp:780
void setThisAndFuture(bool thisAndFuture)
Set to true if the exception also applies to all future occurrences.
Definition incidence.cpp:1105
bool descriptionIsRich() const
Returns true if incidence description contains RichText; false otherwise.
Definition incidence.cpp:418
bool recursAt(const QDateTime &dt) const
Returns true if the date/time specified is one at which the event will recur.
Definition incidence.cpp:605
void setResources(const QStringList &resources)
Sets a list of incidence resources.
Definition incidence.cpp:767
void serialize(QDataStream &out) const override
Sub-type specific serialization.
Definition incidence.cpp:1179
QString altDescription() const
Returns the incidence alternative (=text/html) description.
Definition incidence.cpp:1163
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:367
void deleteAttachments(const QString &mime)
Removes all attachments of the specified MIME type from the incidence.
Definition incidence.cpp:726
IncidenceBase & assign(const IncidenceBase &other) override
Provides polymorfic assignment.
Definition incidence.cpp:166
QString richSummary() const
Returns the incidence summary in rich text format.
Definition incidence.cpp:450
QString richDescription() const
Returns the incidence description in rich text format.
Definition incidence.cpp:408
void setReadOnly(bool readonly) override
Set readonly state of incidence.
Definition incidence.cpp:281
void setCreated(const QDateTime &dt)
Sets the incidence creation date/time.
Definition incidence.cpp:317
void clearRecurrence()
Removes all recurrence and exception rules and dates.
Definition incidence.cpp:572
bool equals(const IncidenceBase &incidence) const override
Compares this with Incidence incidence for equality.
Definition incidence.cpp:180
QDateTime recurrenceId() const override
Returns the incidence recurrenceId.
Definition incidence.cpp:1099
Recurrence * recurrence() const
Returns the recurrence rule associated with this incidence.
Definition incidence.cpp:558
QString instanceIdentifier() const
Returns a unique identifier for a specific instance of an incidence.
Definition incidence.cpp:255
void setDescription(const QString &description, bool isRich)
Sets the incidence description.
Definition incidence.cpp:384
void setRevision(int rev)
Sets the number of revisions this incidence has seen.
Definition incidence.cpp:339
bool summaryIsRich() const
Returns true if incidence summary contains RichText; false otherwise.
Definition incidence.cpp:460
void setCategories(const QStringList &categories)
Sets the incidence category list.
Definition incidence.cpp:466
void addAttachment(const Attachment &attachment)
Adds an attachment to the incidence.
Definition incidence.cpp:713
void setConferences(const Conference::List &conferences)
Replaces all conferences in the incidence with given conferences.
Definition incidence.cpp:945
void setDtStart(const QDateTime &dt) override
Sets the incidence starting date/time.
Definition incidence.cpp:358
bool thisAndFuture() const
Returns true if the exception also applies to all future occurrences.
Definition incidence.cpp:1111
void setRelatedTo(const QString &uid, RelType relType=RelTypeParent)
Relates another incidence to this one, by UID.
Definition incidence.cpp:516
void deserialize(QDataStream &in) override
Sub-type specific deserialization.
Definition incidence.cpp:1207
QString color() const
Returns the color, if any is defined, for this incidence.
Definition incidence.cpp:550
static QLatin1String journalMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Journal.
Definition journal.cpp:128
This class represents a recurrence rule for a calendar incidence.
Definition recurrence.h:77
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:977
static QLatin1String todoMimeType()
Returns the Akonadi specific sub MIME type of a KCalendarCore::Todo.
Definition todo.cpp:612
Q_SCRIPTABLE CaptureState status()
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the API for handling calendar data and defines the Incidence class.
QDate addDays(qint64 ndays) const const
bool isValid(int year, int month, int day)
QDateTime addSecs(qint64 s) const const
QDateTime currentDateTimeUtc()
QDate date() const const
qint64 daysTo(const QDateTime &other) const const
bool isValid() const const
QTime time() const const
QTimeZone timeZone() const const
QString toString(QStringView format, QCalendar cal) const const
QDateTime toUTC() const const
void append(QList< T > &&value)
const_iterator cbegin() const const
const_iterator cend() const const
qsizetype count() const const
const_iterator cbegin() const const
const_iterator cend() const const
void clear()
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool mightBeRichText(const QString &text)
ISODate
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.