Akonadi Contacts

contacteditor.h
1 /*
2  This file is part of Akonadi Contact.
3 
4  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef AKONADI_CONTACTEDITOR_H
10 #define AKONADI_CONTACTEDITOR_H
11 
12 #include "akonadi-contact_export.h"
13 
14 #include <QWidget>
15 
16 namespace KContacts {
17 class Addressee;
18 }
19 namespace ContactEditor {
20 class AbstractContactEditorWidget;
21 }
22 namespace Akonadi {
23 class Collection;
24 class Item;
25 
67 class AKONADI_CONTACT_EXPORT AkonadiContactEditor : public QWidget
68 {
69  Q_OBJECT
70 
71 public:
75  enum Mode {
77  EditMode
78  };
79 
80  enum DisplayMode {
82  VCardMode
83  };
84 
91  explicit AkonadiContactEditor(Mode mode, QWidget *parent = nullptr);
92 
100  AkonadiContactEditor(Mode mode, ContactEditor::AbstractContactEditorWidget *editorWidget, QWidget *parent = nullptr);
101 
110  AkonadiContactEditor(Mode mode, DisplayMode displayMode, QWidget *parent = nullptr);
111 
115  ~AkonadiContactEditor() override;
116 
122  void setContactTemplate(const KContacts::Addressee &contact);
123 
128  void setDefaultAddressBook(const Akonadi::Collection &addressbook);
129 
135  Q_REQUIRED_RESULT KContacts::Addressee contact();
136 public Q_SLOTS:
140  void loadContact(const Akonadi::Item &contact);
141 
147  void saveContactInAddressBook();
148 
149 Q_SIGNALS:
154  void contactStored(const Akonadi::Item &contact);
155 
161  void error(const QString &errorMsg);
162 
167  void finished();
168 private:
169  //@cond PRIVATE
170  class Private;
171  Private *const d;
172  //@endcond
173 };
174 }
175 
176 #endif
Mode
Describes the mode of the editor.
Definition: contacteditor.h:75
An widget to edit contacts in Akonadi.
Definition: contacteditor.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 23:07:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.