KContacts::AddressFormatRepository Class
class KContacts::AddressFormatRepositoryProvides address format information for a given country. More...
Header: | #include <KContacts/AddressFormat> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Contacts) target_link_libraries(mytarget PRIVATE KF6::Contacts) |
Since: | 5.92 |
Static Public Members
KContacts::AddressFormat | formatForAddress(const KContacts::Address &address, KContacts::AddressFormatPreference formatPref = AddressFormatPreference::Generic) |
KContacts::AddressFormat | formatForCountry(const QString &countryCode, KContacts::AddressFormatScriptPreference scriptPref, KContacts::AddressFormatPreference formatPref = AddressFormatPreference::Generic) |
Detailed Description
Member Function Documentation
[static]
KContacts::AddressFormat AddressFormatRepository::formatForAddress(const KContacts::Address &address, KContacts::AddressFormatPreference formatPref = AddressFormatPreference::Generic)
Look up format data for a given address. The preferred script is determined from the script used in the address object. If the address object has no country information set, the local country is assumed.
[static invokable]
KContacts::AddressFormat AddressFormatRepository::formatForCountry(const QString &countryCode, KContacts::AddressFormatScriptPreference scriptPref, KContacts::AddressFormatPreference formatPref = AddressFormatPreference::Generic)
Look up format data for a country. countryCode ISO 3166-1 alpha 2 country code.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.