Akonadi::TagFetchJob Class
class Akonadi::TagFetchJobJob that fetches tags from the Akonadi storage. More...
| Header: | #include <Akonadi/TagFetchJob> |
| CMake: | find_package(KPim6 REQUIRED COMPONENTS AkonadiCore)target_link_libraries(mytarget PRIVATE KPim6::AkonadiCore) |
| Inherits: | Akonadi::Job |
Public Functions
| TagFetchJob(QObject *parent = nullptr) | |
| TagFetchJob(const Akonadi::Tag &tag, QObject *parent = nullptr) | |
| TagFetchJob(const Akonadi::Tag::List &tags, QObject *parent = nullptr) | |
| TagFetchJob(const QList<Akonadi::Tag::Id> &ids, QObject *parent = nullptr) | |
| Akonadi::TagFetchScope & | fetchScope() |
| void | setFetchScope(const Akonadi::TagFetchScope &fetchScope) |
| Akonadi::Tag::List | tags() const |
Signals
| void | tagsReceived(const Akonadi::Tag::List &tags) |
Detailed Description
This class is used to fetch tags from the Akonadi storage.
If you want to fetch all items with given tag, use ItemFetchJob and the ItemFetchJob(const Tag &tag, QObject *parent = nullptr) constructor (since 4.14)
Member Function Documentation
[explicit] TagFetchJob::TagFetchJob(QObject *parent = nullptr)
Constructs a new tag fetch job that retrieves all tags stored in Akonadi.
parent The parent object.
[explicit] TagFetchJob::TagFetchJob(const Akonadi::Tag &tag, QObject *parent = nullptr)
Constructs a new tag fetch job that retrieves the specified tag. If the tag has a uid set, this is used to identify the tag on the Akonadi server. If only a remote identifier is available, that is used. However as remote identifiers are internal to resources, it's necessary to set the resource context (see ResourceSelectJob).
tag The tag to fetch. parent The parent object.
[explicit] TagFetchJob::TagFetchJob(const Akonadi::Tag::List &tags, QObject *parent = nullptr)
Constructs a new tag fetch job that retrieves specified tags. If the tags have a uid set, this is used to identify the tags on the Akonadi server. If only a remote identifier is available, that is used. However as remote identifiers are internal to resources, it's necessary to set the resource context (see ResourceSelectJob).
tags Tags to fetch. parent The parent object.
[explicit] TagFetchJob::TagFetchJob(const QList<Akonadi::Tag::Id> &ids, QObject *parent = nullptr)
Convenience ctor equivalent to ItemFetchJob(const Item::List &items, QObject *parent = nullptr)
ids UIDs of tags to fetch. parent The parent object.
Akonadi::TagFetchScope &TagFetchJob::fetchScope()
Returns the tag fetch scope.
Since this returns a reference it can be used to conveniently modify the current scope in-place, i.e. by calling a method on the returned reference without storing it in a local variable. See the TagFetchScope documentation for an example.
Returns a reference to the current tag fetch scope
See also setFetchScope(), for, replacing, the, current, tag, fetch, and scope.
void TagFetchJob::setFetchScope(const Akonadi::TagFetchScope &fetchScope)
Sets the tag fetch scope.
The TagFetchScope controls how much of an tags's data is fetched from the server.
fetchScope The new fetch scope for tag fetch operations.
See also fetchScope().
Akonadi::Tag::List TagFetchJob::tags() const
Returns the fetched tags after the job has been completed.
[signal] void TagFetchJob::tagsReceived(const Akonadi::Tag::List &tags)
This signal is emitted whenever new tags have been fetched completely.
tags The fetched tags