KOSMIndoorMap

localization.h
1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KOSMINDOORMAP_LOCALIZATION_H
7#define KOSMINDOORMAP_LOCALIZATION_H
8
9class QByteArray;
10class QString;
11
12namespace OSM {
13class Element;
14}
15
16namespace KOSMIndoorMap {
17
18/** Translations of various OSM tag values. */
19namespace Localization
20{
21
22/** Control how unknown elements get translated. */
24 ReturnUnknownKey,
25 ReturnEmptyOnUnknownKey
26};
27
28/** Returns @c true if we can translate @p value. */
29bool hasAmenityTypeTranslation(const char *value);
30
31/** Translated name for an amenity tag value (after list splitting).
32 * This also covers values of similar/overlapping tags (office, tourism, leisure, historic, room, building, etc).
33 */
34QString amenityType(const char *value, Localization::TranslationOption opt = Localization::ReturnUnknownKey);
35
36/** Translated list of amenity tag values (including list splitting).
37 * This also covers values of similar/overlapping tags (office, tourism, leisure, historic, room, building, etc).
38 */
39QString amenityTypes(const QByteArray &value, Localization::TranslationOption opt = Localization::ReturnUnknownKey);
40
41/** Translated values of the cuisine tag (does list splitting). */
42QString cuisineTypes(const QByteArray &value, Localization::TranslationOption opt = Localization::ReturnUnknownKey);
43
44/** Translated gender segregation information e.g. for toilets. */
45[[nodiscard]] QString genderSegregation(OSM::Element element);
46/** Checks whether @p element contains a known key for gender segregation information. */
47[[nodiscard]] bool hasGenderSegregrationKey(OSM::Element element);
48}
49
50}
51
52#endif // KOSMINDOORMAP_LOCALIZATION_H
A reference to any of OSM::Node/OSMWay/OSMRelation.
Definition element.h:24
QString cuisineTypes(const QByteArray &value, Localization::TranslationOption opt=Localization::ReturnUnknownKey)
Translated values of the cuisine tag (does list splitting).
QString genderSegregation(OSM::Element element)
Translated gender segregation information e.g.
bool hasGenderSegregrationKey(OSM::Element element)
Checks whether element contains a known key for gender segregation information.
QString amenityTypes(const QByteArray &value, Localization::TranslationOption opt=Localization::ReturnUnknownKey)
Translated list of amenity tag values (including list splitting).
bool hasAmenityTypeTranslation(const char *value)
Returns true if we can translate value.
QString amenityType(const char *value, Localization::TranslationOption opt=Localization::ReturnUnknownKey)
Translated name for an amenity tag value (after list splitting).
TranslationOption
Control how unknown elements get translated.
OSM-based multi-floor indoor maps for buildings.
Low-level types and functions to work with raw OSM data as efficiently as possible.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:57:46 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.