KCalendarCore
incidencebase.cpp
Go to the documentation of this file.
149 auto [it1, it2] = std::mismatch(list.cbegin(), list.cend(), otherList.cbegin(), otherList.cend());
445 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&email](const Attendee &att) {
459 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&mails](const Attendee &a) {
468 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&uid](const Attendee &a) {
623 QDataStream &KCalendarCore::operator<<(QDataStream &out, const KCalendarCore::IncidenceBase::Ptr &i)
629 out << static_cast<quint32>(KCALCORE_MAGIC_NUMBER); // Magic number to identify KCalendarCore data
636 out << i->organizer() << i->d_ptr->mUid << i->d_ptr->mDuration << i->d_ptr->mAllDay << i->d_ptr->mHasDuration << i->d_ptr->mComments << i->d_ptr->mContacts
679 in >> i->d_ptr->mOrganizer >> i->d_ptr->mUid >> i->d_ptr->mDuration >> i->d_ptr->mAllDay >> i->d_ptr->mHasDuration >> i->d_ptr->mComments >> i->d_ptr->mContacts >> attendeeCount
704 std::transform(d_ptr->mAttendees.begin(), d_ptr->mAttendees.end(), std::back_inserter(l), [](const Attendee &a) {
void append(const T &value)
void addContact(const QString &contact)
Adds a contact to thieincidence.
Definition: incidencebase.cpp:344
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Alarm serializer.
Definition: alarm.cpp:820
Represents a span of time measured in seconds or days.
Definition: duration.h:43
virtual void deserialize(QDataStream &in)
Sub-type specific deserialization.
Definition: incidencebase.cpp:607
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition: attendee.h:44
QTimeZone timeZone() const const
CaseInsensitive
QVector::const_iterator cend() const const
virtual void setDtStart(const QDateTime &dtStart)
Sets the incidence's starting date/time with a QDateTime.
Definition: incidencebase.cpp:262
int attendeeCount() const
Returns the number of incidence attendees.
Definition: incidencebase.cpp:403
QTime time() const const
virtual QDateTime recurrenceId() const
Returns the incidence recurrenceId.
Definition: incidencebase.cpp:572
void update()
Call this to notify the observers after the IncidenceBase object will be changed.
Definition: incidencebase.cpp:523
void registerObserver(IncidenceObserver *observer)
Register observer.
Definition: incidencebase.cpp:511
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 addAttendee(const Attendee &attendee, bool doUpdate=true)
Add Attendee to this incidence.
Definition: incidencebase.cpp:380
KCALENDARCORE_EXPORT bool identical(QDateTime, QDateTime)
Compare two QDateTimes for extended equality.
Definition: incidencebase.cpp:618
virtual IncidenceBase & assign(const IncidenceBase &other)
Provides polymorfic assignment.
Definition: incidencebase.cpp:108
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Alarm deserializer.
Definition: alarm.cpp:833
void startUpdates()
Call this when a group of updates is going to be made.
Definition: incidencebase.cpp:546
QStringList comments() const
Returns all incidence comments as a list of strings.
Definition: incidencebase.cpp:339
IncidenceBase & operator=(const IncidenceBase &other)
Assignment operator.
Definition: incidencebase.cpp:96
void setUid(const QString &uid)
Sets the unique id for the incidence to uid.
Definition: incidencebase.cpp:186
static quint32 magicSerializationIdentifier()
Constant that identifies KCalendarCore data in a binary stream.
Definition: incidencebase.cpp:613
The IncidenceObserver class.
Definition: incidencebase.h:199
void setOrganizer(const Person &organizer)
Sets the organizer for the incidence.
Definition: incidencebase.cpp:222
void setHasDuration(bool hasDuration)
Sets if the incidence has a duration.
Definition: incidencebase.cpp:488
bool hasDuration() const
Returns true if the incidence has a duration; false otherwise.
Definition: incidencebase.cpp:493
static Person fromFullName(const QString &fullName)
Constructs a person with name and email address taken from fullName.
Definition: person.cpp:362
bool isReadOnly() const
Returns true the object is read-only; false otherwise.
Definition: incidencebase.cpp:257
An abstract class that provides a common base for all calendar incidence classes.
Definition: incidencebase.h:98
CustomProperties & operator=(const CustomProperties &other)
Assignment operator.
Definition: customproperties.cpp:78
int size() const const
void customPropertyUpdated() override
Definition: incidencebase.cpp:567
bool removeComment(const QString &comment)
Removes a comment from the incidence.
Definition: incidencebase.cpp:318
virtual bool accept(Visitor &v, const IncidenceBase::Ptr &incidence)
Accept IncidenceVisitor.
Definition: incidencebase.cpp:179
QUrl uri() const
Returns the uri for the incidence, of form urn:x-ical:<uid>
Definition: incidencebase.cpp:592
void updated()
Call this to notify the observers after the IncidenceBase object has changed.
Definition: incidencebase.cpp:534
virtual void setDuration(const Duration &duration)
Sets the incidence duration.
Definition: incidencebase.cpp:474
QVector::const_iterator cbegin() const const
void addComment(const QString &comment)
Adds a comment to the incidence.
Definition: incidencebase.cpp:310
bool isEmpty() const const
bool setHMS(int h, int m, int s, int ms)
bool removeContact(const QString &contact)
Removes a contact from the incidence.
Definition: incidencebase.cpp:354
QList::const_iterator cend() const const
void setAttendees(const Attendee::List &attendees, bool doUpdate=true)
Set the attendees of this incidence.
Definition: incidencebase.cpp:408
This class provides the interface for a visitor of calendar components.
Definition: visitor.h:30
int hour() const const
QDateTime toUTC() const const
unsigned int version()
int second() const const
Qt::TimeSpec timeSpec() const const
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
bool operator==(const IncidenceBase &ib) const
Compares this with IncidenceBase ib for equality.
Definition: incidencebase.cpp:118
QList::const_iterator cbegin() const const
@ FieldUnknown
Something changed. Always set when you use the assignment operator.
Definition: incidencebase.h:190
QStringList contacts() const
Returns all incidence contacts as a list of strings.
Definition: incidencebase.cpp:375
bool isValid() const const
Attendee attendeeByMails(const QStringList &emails, const QString &email=QString()) const
Returns the first incidence attendee with one of the specified email addresses.
Definition: incidencebase.cpp:452
virtual void serialize(QDataStream &out) const
Sub-type specific serialization.
Definition: incidencebase.cpp:602
void unRegisterObserver(IncidenceObserver *observer)
Unregister observer.
Definition: incidencebase.cpp:518
int size() const const
virtual bool equals(const IncidenceBase &incidenceBase) const
Provides polymorfic comparison for equality.
Definition: incidencebase.cpp:133
void setDirtyFields(const QSet< IncidenceBase::Field > &)
Sets which fields are dirty.
Definition: incidencebase.cpp:597
void endUpdates()
Call this when a group of updates is complete, to notify observers that the instance has changed.
Definition: incidencebase.cpp:552
void setFieldDirty(IncidenceBase::Field field)
Marks Field field as dirty.
Definition: incidencebase.cpp:587
bool operator!=(const IncidenceBase &ib) const
Compares this with IncidenceBase ib for inequality.
Definition: incidencebase.cpp:128
A class to manage custom calendar properties.
Definition: customproperties.h:38
Attendee attendeeByUid(const QString &uid) const
Returns the incidence attendee with the specified attendee UID.
Definition: incidencebase.cpp:466
int minute() const const
Duration duration() const
Returns the length of the incidence duration.
Definition: incidencebase.cpp:483
void setTime(const QTime &time)
void customPropertyUpdate() override
Definition: incidencebase.cpp:562
Attendee attendeeByMail(const QString &email) const
Returns the attendee with the specified email address.
Definition: incidencebase.cpp:443
virtual void setAllDay(bool allDay)
Sets whether the incidence is all-day, i.e.
Definition: incidencebase.cpp:288
virtual void setLastModified(const QDateTime &lm)
Sets the time the incidence was last modified to lm.
Definition: incidencebase.cpp:201
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.