summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2015-09-20 14:19:21 +0200
committerDennis Nienhüser <[email protected]>2015-09-20 14:19:37 +0200
commitca4c4df1a2b0d6f9a9a610dd7d1fe93d6201ce21 (patch)
treeb3352aa38b18e46576f9004664cb32120cb75b15
parentf59d559347fea1e2ada00e111f1faaaa74151614 (diff)
Provide a proper runtime trace description for all layers
-rw-r--r--src/lib/marble/MarbleWidget.cpp2
-rw-r--r--src/lib/marble/VectorTileModel.cpp5
-rw-r--r--src/lib/marble/VectorTileModel.h2
-rw-r--r--src/lib/marble/layers/VectorTileLayer.cpp10
-rw-r--r--src/lib/marble/layers/VectorTileLayer.h2
-rw-r--r--src/lib/marble/routing/RoutingLayer.cpp5
-rw-r--r--src/lib/marble/routing/RoutingLayer.h2
7 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/marble/MarbleWidget.cpp b/src/lib/marble/MarbleWidget.cpp
index f5d57be..cba71a9 100644
--- a/src/lib/marble/MarbleWidget.cpp
+++ b/src/lib/marble/MarbleWidget.cpp
@@ -78,6 +78,8 @@ class MarbleWidget::CustomPaintLayer : public LayerInterface
RenderState renderState() const { return RenderState( "Custom Widget Paint" ); }
+ QString runtimeTrace() const { return QString( "MarbleWidget::CustomPaintLayer" ); }
+
private:
MarbleWidget *const m_widget;
};
diff --git a/src/lib/marble/VectorTileModel.cpp b/src/lib/marble/VectorTileModel.cpp
index 7cb018d..e4d89c7 100644
--- a/src/lib/marble/VectorTileModel.cpp
+++ b/src/lib/marble/VectorTileModel.cpp
@@ -164,6 +164,11 @@ int VectorTileModel::tileZoomLevel() const
return m_tileZoomLevel;
}
+int VectorTileModel::cachedDocuments() const
+{
+ return m_documents.size();
+}
+
void VectorTileModel::updateTile( const TileId &id, GeoDataDocument *document )
{
if ( m_tileZoomLevel != id.zoomLevel() ) {
diff --git a/src/lib/marble/VectorTileModel.h b/src/lib/marble/VectorTileModel.h
index 016b22a..036872e 100644
--- a/src/lib/marble/VectorTileModel.h
+++ b/src/lib/marble/VectorTileModel.h
@@ -63,6 +63,8 @@ public:
int tileZoomLevel() const;
+ int cachedDocuments() const;
+
public Q_SLOTS:
void updateTile( const TileId &id, GeoDataDocument *document );
diff --git a/src/lib/marble/layers/VectorTileLayer.cpp b/src/lib/marble/layers/VectorTileLayer.cpp
index 48033cc..cd16b4f 100644
--- a/src/lib/marble/layers/VectorTileLayer.cpp
+++ b/src/lib/marble/layers/VectorTileLayer.cpp
@@ -129,6 +129,16 @@ int VectorTileLayer::tileZoomLevel() const
return level;
}
+QString VectorTileLayer::runtimeTrace() const
+{
+ int tiles = 0;
+ foreach(const auto *mapper, d->m_activeTexmappers ) {
+ tiles += mapper->cachedDocuments();
+ }
+ int const layers = d->m_activeTexmappers.size();
+ return QString("Vector Tiles: %1 tiles in %2 layers").arg(tiles).arg(layers);
+}
+
bool VectorTileLayer::render( GeoPainter *painter, ViewportParams *viewport,
const QString &renderPos, GeoSceneLayer *layer )
{
diff --git a/src/lib/marble/layers/VectorTileLayer.h b/src/lib/marble/layers/VectorTileLayer.h
index 251d2ac..0a73e5f 100644
--- a/src/lib/marble/layers/VectorTileLayer.h
+++ b/src/lib/marble/layers/VectorTileLayer.h
@@ -58,6 +58,8 @@ class VectorTileLayer : public QObject, public LayerInterface
int tileZoomLevel() const;
+ QString runtimeTrace() const;
+
Q_SIGNALS:
void tileLevelChanged(int tileLevel);
diff --git a/src/lib/marble/routing/RoutingLayer.cpp b/src/lib/marble/routing/RoutingLayer.cpp
index 7c89ad1..6b534bb 100644
--- a/src/lib/marble/routing/RoutingLayer.cpp
+++ b/src/lib/marble/routing/RoutingLayer.cpp
@@ -778,6 +778,11 @@ bool RoutingLayer::isInteractive() const
return d->m_isInteractive;
}
+QString RoutingLayer::runtimeTrace() const
+{
+ return QString("Routing Layer");
+}
+
} // namespace Marble
#include "moc_RoutingLayer.cpp"
diff --git a/src/lib/marble/routing/RoutingLayer.h b/src/lib/marble/routing/RoutingLayer.h
index f186cbd..68a56e2 100644
--- a/src/lib/marble/routing/RoutingLayer.h
+++ b/src/lib/marble/routing/RoutingLayer.h
@@ -89,6 +89,8 @@ public:
*/
bool isInteractive() const;
+ QString runtimeTrace() const;
+
Q_SIGNALS:
/**
* A placemark was selected (clicked) by the user. The index belongs to