KOSMIndoorMap

osmelement.cpp
1 /*
2  SPDX-FileCopyrightText: 2020 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "osmelement.h"
8 
9 using namespace KOSMIndoorMap;
10 
11 OSMElement::OSMElement() = default;
12 OSMElement::OSMElement(OSM::Element e)
13  : m_element(e)
14 {
15 }
16 
17 OSMElement::~OSMElement() = default;
18 
19 bool OSMElement::isNull() const
20 {
21  return m_element.type() == OSM::Type::Null;
22 }
23 
24 QString OSMElement::name() const
25 {
26  return QString::fromUtf8(m_element.tagValue("name", QLocale()));
27 }
28 
29 QString OSMElement::tagValue(const QString &key) const
30 {
31  return QString::fromUtf8(m_element.tagValue(key.toUtf8().constData()));
32 }
33 
34 OSM::Element OSMElement::element() const
35 {
36  return m_element;
37 }
OSM-based multi-floor indoor maps for buildings.
A reference to any of OSM::Node/OSMWay/OSMRelation.
Definition: element.h:22
QString fromUtf8(const char *str, int size)
const char * constData() const const
QByteArray toUtf8() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Oct 25 2021 23:04:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.