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

akonadi/contact

Public Types | Public Member Functions | Static Public Member Functions | List of all members
CustomField Class Reference

#include <customfields_p.h>

Public Types

typedef QVector< CustomField > List
 
enum  Scope { LocalScope , GlobalScope , ExternalScope }
 
enum  Type {
  TextType , NumericType , BooleanType , DateType ,
  TimeType , DateTimeType , UrlType
}
 

Public Member Functions

 CustomField (const QString &key, const QString &title, Type type, Scope scope)
 
QString key () const
 
Scope scope () const
 
void setKey (const QString &key)
 
void setScope (Scope scope)
 
void setTitle (const QString &title)
 
void setType (Type type)
 
void setValue (const QString &value)
 
QString title () const
 
QVariantMap toVariantMap () const
 
Type type () const
 
QString value () const
 

Static Public Member Functions

static CustomField fromVariantMap (const QVariantMap &map, Scope scope)
 
static Type stringToType (const QString &type)
 
static QString typeToString (Type type)
 

Detailed Description

A class that represents non-standard contact fields.

There exists three scopes of fields. To the local scope belong all custom fields that are defined by the user and that exists only for one contact. The description for these fields are stored inside ContactMetaData as custom attribute of the Akonadi item that represents the contact. To the global scope belong all custom fields that are defined by the user but shall be available in all contacts of the address book. Their description is stored by CustomFieldManager in $HOME/.kde/share/config/akonadi_contactrc. All other custom fields belong to the external scope, they come with import of contacts from other PIM applications (e.g. further X- entries in vCards). Their description is created on the fly when editing the custom fields.

The description of a custom field covers the key, title and type.

Definition at line 47 of file customfields_p.h.

Member Typedef Documentation

◆ List

typedef QVector<CustomField> CustomField::List

Definition at line 50 of file customfields_p.h.

Member Enumeration Documentation

◆ Scope

enum CustomField::Scope
Enumerator
LocalScope 

Field has been defined by user for one contact.

GlobalScope 

Field has been defined by user for all contacts.

ExternalScope 

Field has been defined by the external data source (e.g. vCard)

Definition at line 62 of file customfields_p.h.

◆ Type

enum CustomField::Type

Definition at line 52 of file customfields_p.h.

Constructor & Destructor Documentation

◆ CustomField() [1/2]

CustomField::CustomField ( )

Definition at line 24 of file customfields.cpp.

◆ CustomField() [2/2]

CustomField::CustomField ( const QString &  key,
const QString &  title,
Type  type,
Scope  scope 
)

Definition at line 29 of file customfields.cpp.

Member Function Documentation

◆ fromVariantMap()

CustomField CustomField::fromVariantMap ( const QVariantMap &  map,
Scope  scope 
)
static

Definition at line 34 of file customfields.cpp.

◆ key()

QString CustomField::key ( ) const

Definition at line 47 of file customfields.cpp.

◆ scope()

CustomField::Scope CustomField::scope ( ) const

Definition at line 77 of file customfields.cpp.

◆ setKey()

void CustomField::setKey ( const QString &  key)

Definition at line 42 of file customfields.cpp.

◆ setScope()

void CustomField::setScope ( Scope  scope)

Definition at line 72 of file customfields.cpp.

◆ setTitle()

void CustomField::setTitle ( const QString &  title)

Definition at line 52 of file customfields.cpp.

◆ setType()

void CustomField::setType ( Type  type)

Definition at line 62 of file customfields.cpp.

◆ setValue()

void CustomField::setValue ( const QString &  value)

Definition at line 82 of file customfields.cpp.

◆ stringToType()

CustomField::Type CustomField::stringToType ( const QString &  type)
static

Definition at line 102 of file customfields.cpp.

◆ title()

QString CustomField::title ( ) const

Definition at line 57 of file customfields.cpp.

◆ toVariantMap()

QVariantMap CustomField::toVariantMap ( ) const

Definition at line 92 of file customfields.cpp.

◆ type()

CustomField::Type CustomField::type ( ) const

Definition at line 67 of file customfields.cpp.

◆ typeToString()

QString CustomField::typeToString ( CustomField::Type  type)
static

Definition at line 129 of file customfields.cpp.

◆ value()

QString CustomField::value ( ) const

Definition at line 87 of file customfields.cpp.


The documentation for this class was generated from the following files:
  • customfields_p.h
  • customfields.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/contact

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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