9#include "contactmetadatabase_p.h"
13class Akonadi::ContactMetaDataBasePrivate
16 int mDisplayNameMode = -1;
17 QVariantList mCustomFieldDescriptions;
20ContactMetaDataBase::ContactMetaDataBase()
21 : d(new ContactMetaDataBasePrivate)
25ContactMetaDataBase::~ContactMetaDataBase() =
default;
27void ContactMetaDataBase::loadMetaData(
const QVariantMap &metaData)
29 d->mDisplayNameMode = metaData.value(QStringLiteral(
"DisplayNameMode"), -1).toInt();
31 d->mCustomFieldDescriptions = metaData.value(QStringLiteral(
"CustomFieldDescriptions")).toList();
34QVariantMap ContactMetaDataBase::storeMetaData()
const
37 if (d->mDisplayNameMode != -1) {
38 metaData.insert(QStringLiteral(
"DisplayNameMode"),
QVariant(d->mDisplayNameMode));
41 if (!d->mCustomFieldDescriptions.isEmpty()) {
42 metaData.insert(QStringLiteral(
"CustomFieldDescriptions"), d->mCustomFieldDescriptions);
47void ContactMetaDataBase::setDisplayNameMode(
int mode)
49 d->mDisplayNameMode = mode;
52int ContactMetaDataBase::displayNameMode()
const
54 return d->mDisplayNameMode;
57void ContactMetaDataBase::setCustomFieldDescriptions(
const QVariantList &descriptions)
59 d->mCustomFieldDescriptions = descriptions;
62QVariantList ContactMetaDataBase::customFieldDescriptions()
const
64 return d->mCustomFieldDescriptions;
A widget for editing the display name of a contact.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:45 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.