Akonadi Contacts

openemailaddressjob.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 #include <memory>
14 
15 namespace Akonadi
16 {
17 class OpenEmailAddressJobPrivate;
18 
19 /**
20  * @short A job to open the contact editor for a contact with a given email address.
21  *
22  * The job will check whether a contact with the given email address already
23  * exists in Akonadi. If not, it will add a new contact with the email address
24  * to Akonadi and then opens the contact editor.
25  */
26 class AKONADI_CONTACT_EXPORT OpenEmailAddressJob : public KJob
27 {
28  Q_OBJECT
29 
30 public:
31  /**
32  * Creates a new open email address job.
33  *
34  * @param email The email address to open.
35  * @param parentWidget The widget that will be used as parent for dialog.
36  * @param parent The parent object.
37  */
38  explicit OpenEmailAddressJob(const QString &email, QWidget *parentWidget, QObject *parent = nullptr);
39 
40  /**
41  * Destroys the open email address job.
42  */
43  ~OpenEmailAddressJob() override;
44 
45  /**
46  * Starts the job.
47  */
48  void start() override;
49 
50 private:
51  //@cond PRIVATE
52  friend class OpenEmailAddressJobPrivate;
53  std::unique_ptr<OpenEmailAddressJobPrivate> const d;
54  //@endcond
55 };
56 }
Q_SCRIPTABLE Q_NOREPLY void start()
A job to open the contact editor for a contact with a given email address.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:09:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.