Marble

MarblePlacemarkModel_P.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <tackat@kde.org>
4//
5
6#ifndef MARBLE_MARBLEPLACEMARKMODEL_P_H
7#define MARBLE_MARBLEPLACEMARKMODEL_P_H
8
9#include <QChar>
10#include <QRegularExpression>
11#include <QString>
12
13namespace Marble
14{
15
16namespace GeoString
17{
18static const QRegularExpression combiningDiacriticalMarks(QStringLiteral("[\\x0300-\\x036F]+"));
19
20QString deaccent(const QString &accentString)
21{
22 QString result;
23
24 result = accentString.normalized(QString::NormalizationForm_D).remove(combiningDiacriticalMarks);
25 result.replace(QChar(0x00F8), QLatin1Char('o'));
26 result.replace(QChar(0x0142), QLatin1Char('l'));
27 return result;
28}
29}
30}
31
32#endif
Binds a QML item to a specific geodetic location in screen coordinates.
NormalizationForm_D
QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.