KOSMIndoorMap
floorlevelchangemodel.cpp
65 const auto it = std::find_if(m_levels.begin(), m_levels.end(), [this](const auto &level) { return level.numericLevel() == m_currentFloorLevel; });
123 // elevators are sometimes also tagged with building:level tags instead of level/repeat_on, so handle that as well
131 const auto buildingUndergroundLevel = m_element.tagValue("building:levels:underground").toUInt();
136 LevelParser::parse(m_element.tagValue("level", "repeat_on"), m_element, [this](int level, OSM::Element e) {
181 m_levels.push_back(m_floorLevelModel->data(idx, FloorLevelModel::MapLevelRole).value<MapLevel>());
191 return m_levels[0].numericLevel() == m_currentFloorLevel || m_levels[1].numericLevel() == m_currentFloorLevel;
199 return m_levels[0].numericLevel() == m_currentFloorLevel ? m_levels[1].numericLevel() : m_levels[0].numericLevel();
207 return m_levels[0].numericLevel() == m_currentFloorLevel ? m_levels[1].name() : m_levels[0].name();
int destinationLevel
The destination level for a single level change.
Definition floorlevelchangemodel.h:39
QString title
Human-readable title of the thing enabling a floor level change here.
Definition floorlevelchangemodel.h:50
int currentFloorLevelRow
The model row representing the current floor level.
Definition floorlevelchangemodel.h:31
bool hasSingleLevelChange
The current element changes to a single other floor, ie.
Definition floorlevelchangemodel.h:37
bool hasMultipleLevelChanges
The current element changes to multiple levels based on users choice, ie.
Definition floorlevelchangemodel.h:45
Q_INVOKABLE int rowForLevel(int level) const
Maps a floor level to a model row index.
Definition floorlevelmodel.cpp:59
QString i18n(const char *text, const TYPE &arg...)
OSM-based multi-floor indoor maps for buildings.
Definition locationqueryoverlayproxymodel.h:20
QStringView level(QStringView ifopt)
void beginResetModel()
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles)
void endResetModel()
void modelAboutToBeReset()
virtual QHash< int, QByteArray > roleNames() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
bool isEmpty() const const
uint toUInt(bool *ok, int base) const const
bool isValid() const const
int row() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
DisplayRole
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:02:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:02:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.