[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Aug 7 00:01:27 CEST 2010
SVN commit 1160061 by tgridel:
PositionTracking: styling the gps track
M +1 -1 geodata/handlers/gpx/GPXgpxTagHandler.cpp
M +17 -0 gps/PositionTracking.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/gpx/GPXgpxTagHandler.cpp #1160060:1160061
@@ -42,7 +42,7 @@
GeoDataStyle style;
GeoDataLineStyle lineStyle;
- lineStyle.setColor(Qt::green);
+ lineStyle.setColor(QColor("#37A42C")); // Oxygen green
lineStyle.setWidth(2);
style.setLineStyle(lineStyle);
style.setStyleId("track");
--- trunk/KDE/kdeedu/marble/src/lib/gps/PositionTracking.cpp #1160060:1160061
@@ -14,6 +14,8 @@
#include "GeoDataDocument.h"
#include "GeoDataPlacemark.h"
+#include "GeoDataStyle.h"
+#include "GeoDataStyleMap.h"
#include "AbstractProjection.h"
#include "FileManager.h"
#include "MarbleMath.h"
@@ -42,6 +44,21 @@
multiGeometry->append(lineString);
placemark->setGeometry(multiGeometry);
placemark->setName("Current Track");
+
+ GeoDataStyle style;
+ GeoDataLineStyle lineStyle;
+ lineStyle.setColor(QColor("#E20700")); // Oxygen Red
+ lineStyle.setWidth(2);
+ style.setLineStyle(lineStyle);
+ style.setStyleId("track");
+
+ GeoDataStyleMap styleMap;
+ styleMap.setStyleId("map-track");
+ styleMap.insert("normal", QString("#").append(style.styleId()));
+ m_document->addStyleMap(styleMap);
+ m_document->addStyle(style);
+
+ placemark->setStyleUrl(QString("#").append(styleMap.styleId()));
m_document->append(placemark);
m_fileManager->addGeoDataDocument(m_document);
More information about the Marble-commits
mailing list