Akonadi Contacts

contacteditorpageplugin.h
1 /*
2  This file is part of Contact Editor.
3 
4  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include <QWidget>
12 
13 namespace KContacts
14 {
15 class Addressee;
16 }
17 
18 namespace ContactEditor
19 {
20 /**
21  * @short The base class for custom ContactEditor page plugins.
22  *
23  * @author Tobias Koenig <[email protected]>
24  * @since 4.4
25  */
27 {
28 public:
29  /**
30  * Returns the i18n'd page title.
31  */
32  virtual QString title() const = 0;
33 
34  /**
35  * This method is called to fill the editor widget with the data from @p contact.
36  */
37  virtual void loadContact(const KContacts::Addressee &contact) = 0;
38 
39  /**
40  * This method is called to store the data from the editor widget into @p contact.
41  */
42  virtual void storeContact(KContacts::Addressee &contact) const = 0;
43 
44  /**
45  * This method is called to set the editor widget @p readOnly.
46  */
47  virtual void setReadOnly(bool readOnly) = 0;
48 };
49 }
50 
51 Q_DECLARE_INTERFACE(ContactEditor::ContactEditorPagePlugin, "org.freedesktop.Akonadi.ContactEditorPagePlugin/1.0")
virtual void setReadOnly(bool readOnly)=0
This method is called to set the editor widget readOnly.
virtual void storeContact(KContacts::Addressee &contact) const =0
This method is called to store the data from the editor widget into contact.
The base class for custom ContactEditor page plugins.
virtual void loadContact(const KContacts::Addressee &contact)=0
This method is called to fill the editor widget with the data from contact.
virtual QString title() const =0
Returns the i18n'd page title.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Apr 1 2023 04:09:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.