_8h_source

namespace.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KCONTACTS_NAMESPACE_H
7#define KCONTACTS_NAMESPACE_H
8
9#include "kcontacts_export.h"
10
11#include <QMetaType>
12
13/** @file namespace.h
14 * Everything that needs to go in to the KContacts Q_NAMESPACE meta object.
15 */
16
17namespace KContacts
18{
19KCONTACTS_EXPORT Q_NAMESPACE
20
21 /** Address formatting styles.
22 * @see KContacts::Address::formatted
23 * @since 5.92
24 */
25 enum class AddressFormatStyle {
26 Postal, ///< Format used for addressing postal mail
27 MultiLineDomestic, ///< Multi-line format without country, for displaying
28 MultiLineInternational, ///< Multi-line format including the country, for displaying
29 SingleLineDomestic, ///< Single-line format without country, for displaying
30 SingleLineInternational, ///< Single-line format including the country, for displaying
31 GeoUriQuery, ///< Format used in geo: URI query expressions
32 };
33
34Q_ENUM_NS(AddressFormatStyle)
35
36/** Address field types.
37 * These are the field types that can be referenced in address format rules.
38 * @note Not all of those are represented by vCard and thus KContacts, but exist
39 * only for compatibility with libaddressinput, so format rules from that can be
40 * consumed directly.
41 * @see KContacts::AddressFormat
42 * @since 5.92
43 */
45 NoField = 0,
46 // from libaddressinput
47 Country = 1,
48 Region = 2,
49 Locality = 4,
50 DependentLocality = 8, // not used by us
51 SortingCode = 16, // not used by us
52 PostalCode = 32,
53 StreetAddress = 64,
54 Organization = 128,
55 Name = 256,
56 // added by us for vCard compat
57 PostOfficeBox = 512,
58};
59Q_ENUM_NS(AddressFormatField)
60
61/** A set of address fields.
62 * @see KContacts::AddressFormat
63 * @since 5.92
64 */
66Q_FLAG_NS(AddressFormatFields)
67
68/** Indicate whether to use a address format in the local script or a Latin transliteration.
69 * @see KContacts::AddressFormatRepository
70 * @since 5.92
71 */
73 Local,
74 Latin,
75};
76Q_ENUM_NS(AddressFormatScriptPreference)
77
78/** Indicate whether to prefer an address format for (postal) business address or a generic one.
79 * @see KContacts::AddressFormatRepository
80 * @since 5.92
81 */
82enum class AddressFormatPreference { Generic, Business };
83Q_ENUM_NS(AddressFormatPreference)
84}
85
86Q_DECLARE_OPERATORS_FOR_FLAGS(KContacts::AddressFormatFields)
87
88#endif // KCONTACTS_NAMESPACE_H
AddressFormatPreference
Indicate whether to prefer an address format for (postal) business address or a generic one.
Definition namespace.h:82
AddressFormatStyle
Address formatting styles.
Definition namespace.h:25
@ GeoUriQuery
Format used in geo: URI query expressions.
@ Postal
Format used for addressing postal mail.
@ MultiLineDomestic
Multi-line format without country, for displaying.
@ SingleLineInternational
Single-line format including the country, for displaying.
@ MultiLineInternational
Multi-line format including the country, for displaying.
@ SingleLineDomestic
Single-line format without country, for displaying.
AddressFormatScriptPreference
Indicate whether to use a address format in the local script or a Latin transliteration.
Definition namespace.h:72
AddressFormatField
Address field types.
Definition namespace.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.