• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi/contact

  • Akonadi
  • AbstractContactFormatter
Public Types | Public Member Functions
Akonadi::AbstractContactFormatter Class Reference

The interface for all contact formatters. More...

#include <abstractcontactformatter.h>

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

List of all members.

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@kde.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.

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

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.

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.

Implemented in Akonadi::StandardContactFormatter.


The documentation for this class was generated from the following files:
  • abstractcontactformatter.h
  • abstractcontactformatter.cpp

akonadi/contact

Skip menu "akonadi/contact"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal