#include <tag.h>
|
static const char | GENERIC [] = "GENERIC" |
|
static const char | PLAIN [] = "PLAIN" |
|
An Akonadi Tag.
Definition at line 25 of file tag.h.
◆ Id
using Akonadi::Tag::Id = qint64 |
Definition at line 29 of file tag.h.
◆ List
Definition at line 28 of file tag.h.
◆ CreateOption
Describes the options that can be passed to access attributes.
Enumerator |
---|
AddIfMissing | Creates the attribute if it is missing.
|
DontCreate | Does not create an attribute if it is missing (default)
|
Definition at line 114 of file tag.h.
◆ Tag() [1/3]
◆ Tag() [2/3]
◆ Tag() [3/3]
Creates a PLAIN tag.
Definition at line 36 of file tag.cpp.
◆ addAttribute()
void Tag::addAttribute |
( |
Attribute * | attribute | ) |
|
Adds an attribute to the entity.
If an attribute of the same type name already exists, it is deleted and replaced with the new one.
- Parameters
-
attribute | The new attribute. |
- Note
- The entity takes the ownership of the attribute.
Definition at line 98 of file tag.cpp.
◆ attribute() [1/4]
template<typename T >
const T * Akonadi::Tag::attribute |
( |
| ) |
const |
|
inline |
Returns the attribute of the requested type or 0 if it is not available.
Definition at line 225 of file tag.h.
◆ attribute() [2/4]
◆ attribute() [3/4]
Returns the attribute of the given type name
if available, 0 otherwise.
Definition at line 123 of file tag.cpp.
◆ attribute() [4/4]
Returns the attribute of the requested type.
If the entity has no attribute of that type yet, a new one is created and added to the entity.
- Parameters
-
option | The create options. |
Definition at line 206 of file tag.h.
◆ attributes()
Returns a list of all attributes of the entity.
Definition at line 113 of file tag.cpp.
◆ clearAttributes()
void Tag::clearAttributes |
( |
| ) |
|
Removes and deletes all attributes of the entity.
Definition at line 118 of file tag.cpp.
◆ fromUrl()
Tag Tag::fromUrl |
( |
const QUrl & | url | ) |
|
|
static |
◆ genericTag()
Returns a GENERIC tag with the given name and a valid gid.
Definition at line 219 of file tag.cpp.
◆ gid()
◆ hasAttribute() [1/2]
template<typename T >
bool Akonadi::Tag::hasAttribute |
( |
| ) |
const |
|
inline |
Returns whether the entity has an attribute of the requested type.
Definition at line 246 of file tag.h.
◆ hasAttribute() [2/2]
bool Tag::hasAttribute |
( |
const QByteArray & | name | ) |
const |
Returns true
if the entity has an attribute of the given type name
, false otherwise.
Definition at line 108 of file tag.cpp.
◆ id()
Tag::Id Tag::id |
( |
| ) |
const |
Returns the unique identifier of the tag.
Definition at line 139 of file tag.cpp.
◆ isImmutable()
bool Tag::isImmutable |
( |
| ) |
const |
Returns true if the tag is immutable (cannot be modified after creation).
Note that the immutability does not affect the attributes.
Definition at line 207 of file tag.cpp.
◆ isValid()
bool Tag::isValid |
( |
| ) |
const |
◆ name()
◆ operator!=()
bool Tag::operator!= |
( |
const Tag & | other | ) |
const |
◆ operator==()
bool Tag::operator== |
( |
const Tag & | other | ) |
const |
◆ parent()
Tag Tag::parent |
( |
| ) |
const |
◆ remoteId()
◆ removeAttribute() [1/2]
template<typename T >
void Akonadi::Tag::removeAttribute |
( |
| ) |
|
|
inline |
Removes and deletes the attribute of the requested type.
Definition at line 239 of file tag.h.
◆ removeAttribute() [2/2]
void Tag::removeAttribute |
( |
const QByteArray & | name | ) |
|
Removes and deletes the attribute of the given type name
.
Definition at line 103 of file tag.cpp.
◆ setGid()
◆ setId()
void Tag::setId |
( |
Tag::Id | identifier | ) |
|
Sets the unique identifier
of the tag.
Definition at line 134 of file tag.cpp.
◆ setName()
void Tag::setName |
( |
const QString & | name | ) |
|
◆ setParent()
void Tag::setParent |
( |
const Tag & | parent | ) |
|
◆ setRemoteId()
void Tag::setRemoteId |
( |
const QByteArray & | remoteId | ) |
|
◆ setType()
◆ type()
◆ url()
Returns the url of the tag.
Definition at line 87 of file tag.cpp.
◆ GENERIC
const char Akonadi::Tag::GENERIC = "GENERIC" |
|
static |
The GENERIC type has the following properties:
- mutable
- gid is RFC 4122 compatible
- no hierarchy (no parent)
GENERIC tags are general purpose tags, that are used, if you can change tag name.
Definition at line 49 of file tag.h.
◆ PLAIN
const char Akonadi::Tag::PLAIN = "PLAIN" |
|
static |
The PLAIN type has the following properties:
- gid == displayName
- immutable
- no hierarchy (no parent)
PLAIN tags are general purpose tags that are easy to map by backends.
Definition at line 39 of file tag.h.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:43 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.