Akonadi Contacts

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

KDE's Doxygen guidelines are available online.