PimCommon::CreateResource Class

class PimCommon::CreateResource

The CreateResource class creates Akonadi resources Author: Laurent Montel <montel@kde.org>. More...

Header: #include <PimCommonAkonadi/CreateResource>
CMake: find_package(KPim6PimCommonAkonadi REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::PimCommonAkonadi)
Inherits: QObject

Public Functions

CreateResource(QObject *parent = nullptr)
virtual ~CreateResource() override
QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false)

Signals

void createResourceError(const QString &)
void createResourceInfo(const QString &)

Detailed Description

Member Function Documentation

[explicit] CreateResource::CreateResource(QObject *parent = nullptr)

Constructs a CreateResource. @param parent The parent QObject

[override virtual noexcept] CreateResource::~CreateResource()

Destructs the CreateResource.

QString CreateResource::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false)

Creates an Akonadi resource with the given settings. @param resources The type of resource to create @param name The name for the resource @param settings The configuration settings for the resource @param synchronizeTree Whether to synchronize the tree after creation @return The identifier of the created resource

[signal] void CreateResource::createResourceError(const QString &)

Emitted when a resource creation error occurs. @param error The error message

[signal] void CreateResource::createResourceInfo(const QString &)

Emitted when resource creation information is available. @param info The information message