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();
126 template<
typename T>
inline T *attribute(CreateOption option = DontCreate);
131 template<
typename T>
inline const T *attribute()
const;
136 template<
typename T>
inline void removeAttribute();
141 template<
typename T>
inline bool hasAttribute()
const;
151 void setId(Id identifier);
167 void setName(
const QString &name);
170 void setParent(
const Tag &parent);
173 bool isValid()
const;
179 bool isImmutable()
const;
188 void markAttributeModified(
const QByteArray &type);
193 friend class ProtocolHelper;
204 markAttributeModified(type);
206 T *attr =
dynamic_cast<T *
>(
attribute(type));
207 if (checkAttribute(attr, type)) {
223 const T *attr =
dynamic_cast<const T *
>(
attribute(type));
224 if (checkAttribute(attr, type)) {
QDataStream & operator<<(QDataStream &out, const KDateTime &dateTime)
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-2022 The KDE developers.
Generated on Sat May 28 2022 04:06:29 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.