KOSMIndoorMap
amenitymodel.cpp
106 QString s = QLatin1String(":/org.kde.kosmindoormap/assets/icons/") + entry.icon + QLatin1String(".svg");
122 return Localization::amenityTypes(entry.element.tagValue(entry.typeKey.constData()), Localization::ReturnEmptyOnUnknownKey);
140 auto s = Localization::cuisineTypes(entry.element.tagValue("cuisine"), Localization::ReturnEmptyOnUnknownKey);
144 return Localization::amenityTypes(entry.element.tagValue("vending"), Localization::ReturnEmptyOnUnknownKey);
156 if (const auto subdiv = KCountrySubdivision::fromLocation((float)entry.element.center().latF(), (float)entry.element.center().lonF()); subdiv.isValid()) {
159 if (const auto c = KCountry::fromLocation((float)entry.element.center().latF(), (float)entry.element.center().lonF()); c.isValid()) {
238 const auto groupIt = std::find_if(std::begin(group_map), std::end(group_map), [&group](const auto &m) { return std::strcmp(m.groupName, (*group).constData()) == 0; });
288 m_entries.erase(std::unique(m_entries.begin(), m_entries.end(), [](const auto &lhs, const auto &rhs) {
bool isValid() const
static KCountrySubdivision fromLocation(float latitude, float longitude)
static KCountry fromLocation(float latitude, float longitude)
bool isValid() const
@ DetailsLabelRole
section-dependent details label (e.g. CuisineRole or ToiletDetailsRole)
Definition amenitymodel.h:45
@ RegionCodeRole
ISO 3166-1/2 code of the region this amenity is in (relevant for opening hours interpretation)
Definition amenitymodel.h:43
@ FallbackNameRole
Brand/operator/network name, better than nothing but not the first choice to display.
Definition amenitymodel.h:40
@ TimeZoneRole
IANA timezone id this amenity is in (relevant for opening hours interpretation)
Definition amenitymodel.h:42
bool hasError() const
Returns true if an error occured during parsing and the returned style is invalid.
Definition mapcssparser.cpp:75
Result of MapCSS stylesheet evaluation for all layer selectors.
Definition mapcssresult.h:100
void evaluate(const MapCSSState &state, MapCSSResult &result) const
Evaluates the style sheet for a given state state (OSM element, view state, element state,...
Definition mapcssstyle.cpp:143
void compile(OSM::DataSet &dataSet)
Optimizes style sheet rules for application against dataSet.
Definition mapcssstyle.cpp:76
bool isEmpty() const
Returns true if this is a default-constructed or otherwise empty/invalud style.
Definition mapcssstyle.cpp:71
void initializeState(MapCSSState &state) const
Initializes the evaluation state.
Definition mapcssstyle.cpp:91
TagKey tagKey(const char *keyName) const
Look up a tag key for the given tag name, if it exists.
Definition datatypes.cpp:38
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString cuisineTypes(const QByteArray &value, Localization::TranslationOption opt=Localization::ReturnUnknownKey)
Translated values of the cuisine tag (does list splitting).
Definition localization.cpp:36
QString genderSegregation(OSM::Element element)
Translated gender segregation information e.g.
Definition localization.cpp:41
QString amenityTypes(const QByteArray &value, Localization::TranslationOption opt=Localization::ReturnUnknownKey)
Translated list of amenity tag values (including list splitting).
Definition localization.cpp:23
bool hasAmenityTypeTranslation(const char *value)
Returns true if we can translate value.
Definition localization.cpp:13
OSM-based multi-floor indoor maps for buildings.
Definition locationqueryoverlayproxymodel.h:20
@ FontFamily
the equivalent to CartoCSS's ignore-placement, non-standard extension
Low-level types and functions to work with raw OSM data as efficiently as possible.
Definition locationqueryoverlayproxymodel.h:15
void beginResetModel()
bool checkIndex(const QModelIndex &index, CheckIndexOptions options) const const
void endResetModel()
virtual QHash< int, QByteArray > roleNames() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
const char * constData() const const
bool isEmpty() const const
QList< QByteArray > split(char sep) const const
bool exists() const const
T & first()
int row() const const
Q_EMITQ_EMIT
QObject * parent() const const
QString fromUtf8(QByteArrayView str)
qsizetype size() const const
DisplayRole
QTextStream & center(QTextStream &stream)
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.