1 | /* |
---|---|
2 | SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org> |
3 | SPDX-License-Identifier: LGPL-2.0-or-later |
4 | */ |
5 | |
6 | #ifndef KCONTACTS_ADDRESSFORMAT_P_H |
7 | #define KCONTACTS_ADDRESSFORMAT_P_H |
8 | |
9 | #include "addressformat.h" |
10 | |
11 | #include <QSharedData> |
12 | |
13 | namespace KContacts |
14 | { |
15 | |
16 | class AddressFormatElementPrivate : public QSharedData |
17 | { |
18 | public: |
19 | static inline AddressFormatElementPrivate *get(const AddressFormatElement &elem) |
20 | { |
21 | return elem.d.data(); |
22 | } |
23 | |
24 | AddressFormatField field = AddressFormatField::NoField; |
25 | QString literal; |
26 | }; |
27 | |
28 | class AddressFormatPrivate : public QSharedData |
29 | { |
30 | public: |
31 | static inline AddressFormatPrivate *get(const AddressFormat &format) |
32 | { |
33 | return format.d.data(); |
34 | } |
35 | |
36 | AddressFormatFields upper = AddressFormatField::NoField; |
37 | AddressFormatFields required = AddressFormatField::NoField; |
38 | std::vector<AddressFormatElement> elements; |
39 | QString postalCodeFormat; |
40 | QString country; |
41 | }; |
42 | |
43 | } |
44 | |
45 | #endif // KCONTACTS_ADDRESSFORMAT_P_H |
46 |