KOSMIndoorMap

osmelement.h
1/*
2 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KOSMINDOORMAP_OSMELEMENT_H
8#define KOSMINDOORMAP_OSMELEMENT_H
9
10#include <osm/element.h>
11
12#include <QMetaType>
13#include <QUrl>
14
15namespace KOSMIndoorMap {
16
17/** QML wrapper around an OSM element. */
19{
20 Q_GADGET
21 Q_PROPERTY(bool isNull READ isNull)
22 Q_PROPERTY(QString name READ name)
23 Q_PROPERTY(QString url READ url)
24 Q_PROPERTY(OSM::Element element READ element)
25public:
26 OSMElement();
27 explicit OSMElement(OSM::Element e);
29
30 [[nodiscard]] bool isNull() const;
31 [[nodiscard]] QString name() const;
32 [[nodiscard]] QString url() const;
33
34 [[nodiscard]] Q_INVOKABLE QString tagValue(const QString &key) const;
35
36 // @internal
37 [[nodiscard]] OSM::Element element() const;
38
39private:
40 OSM::Element m_element;
41};
42
43}
44
45Q_DECLARE_METATYPE(KOSMIndoorMap::OSMElement)
46
47#endif // KOSMINDOORMAP_OSMELEMENT_H
QML wrapper around an OSM element.
Definition osmelement.h:19
A reference to any of OSM::Node/OSM::Way/OSM::Relation.
Definition element.h:24
OSM-based multi-floor indoor maps for buildings.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.