KContacts
addressformat.cpp
76 return std::accumulate(d->elements.begin(), d->elements.end(), AddressFormatFields(AddressFormatField::NoField), [](auto lhs, const auto &rhs) {
111AddressFormatRepository::formatForCountry(const QString &countryCode, AddressFormatScriptPreference scriptPref, AddressFormatPreference formatPref)
122 if (scriptPref == AddressFormatScriptPreference::Latin && formatPref == AddressFormatPreference::Business) {
132 formatString = group.readEntry("AddressFormat", QStringLiteral("%N%n%O%n%A%nPO BOX %P%n%C %S %Z"));
140AddressFormat AddressFormatRepository::formatForAddress(const Address &address, AddressFormatPreference formatPref)
KConfigGroup group(const QString &group)
QString readEntry(const char *key, const char *aDefault=nullptr) const
SimpleConfig
static KContacts::AddressFormat formatForAddress(const Address &address, AddressFormatPreference formatPref=AddressFormatPreference::Generic)
Look up format data for a given address.
Definition addressformat.cpp:140
static Q_INVOKABLE KContacts::AddressFormat formatForCountry(const QString &countryCode, KContacts::AddressFormatScriptPreference scriptPref, KContacts::AddressFormatPreference formatPref=AddressFormatPreference::Generic)
Look up format data for a country.
Definition addressformat.cpp:111
Information on how addresses are formatted in a specific country/language.
Definition addressformat.h:69
static KCountry fromAlpha2(const char *alpha2Code)
static KCountry fromName(QStringView name)
static KCountry fromQLocale(QLocale::Country country)
AddressFormatPreference
Indicate whether to prefer an address format for (postal) business address or a generic one.
Definition namespace.h:82
AddressFormatScriptPreference
Indicate whether to use a address format in the local script or a Latin transliteration.
Definition namespace.h:72
void reserve(qsizetype size)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:58:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 11:58:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.