Changeset View
Changeset View
Standalone View
Standalone View
src/lib/marble/declarative/Placemark.cpp
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | |||||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | QString Placemark::description() const | 64 | QString Placemark::description() const | ||
65 | { | 65 | { | ||
66 | if (m_description.isEmpty()) { | 66 | if (m_description.isEmpty()) { | ||
67 | auto const category = m_placemark.visualCategory(); | 67 | auto const category = m_placemark.visualCategory(); | ||
68 | m_description = m_placemark.categoryName(); | 68 | m_description = m_placemark.categoryName(); | ||
69 | 69 | | |||
70 | int const level = m_placemark.osmData().tagValue(QStringLiteral("level")).toInt(); | ||||
71 | if (level != 0) { | ||||
72 | addTagValue(m_description, QStringLiteral("level"), tr("Level %1", "Current level of a multi-storey building")); | ||||
73 | } | ||||
74 | | ||||
70 | if (category == GeoDataPlacemark::AccomodationHotel || category == GeoDataPlacemark::FoodRestaurant) { | 75 | if (category == GeoDataPlacemark::AccomodationHotel || category == GeoDataPlacemark::FoodRestaurant) { | ||
71 | QString const stars = m_placemark.osmData().tagValue(QStringLiteral("stars")); | 76 | QString const stars = m_placemark.osmData().tagValue(QStringLiteral("stars")); | ||
72 | if (!stars.isEmpty()) { | 77 | if (!stars.isEmpty()) { | ||
73 | bool hasStars; | 78 | bool hasStars; | ||
74 | int const numStars = stars.mid(0, 1).toInt(&hasStars); | 79 | int const numStars = stars.mid(0, 1).toInt(&hasStars); | ||
75 | if (hasStars) { | 80 | if (hasStars) { | ||
76 | m_description += QString(' ') + QString("*").repeated(numStars) + stars.mid(1); | 81 | m_description += QString(' ') + QString("*").repeated(numStars) + stars.mid(1); | ||
77 | } else { | 82 | } else { | ||
▲ Show 20 Lines • Show All 451 Lines • Show Last 20 Lines |