1 | /* |
2 | SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org> |
3 | SPDX-License-Identifier: LGPL-2.0-or-later |
4 | */ |
5 | |
6 | #ifndef KCONTACTS_ADDRESSFORMATSCRIPT_P_H |
7 | #define KCONTACTS_ADDRESSFORMATSCRIPT_P_H |
8 | |
9 | #include "addressformat.h" |
10 | |
11 | namespace KContacts |
12 | { |
13 | |
14 | /** |
15 | * Classify the script used in an address. |
16 | * This is used for two things: |
17 | * - determining the line style separator |
18 | * - decide whether to use local or latin script format alternatives when available |
19 | * |
20 | * @see address_formatter.cc in libaddressinput |
21 | * @internal |
22 | */ |
23 | namespace AddressFormatScript |
24 | { |
25 | enum ScriptType { |
26 | LatinLikeScript, |
27 | ArabicLikeScript, |
28 | HanLikeScript, |
29 | HangulLikeScript, |
30 | }; |
31 | |
32 | ScriptType detect(const QString &s); |
33 | ScriptType detect(const Address &addr); |
34 | } |
35 | } |
36 | |
37 | #endif // KCONTACTS_ADDRESSFORMATSCRIPT_P_H |
38 | |