akonadi/contact
#include <abstractcontactgroupformatter.h>

Public Types | |
| enum | HtmlForm { SelfcontainedForm, EmbeddableForm, UserForm = SelfcontainedForm + 42 } |
Public Member Functions | |
| AbstractContactGroupFormatter () | |
| virtual | ~AbstractContactGroupFormatter () |
| QList< QVariantMap > | additionalFields () const |
| KABC::ContactGroup | contactGroup () const |
| Akonadi::Item | item () const |
| void | setAdditionalFields (const QList< QVariantMap > &fields) |
| void | setContactGroup (const KABC::ContactGroup &group) |
| void | setItem (const Akonadi::Item &item) |
| virtual QString | toHtml (HtmlForm form=SelfcontainedForm) const =0 |
Detailed Description
The interface for all contact group formatters.
This is the interface that can be used to format an Akonadi item with a contact group payload or a contact group itself as HTML.
- See also
- StandardContactGroupFormatter
- Since
- 4.6
Definition at line 46 of file abstractcontactgroupformatter.h.
Member Enumeration Documentation
Describes the form of the HTML that is created.
| Enumerator | |
|---|---|
| SelfcontainedForm |
Creates a complete HTML document. |
| EmbeddableForm |
Creates a div HTML element that can be embedded. |
| UserForm |
Point for extension. |
Definition at line 52 of file abstractcontactgroupformatter.h.
Constructor & Destructor Documentation
| AbstractContactGroupFormatter::AbstractContactGroupFormatter | ( | ) |
Creates a new abstract contact group formatter.
Definition at line 37 of file abstractcontactgroupformatter.cpp.
|
virtual |
Destroys the abstract contact group formatter.
Definition at line 42 of file abstractcontactgroupformatter.cpp.
Member Function Documentation
| QList< QVariantMap > AbstractContactGroupFormatter::additionalFields | ( | ) | const |
Returns the additional fields that will be shown.
Definition at line 72 of file abstractcontactgroupformatter.cpp.
| KABC::ContactGroup AbstractContactGroupFormatter::contactGroup | ( | ) | const |
Returns the contact group that will be formatted.
Definition at line 52 of file abstractcontactgroupformatter.cpp.
| Akonadi::Item AbstractContactGroupFormatter::item | ( | ) | const |
Returns the item who's payload will be formatted.
Definition at line 62 of file abstractcontactgroupformatter.cpp.
| void AbstractContactGroupFormatter::setAdditionalFields | ( | const QList< QVariantMap > & | fields | ) |
Sets the additional fields that will be shown.
The fields list contains a QVariantMap for each additional field with the following keys:
- key (string) The identifier of the field
- title (string) The i18n'ed title of the field
- value (string) The value of the field
- Parameters
-
fields additional fields that will be shown
Definition at line 67 of file abstractcontactgroupformatter.cpp.
| void AbstractContactGroupFormatter::setContactGroup | ( | const KABC::ContactGroup & | group | ) |
Sets the contact group that will be formatted.
Definition at line 47 of file abstractcontactgroupformatter.cpp.
| void AbstractContactGroupFormatter::setItem | ( | const Akonadi::Item & | item | ) |
Sets the item who's payload will be formatted.
- Note
- The payload must be a valid KABC::ContactGroup object.
- Parameters
-
item item, who's payload will be formatted.
Definition at line 57 of file abstractcontactgroupformatter.cpp.
|
pure virtual |
This method must be reimplemented to return the contact group formatted as HTML according to the requested form.
Implemented in Akonadi::StandardContactGroupFormatter.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference