KOSMIndoorMap
7#ifndef KOSMINDOORMAP_OSMELEMENTINFORMATIONMODEL_H
8#define KOSMINDOORMAP_OSMELEMENTINFORMATIONMODEL_H
10#include "osmelement.h"
12#include <osm/element.h>
14#include <wikidata/entities.h>
15#include <wikidata/wikidataquerymanager.h>
17#include <QAbstractListModel>
30 Q_PROPERTY(
bool allowOnlineContent MEMBER m_allowOnlineContent NOTIFY allowOnlineContentChanged)
34 explicit OSMElementInformationModel(
QObject *
parent =
nullptr);
35 ~OSMElementInformationModel();
96 PaymentStoredValueCard,
123 [[nodiscard]]
QString name()
const;
124 [[nodiscard]]
QString category()
const;
131 void elementChanged();
132 void allowOnlineContentChanged();
139 void resolveOnlineContent();
141 void resolveCategories();
143 void resolveHeaders();
144 [[nodiscard]]
bool promoteMainCategory(KeyCategory cat);
145 [[nodiscard]]
QString categoryLabel(KeyCategory cat)
const;
146 [[nodiscard]]
QString debugTagKey(
int row)
const;
147 [[nodiscard]]
QString debugTagValue(
int row)
const;
148 [[nodiscard]]
QUrl debugTagUrl(
int row)
const;
149 [[nodiscard]]
QString keyName(Key key)
const;
150 [[nodiscard]]
QVariant valueForKey(Info info)
const;
152 [[nodiscard]]
QString paymentMethodList(Key key)
const;
153 [[nodiscard]]
QString paymentMethodValue(Key key)
const;
155 [[nodiscard]]
QString capacitryValue(
const char *prop)
const;
158 template <
typename KeyMapEntry, std::
size_t N>
159 void addEntryForKey(
const char *keyName,
const KeyMapEntry(&map)[N]);
160 template <
typename KeyMapEntry, std::
size_t N>
161 void addEntryForLocalizedKey(
const char *keyName,
const KeyMapEntry(&map)[N]);
167 KeyCategory category;
169 [[nodiscard]]
bool operator<(Info other)
const;
170 [[nodiscard]]
bool operator==(Info other)
const;
172 std::vector<Info> m_infos;
174 Key m_nameKey = NoKey;
175 Key m_categoryKey = NoKey;
176 bool m_allowOnlineContent =
false;
177 bool m_debug =
false;
QML wrapper around an OSM element.
A reference to any of OSM::Node/OSMWay/OSMRelation.
Languages in preference order to consider when looking up translated tag values.
Executes wikidata queries.
OSM-based multi-floor indoor maps for buildings.
virtual QModelIndex parent(const QModelIndex &index) const const=0
QAbstractListModel(QObject *parent)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:06:40 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.