Akonadi::AbstractContactGroupFormatter
#include <abstractcontactgroupformatter.h>

Public Types | |
enum | HtmlForm { SelfcontainedForm, EmbeddableForm, UserForm = SelfcontainedForm + 42 } |
Public Member Functions | |
AbstractContactGroupFormatter () | |
virtual | ~AbstractContactGroupFormatter () |
QList< QVariantMap > | additionalFields () const |
KContacts::ContactGroup | contactGroup () const |
Akonadi::Item | item () const |
void | setAdditionalFields (const QList< QVariantMap > &fields) |
void | setContactGroup (const KContacts::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 37 of file abstractcontactgroupformatter.h.
Member Enumeration Documentation
◆ HtmlForm
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 43 of file abstractcontactgroupformatter.h.
Constructor & Destructor Documentation
◆ AbstractContactGroupFormatter()
AbstractContactGroupFormatter::AbstractContactGroupFormatter | ( | ) |
Creates a new abstract contact group formatter.
Definition at line 24 of file abstractcontactgroupformatter.cpp.
◆ ~AbstractContactGroupFormatter()
|
virtualdefault |
Destroys the abstract contact group formatter.
Member Function Documentation
◆ additionalFields()
QList< QVariantMap > AbstractContactGroupFormatter::additionalFields | ( | ) | const |
Returns the additional fields that will be shown.
Definition at line 56 of file abstractcontactgroupformatter.cpp.
◆ contactGroup()
KContacts::ContactGroup AbstractContactGroupFormatter::contactGroup | ( | ) | const |
Returns the contact group that will be formatted.
Definition at line 36 of file abstractcontactgroupformatter.cpp.
◆ item()
Akonadi::Item AbstractContactGroupFormatter::item | ( | ) | const |
Returns the item who's payload will be formatted.
Definition at line 46 of file abstractcontactgroupformatter.cpp.
◆ setAdditionalFields()
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 51 of file abstractcontactgroupformatter.cpp.
◆ setContactGroup()
void AbstractContactGroupFormatter::setContactGroup | ( | const KContacts::ContactGroup & | group | ) |
Sets the contact group
that will be formatted.
Definition at line 31 of file abstractcontactgroupformatter.cpp.
◆ setItem()
void AbstractContactGroupFormatter::setItem | ( | const Akonadi::Item & | item | ) |
Sets the item
who's payload will be formatted.
- Note
- The payload must be a valid KContacts::ContactGroup object.
- Parameters
-
item item, who's payload will be formatted.
Definition at line 41 of file abstractcontactgroupformatter.cpp.
◆ toHtml()
|
pure virtual |
This method must be reimplemented to return the contact group formatted as HTML according to the requested form
.
Implemented in Akonadi::StandardContactGroupFormatter, and KAddressBookGrantlee::GrantleeContactGroupFormatter.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:51:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.