Akonadi::AddContactJob Class

A job to add a new contact to Akonadi. More...

Header: #include <Akonadi/AddContactJob>
CMake: find_package(KPim6AkonadiContactWidgets REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::AkonadiContactWidgets)

Public Functions

AddContactJob(const KContacts::Addressee &contact, QWidget *parentWidget, QObject *parent = nullptr)
AddContactJob(const KContacts::Addressee &contact, const Akonadi::Collection &collection, QObject *parent = nullptr)
virtual ~AddContactJob() override
void showMessageBox(bool b)

Reimplemented Public Functions

virtual void start() override

Detailed Description

The job will check whether a contact with the given email address already exists in Akonadi and adds it if it does not exist yet.

Member Function Documentation

AddContactJob::AddContactJob(const KContacts::Addressee &contact, QWidget *parentWidget, QObject *parent = nullptr)

Creates a new add contact job.

If the contact is not found, the user will be presented a dialog to choose the address book where the new contact shall be stored.

contact The contact to add. parentWidget The widget that will be used as parent for dialog. parent The parent object.

AddContactJob::AddContactJob(const KContacts::Addressee &contact, const Akonadi::Collection &collection, QObject *parent = nullptr)

Creates a new add contact job.

contact The contact to add. collection The address book collection where the contact shall be stored in. parent The parent object.

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

Destroys the add email address job.

void AddContactJob::showMessageBox(bool b)

Sets whether a message box should be shown for the result.

b Whether to show a message box.

[override virtual] void AddContactJob::start()

Starts the job.