• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • AbstractContactFormatter
Public Types | Public Member Functions | List of all members
Akonadi::AbstractContactFormatter Class Referenceabstract

#include <abstractcontactformatter.h>

Inheritance diagram for Akonadi::AbstractContactFormatter:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 AbstractContactFormatter ()
 
virtual ~AbstractContactFormatter ()
 
KABC::Addressee contact () const
 
QList< QVariantMap > customFieldDescriptions () const
 
Akonadi::Item item () const
 
void setContact (const KABC::Addressee &contact)
 
void setCustomFieldDescriptions (const QList< QVariantMap > &descriptions)
 
void setItem (const Akonadi::Item &item)
 
virtual QString toHtml (HtmlForm form=SelfcontainedForm) const =0
 

Detailed Description

The interface for all contact formatters.

This is the interface that can be used to format an Akonadi item with a contact payload or a contact itself as HTML.

See also
StandardContactFormatter
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.5

Definition at line 46 of file abstractcontactformatter.h.

Member Enumeration Documentation

enum Akonadi::AbstractContactFormatter::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 52 of file abstractcontactformatter.h.

Constructor & Destructor Documentation

AbstractContactFormatter::AbstractContactFormatter ( )

Creates a new abstract contact formatter.

Definition at line 37 of file abstractcontactformatter.cpp.

AbstractContactFormatter::~AbstractContactFormatter ( )
virtual

Destroys the abstract contact formatter.

Definition at line 42 of file abstractcontactformatter.cpp.

Member Function Documentation

KABC::Addressee AbstractContactFormatter::contact ( ) const

Returns the contact that will be formatted.

Definition at line 52 of file abstractcontactformatter.cpp.

QList< QVariantMap > AbstractContactFormatter::customFieldDescriptions ( ) const

Returns the custom field descriptions that will be used.

Definition at line 72 of file abstractcontactformatter.cpp.

Akonadi::Item AbstractContactFormatter::item ( ) const

Returns the item who's payload will be formatted.

Definition at line 62 of file abstractcontactformatter.cpp.

void AbstractContactFormatter::setContact ( const KABC::Addressee &  contact)

Sets the contact that will be formatted.

Parameters
contactcontact to be formatted

Definition at line 47 of file abstractcontactformatter.cpp.

void AbstractContactFormatter::setCustomFieldDescriptions ( const QList< QVariantMap > &  descriptions)

Sets the custom field descriptions that will be used.

The description list contains a QVariantMap for each custom field with the following keys:

  • key (string) The identifier of the field
  • title (string) The i18n'ed title of the field
  • type (string) The type description of the field Possible values for type description are
    • text
    • numeric
    • boolean
    • date
    • time
    • datetime
Parameters
descriptionslist with field descriptions

Definition at line 67 of file abstractcontactformatter.cpp.

void AbstractContactFormatter::setItem ( const Akonadi::Item &  item)

Sets the item who's payload will be formatted.

Note
The payload must be a valid KABC::Addressee object.
Parameters
itemitem, who's payload will be formatted.

Definition at line 57 of file abstractcontactformatter.cpp.

virtual QString Akonadi::AbstractContactFormatter::toHtml ( HtmlForm  form = SelfcontainedForm) const
pure virtual

This method must be reimplemented to return the contact formatted as HTML according to the requested form.

Parameters
formhow to render the contact into HTML

Implemented in Akonadi::StandardContactFormatter.


The documentation for this class was generated from the following files:
  • abstractcontactformatter.h
  • abstractcontactformatter.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal