KOSMIndoorMap

routeoverlay.h
1/*
2 SPDX-FileCopyrightText: 2024 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KOSMINDOORROUTING_ROUTEOVERLAY_H
7#define KOSMINDOORROUTING_ROUTEOVERLAY_H
8
9#include "kosmindoorrouting_export.h"
10#include "route.h"
11
12#include <KOSMIndoorMap/MapData>
13#include <KOSMIndoorMap/OverlaySource>
14
15namespace KOSMIndoorRouting {
16
17class KOSMINDOORROUTING_EXPORT RouteOverlay : public KOSMIndoorMap::AbstractOverlaySource
18{
19 Q_OBJECT
20public:
21 explicit RouteOverlay(QObject *parent = nullptr);
22 ~RouteOverlay();
23
24 void setMapData(const KOSMIndoorMap::MapData &mapData);
25
26 void setStart(OSM::Coordinate c, int level);
27 void setEnd(OSM::Coordinate c, int level);
28 void setRoute(const Route &route);
29
30 void forEach(int floorLevel, const std::function<void(OSM::Element, int)> &func) const override;
31 void endSwap() override;
32 [[nodiscard]] const std::vector<OSM::Node>* transientNodes() const override;
33
34private:
35 KOSMIndoorMap::MapData m_data;
36 OSM::TagKey m_mxRouteKey;
37
38 OSM::UniqueElement m_startNode;
39 OSM::UniqueElement m_endNode;
40 std::vector<OSM::UniqueElement> m_routeWays;
41 std::vector<int> m_routeWayFloorLevels;
42 std::vector<OSM::Node> m_transientNodes;
43
44 int m_startLevel = 0;
45 int m_endLevel = 0;
46 Route m_route;
47
48 std::vector<OSM::UniqueElement> m_gc;
49 std::vector<std::vector<OSM::Node>> m_transientNodesGC;
50};
51
52}
53
54#endif
void forEach(const typename Trait::template Vector< ItemType > &types, std::shared_ptr< Document< Trait > > doc, ItemFunctor< Trait > func, unsigned int maxNestingLevel=0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:54:42 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.