Akonadi::TagFetchScope Class

class Akonadi::TagFetchScope

Specifies which parts of a tag should be fetched from the Akonadi storage. More...

Header: #include <Akonadi/TagFetchScope>
CMake: find_package(KPim6 REQUIRED COMPONENTS AkonadiCore)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiCore)

Public Functions

TagFetchScope()
TagFetchScope(const Akonadi::TagFetchScope &other)
~TagFetchScope()
QSet<QByteArray> attributes() const
bool fetchAllAttributes() const
void fetchAttribute(bool fetch = true)
void fetchAttribute(const QByteArray &type, bool fetch = true)
bool fetchIdOnly() const
bool fetchRemoteId() const
void setFetchAllAttributes(bool fetchAllAttributes)
void setFetchIdOnly(bool fetchIdOnly)
void setFetchRemoteId(bool fetchRemoteId)
Akonadi::TagFetchScope &operator=(const Akonadi::TagFetchScope &other)

Detailed Description

Member Function Documentation

TagFetchScope::TagFetchScope()

Creates an empty tag fetch scope.

Using an empty scope will only fetch the very basic meta data of tags, e.g. local id, remote id and mime type

TagFetchScope::TagFetchScope(const Akonadi::TagFetchScope &other)

Creates a new tag fetch scope from an other.

[noexcept] TagFetchScope::~TagFetchScope()

Destroys the tag fetch scope.

QSet<QByteArray> TagFetchScope::attributes() const

Returns all explicitly fetched attributes.

Undefined if fetchAllAttributes() returns true.

See also fetchAttribute().

bool TagFetchScope::fetchAllAttributes() const

Returns whether to fetch all attributes

See also setFetchAllAttributes().

template <typename T> void TagFetchScope::fetchAttribute(bool fetch = true)

Sets whether the attribute of the requested type should be fetched.

fetch \ true if the attribute should be fetched, \ false otherwise.

void TagFetchScope::fetchAttribute(const QByteArray &type, bool fetch = true)

Sets whether the attribute of the given type should be fetched.

type The attribute type to fetch. fetch \ true if the attribute should be fetched, \ false otherwise.

bool TagFetchScope::fetchIdOnly() const

Sets whether only the id of the tags should be retrieved or the complete tag.

See also setFetchIdOnly() and tagFetchScope().

bool TagFetchScope::fetchRemoteId() const

Returns whether tag remote ID should be fetched.

See also setFetchRemoteId().

void TagFetchScope::setFetchAllAttributes(bool fetchAllAttributes)

Sets whether to fetch all attributes.

See also fetchAllAttributes().

void TagFetchScope::setFetchIdOnly(bool fetchIdOnly)

Sets whether only the id or the complete tag should be fetched.

The default is false.

See also fetchIdOnly().

void TagFetchScope::setFetchRemoteId(bool fetchRemoteId)

Sets whether to fetch tag remote ID.

This option only has effect for Resources.

See also fetchRemoteId().

Akonadi::TagFetchScope &TagFetchScope::operator=(const Akonadi::TagFetchScope &other)

Assigns the other to this scope and returns a reference to this scope.