Search for usage in LXR

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 ()
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
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org

Definition at line 37 of file abstractcontactgroupformatter.h.

Member Enumeration Documentation

◆ HtmlForm

Describes the form of the HTML that is created.


Creates a complete HTML document.


Creates a div HTML element that can be embedded.


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()

AbstractContactGroupFormatter::~AbstractContactGroupFormatter ( )

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
fieldsadditional 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.

The payload must be a valid KContacts::ContactGroup object.
itemitem, who's payload will be formatted.

Definition at line 41 of file abstractcontactgroupformatter.cpp.

◆ toHtml()

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 KAddressBookGrantlee::GrantleeContactGroupFormatter, and Akonadi::StandardContactGroupFormatter.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.