Akonadi Contacts

addemailaddressjob.h
1/*
2 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadi-contact-widgets_export.h"
10#include <Akonadi/Item>
11#include <KJob>
12
13#include <memory>
14
15namespace Akonadi
16{
17class Item;
18class AddEmailAddressJobPrivate;
19
20/**
21 * @short A job to add a new contact with a given email address to Akonadi.
22 *
23 * The job will check whether a contact with the given email address already
24 * exists in Akonadi and inform the user about it, if it does not exist yet,
25 * a new contact is added.
26 */
27class AKONADI_CONTACT_WIDGETS_EXPORT AddEmailAddressJob : public KJob
28{
29 Q_OBJECT
30
31public:
32 /**
33 * Creates a new add email address job.
34 *
35 * @param email The email address.
36 * @param parentWidget The widget that will be used as parent for dialog.
37 * @param parent The parent object.
38 */
39 explicit AddEmailAddressJob(const QString &email, QWidget *parentWidget, QObject *parent = nullptr);
40
41 /**
42 * Destroys the add email address job.
43 */
45
46 /**
47 * Starts the job.
48 */
49 void start() override;
50
51 /**
52 * Returns the item that represents the new contact.
53 */
54 [[nodiscard]] Akonadi::Item contact() const;
55
56 void setInteractive(bool b);
57Q_SIGNALS:
58 void successMessage(const QString &message);
59
60private:
61 //@cond PRIVATE
62 friend class AddEmailAddressJobPrivate;
63 std::unique_ptr<AddEmailAddressJobPrivate> const d;
64 //@endcond
65};
66}
A job to add a new contact with a given email address to Akonadi.
~AddEmailAddressJob() override
Destroys the add email address job.
Q_SCRIPTABLE Q_NOREPLY void start()
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:57:56 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.