KCalendarCore
incidencebase.cpp
Go to the documentation of this file.
61IncidenceBase::IncidenceBase(IncidenceBasePrivate *p)
429 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&email](const Attendee &att) {
443 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&mails](const Attendee &a) {
452 auto it = std::find_if(d_ptr->mAttendees.cbegin(), d_ptr->mAttendees.cend(), [&uid](const Attendee &a) {
604 return dt.timeSpec() == Qt::UTC || (dt.timeSpec() == Qt::TimeZone && dt.timeZone() == QTimeZone::utc())
617QDataStream &KCalendarCore::operator<<(QDataStream &out, const KCalendarCore::IncidenceBase::Ptr &i)
623 out << static_cast<quint32>(KCALCORE_MAGIC_NUMBER); // Magic number to identify KCalendarCore data
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition attendee.h:45
A class to manage custom calendar properties.
Definition customproperties.h:39
CustomProperties & operator=(const CustomProperties &other)
Assignment operator.
Definition customproperties.cpp:78
Represents a span of time measured in seconds or days.
Definition duration.h:44
The IncidenceObserver class.
Definition incidencebase.h:200
An abstract class that provides a common base for all calendar incidence classes.
Definition incidencebase.h:99
void addAttendee(const Attendee &attendee, bool doUpdate=true)
Add Attendee to this incidence.
Definition incidencebase.cpp:364
virtual bool accept(Visitor &v, const IncidenceBase::Ptr &incidence)
Accept IncidenceVisitor.
Definition incidencebase.cpp:163
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
QStringList comments() const
Returns all incidence comments as a list of strings.
Definition incidencebase.cpp:323
void addContact(const QString &contact)
Adds a contact to thieincidence.
Definition incidencebase.cpp:328
bool removeContact(const QString &contact)
Removes a contact from the incidence.
Definition incidencebase.cpp:338
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
Duration duration() const
Returns the length of the incidence duration.
Definition incidencebase.cpp:467
void startUpdates()
Call this when a group of updates is going to be made.
Definition incidencebase.cpp:530
void addComment(const QString &comment)
Adds a comment to the incidence.
Definition incidencebase.cpp:294
Attendee attendeeByUid(const QString &uid) const
Returns the incidence attendee with the specified attendee UID.
Definition incidencebase.cpp:450
void setAttendees(const Attendee::List &attendees, bool doUpdate=true)
Set the attendees of this incidence.
Definition incidencebase.cpp:392
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
IncidenceBase & operator=(const IncidenceBase &other)
Assignment operator.
Definition incidencebase.cpp:80
Attendee attendeeByMail(const QString &email) const
Returns the attendee with the specified email address.
Definition incidencebase.cpp:427
void customPropertyUpdate() override
Definition incidencebase.cpp:546
void setOrganizer(const Person &organizer)
Sets the organizer for the incidence.
Definition incidencebase.cpp:206
virtual void setDuration(const Duration &duration)
Sets the incidence duration.
Definition incidencebase.cpp:458
bool operator==(const IncidenceBase &ib) const
Compares this with IncidenceBase ib for equality.
Definition incidencebase.cpp:102
QUrl uri() const
Returns the uri for the incidence, of form urn:x-ical:<uid>
Definition incidencebase.cpp:576
virtual void setLastModified(const QDateTime &lm)
Sets the time the incidence was last modified to lm.
Definition incidencebase.cpp:185
@ FieldUnknown
Something changed. Always set when you use the assignment operator.
Definition incidencebase.h:190
void setDirtyFields(const QSet< IncidenceBase::Field > &)
Sets which fields are dirty.
Definition incidencebase.cpp:581
virtual IncidenceBase & assign(const IncidenceBase &other)
Provides polymorfic assignment.
Definition incidencebase.cpp:92
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:436
void setHasDuration(bool hasDuration)
Sets if the incidence has a duration.
Definition incidencebase.cpp:472
virtual void deserialize(QDataStream &in)
Sub-type specific deserialization.
Definition incidencebase.cpp:591
void endUpdates()
Call this when a group of updates is complete, to notify observers that the instance has changed.
Definition incidencebase.cpp:536
void unRegisterObserver(IncidenceObserver *observer)
Unregister observer.
Definition incidencebase.cpp:502
void setFieldDirty(IncidenceBase::Field field)
Marks Field field as dirty.
Definition incidencebase.cpp:571
void customPropertyUpdated() override
Definition incidencebase.cpp:551
void setUid(const QString &uid)
Sets the unique id for the incidence to uid.
Definition incidencebase.cpp:170
virtual QDateTime recurrenceId() const
Returns the incidence recurrenceId.
Definition incidencebase.cpp:556
virtual void setAllDay(bool allDay)
Sets whether the incidence is all-day, i.e.
Definition incidencebase.cpp:272
bool isReadOnly() const
Returns true the object is read-only; false otherwise.
Definition incidencebase.cpp:241
bool operator!=(const IncidenceBase &ib) const
Compares this with IncidenceBase ib for inequality.
Definition incidencebase.cpp:112
QStringList contacts() const
Returns all incidence contacts as a list of strings.
Definition incidencebase.cpp:359
static quint32 magicSerializationIdentifier()
Constant that identifies KCalendarCore data in a binary stream.
Definition incidencebase.cpp:597
bool hasDuration() const
Returns true if the incidence has a duration; false otherwise.
Definition incidencebase.cpp:477
bool removeComment(const QString &comment)
Removes a comment from the incidence.
Definition incidencebase.cpp:302
void registerObserver(IncidenceObserver *observer)
Register observer.
Definition incidencebase.cpp:495
virtual bool equals(const IncidenceBase &incidenceBase) const
Provides polymorfic comparison for equality.
Definition incidencebase.cpp:117
virtual void serialize(QDataStream &out) const
Sub-type specific serialization.
Definition incidencebase.cpp:586
static Person fromFullName(const QString &fullName)
Constructs a person with name and email address taken from fullName.
Definition person.cpp:362
This class provides the interface for a visitor of calendar components.
Definition visitor.h:31
This file is part of the API for handling calendar data and defines the IncidenceBase class.
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Alarm deserializer.
Definition alarm.cpp:833
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Alarm serializer.
Definition alarm.cpp:820
KCALENDARCORE_EXPORT bool identical(const QDateTime &dt1, const QDateTime &dt2)
Compare two QDateTimes for extended equality.
Definition incidencebase.cpp:608
bool isValid() const const
int offsetFromUtc() const const
void setTime(QTime time)
QTime time() const const
Qt::TimeSpec timeSpec() const const
QTimeZone timeZone() const const
QDateTime toUTC() const const
void append(QList< T > &&value)
const_iterator cbegin() const const
const_iterator cend() const const
qsizetype size() const const
bool isEmpty() const const
CaseInsensitive
UTC
int hour() const const
int minute() const const
int second() const const
bool setHMS(int h, int m, int s, int ms)
QTimeZone utc()
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.