akonadi
#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 |
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()
|
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()
|
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()
|
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:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.