Akonadi
9 #include "akonadicore_export.h"
10 #include "attribute.h"
13 #include <QSharedPointer>
25 class AKONADICORE_EXPORT
Tag
39 static const char PLAIN[];
49 static const char GENERIC[];
64 Tag &operator=(const
Tag &);
65 Tag &operator=(
Tag &&) noexcept;
67 bool operator==(const
Tag &) const;
68 bool operator!=(const
Tag &) const;
70 static
Tag fromUrl(const
QUrl &url);
93 bool hasAttribute(const
QByteArray &name) const;
103 void clearAttributes();
127 inline T *attribute(CreateOption option = DontCreate);
133 inline const T *attribute()
const;
139 inline void removeAttribute();
145 inline bool hasAttribute()
const;
155 void setId(Id identifier);
171 void setName(
const QString &name);
174 void setParent(
const Tag &parent);
177 bool isValid()
const;
183 bool isImmutable()
const;
192 void markAttributeModified(
const QByteArray &type);
197 friend class ProtocolHelper;
209 markAttributeModified(type);
211 T *attr =
dynamic_cast<T *
>(
attribute(type));
212 if (checkAttribute(attr, type)) {
229 const T *attr =
dynamic_cast<const T *
>(
attribute(type));
230 if (checkAttribute(attr, type)) {
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Provides interface for custom attributes for Entity.
const T * attribute() const
Returns the attribute of the requested type or 0 if it is not available.
Job that fetches tags from the Akonadi storage.
@ AddIfMissing
Creates the attribute if it is missing.
bool hasAttribute() const
Returns whether the entity has an attribute of the requested type.
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
void addAttribute(Attribute *attribute)
Adds an attribute to the entity.
CreateOption
Describes the options that can be passed to access attributes.
void removeAttribute()
Removes and deletes the attribute of the requested type.
Helper integration between Akonadi and Qt.
Job that modifies a tag in the Akonadi storage.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 04:02:00 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.