summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-06 15:12:54 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-06 15:12:54 (GMT)
commitbbd333570bf9e3b5962fe24f7dfd477f7b532d79 (patch)
treedb0bf416e5d25c07457fb2725b26c162e3b25ec7
parent72b2815f5d8b8c895d178ee27d0596e9c4edd7df (diff)
No need for a dynamic style to always hide the label
-rw-r--r--src/lib/marble/StyleBuilder.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/lib/marble/StyleBuilder.cpp b/src/lib/marble/StyleBuilder.cpp
index 0f3ce8f..bd48b58 100644
--- a/src/lib/marble/StyleBuilder.cpp
+++ b/src/lib/marble/StyleBuilder.cpp
@@ -689,7 +689,7 @@ void StyleBuilder::Private::initializeDefaultStyles()
m_defaultStyle[GeoDataPlacemark::HighwaySteps] = createStyle(0.0, 2.0, "#fa8072", QColor(Qt::white), true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, false, QVector< qreal >() << 0.3 << 0.3, osmFont);
m_defaultStyle[GeoDataPlacemark::HighwayUnknown] = createHighwayStyle("#dddddd", "#bbbbbb", osmFont, "000000", 0, 1);
m_defaultStyle[GeoDataPlacemark::HighwayPath] = createHighwayStyle("#dddde8", "#999999", osmFont, "000000", 0, 1, Qt::DotLine, Qt::SquareCap, true);
- m_defaultStyle[GeoDataPlacemark::HighwayTrack] = createHighwayStyle("#996600", QColor(Qt::white), osmFont, "000000", 1, 1, Qt::DashLine, Qt::SquareCap, true);
+ m_defaultStyle[GeoDataPlacemark::HighwayTrack] = createHighwayStyle("#996600", QColor(Qt::white), osmFont, QColor(Qt::transparent), 1, 1, Qt::DashLine, Qt::SquareCap, true);
m_defaultStyle[GeoDataPlacemark::HighwayPedestrian] = createHighwayStyle("#dddde8", "#999999", osmFont, "000000", 0, 2);
m_defaultStyle[GeoDataPlacemark::HighwayPedestrian]->polyStyle().setOutline(false);
m_defaultStyle[GeoDataPlacemark::HighwayFootway] = createHighwayStyle("#fa8072", QColor(Qt::white), osmFont, "000000", 0, 2, Qt::DotLine, Qt::SquareCap, true);
@@ -765,18 +765,18 @@ void StyleBuilder::Private::initializeDefaultStyles()
m_defaultStyle[GeoDataPlacemark::MilitaryDangerArea] = createWayStyle("#FFC0CB", "#FFC0CB", true, false, Qt::SolidPattern, MarbleDirs::path("bitmaps/osmcarto/patterns/danger.png"));
- m_defaultStyle[GeoDataPlacemark::RailwayRail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3, osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayNarrowGauge] = createStyle(2.0, 1.0, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3, osmFont);
+ m_defaultStyle[GeoDataPlacemark::RailwayRail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3, osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayNarrowGauge] = createStyle(2.0, 1.0, "#706E70", "#EEEEEE", true, true, Qt::SolidPattern, Qt::CustomDashLine, Qt::FlatCap, true, QVector< qreal >() << 2 << 3, osmFont, QColor(Qt::transparent));
// FIXME: the tram is currently being rendered as a polygon.
- m_defaultStyle[GeoDataPlacemark::RailwayTram] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayLightRail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayAbandoned] = createStyle(2.0, 1.435, Qt::transparent, "#706E70", false, false, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwaySubway] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayPreserved] = createStyle(2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayMiniature] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayConstruction] = createStyle(2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayMonorail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
- m_defaultStyle[GeoDataPlacemark::RailwayFunicular] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont);
+ m_defaultStyle[GeoDataPlacemark::RailwayTram] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayLightRail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayAbandoned] = createStyle(2.0, 1.435, Qt::transparent, "#706E70", false, false, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwaySubway] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayPreserved] = createStyle(2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayMiniature] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayConstruction] = createStyle(2.0, 1.435, "#EEEEEE", "#706E70", true, true, Qt::SolidPattern, Qt::DotLine, Qt::FlatCap, true, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayMonorail] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
+ m_defaultStyle[GeoDataPlacemark::RailwayFunicular] = createStyle(2.0, 1.435, "#706E70", "#EEEEEE", false, true, Qt::SolidPattern, Qt::SolidLine, Qt::FlatCap, false, QVector<qreal>(), osmFont, QColor(Qt::transparent));
m_defaultStyle[GeoDataPlacemark::Building] = createStyle(1, 0, buildingColor, buildingColor.darker(),
true, true, Qt::SolidPattern, Qt::SolidLine, Qt::RoundCap, false, QVector<qreal>(), osmFont);
@@ -1380,9 +1380,6 @@ GeoDataStyle::ConstPtr StyleBuilder::createStyle(const StyleParameters &paramete
float const width = widthValue.toFloat(&ok);
lineStyle.setPhysicalWidth(ok ? qBound(0.1f, width, 200.0f) : 0.0f);
}
- } else if (visualCategory == GeoDataPlacemark::HighwayTrack
- || (visualCategory >= GeoDataPlacemark::RailwayRail && visualCategory <= GeoDataPlacemark::RailwayFunicular)) {
- labelStyle.setColor(QColor(Qt::transparent));
}
GeoDataStyle::Ptr newStyle(new GeoDataStyle(*style));
newStyle->setPolyStyle(polyStyle);