Akonadi::AbstractContactGroupFormatter

Akonadi::AbstractContactGroupFormatter Class Referenceabstract

#include <abstractcontactgroupformatter.h>

Inheritance diagram for Akonadi::AbstractContactGroupFormatter:

Public Types

enum  HtmlForm { SelfcontainedForm, EmbeddableForm, UserForm = SelfcontainedForm + 42 }
 

Public Member Functions

 AbstractContactGroupFormatter ()
 
virtual ~AbstractContactGroupFormatter ()
 
QVector< QVariantMap > additionalFields () const
 
KContacts::ContactGroup contactGroup () const
 
Akonadi::Item item () const
 
void setAdditionalFields (const QVector< 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
Author
Tobias Koenig tokoe[email protected]@kde[email protected].org
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.

AbstractContactGroupFormatter::~AbstractContactGroupFormatter ( )
virtual

Destroys the abstract contact group formatter.

Definition at line 42 of file abstractcontactgroupformatter.cpp.

Member Function Documentation

QVector< QVariantMap > AbstractContactGroupFormatter::additionalFields ( ) const

Returns the additional fields that will be shown.

Definition at line 72 of file abstractcontactgroupformatter.cpp.

KContacts::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 QVector< 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
fieldsadditional fields that will be shown

Definition at line 67 of file abstractcontactgroupformatter.cpp.

void AbstractContactGroupFormatter::setContactGroup ( const KContacts::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 KContacts::ContactGroup object.
Parameters
itemitem, who's payload will be formatted.

Definition at line 57 of file abstractcontactgroupformatter.cpp.

virtual QString Akonadi::AbstractContactGroupFormatter::toHtml ( HtmlForm  form = SelfcontainedForm) const
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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 6 2020 23:07:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.