summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-10 17:48:02 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-10 17:48:02 (GMT)
commitb58558ccd379258d3259e16cfe8fe3fe80fbaf66 (patch)
tree44c3e5c8801c894256f8f237c762ad06c31552a3
parent620499fdb830ced95e0ab3b4b8f635aa59db13d6 (diff)
Add developer options for inertial rotation and batch debug rendering
-rw-r--r--src/apps/marble-maps/DeveloperDialog.qml15
-rw-r--r--src/lib/marble/declarative/MarbleQuickItem.cpp6
-rw-r--r--src/lib/marble/declarative/MarbleQuickItem.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/src/apps/marble-maps/DeveloperDialog.qml b/src/apps/marble-maps/DeveloperDialog.qml
index 78af4a6..984889d 100644
--- a/src/apps/marble-maps/DeveloperDialog.qml
+++ b/src/apps/marble-maps/DeveloperDialog.qml
@@ -28,10 +28,12 @@ Item {
id: settings
Component.onDestruction: {
+ settings.setValue("Developer", "inertialGlobeRotation", marbleMaps.inertialGlobeRotation)
settings.setValue("Developer", "positionProvider", marbleMaps.currentPositionProvider)
settings.setValue("Developer", "runtimeTrace", runtimeTrace.checked ? "true" : "false")
settings.setValue("Developer", "debugPlacemarks", debugPlacemarks.checked ? "true" : "false")
settings.setValue("Developer", "debugPolygons", debugPolygons.checked ? "true" : "false")
+ settings.setValue("Developer", "debugBatches", debugBatches.checked ? "true" : "false")
}
}
@@ -60,6 +62,12 @@ Item {
}
CheckBox {
+ text: "Inertial Rotation"
+ checked: settings.value("Developer", "inertialGlobeRotation") === "true"
+ onCheckedChanged: marbleMaps.inertialGlobeRotation = checked
+ }
+
+ CheckBox {
text: "GPS Simulation"
checked: settings.value("Developer", "positionProvider") === "RouteSimulationPositionProviderPlugin"
onCheckedChanged: marbleMaps.currentPositionProvider = checked ? "RouteSimulationPositionProviderPlugin" : "QtPositioning"
@@ -90,6 +98,13 @@ Item {
checked: settings.value("Developer", "debugPolygons") === "true"
onCheckedChanged: marbleMaps.setShowDebugPolygons(checked)
}
+
+ CheckBox {
+ id: debugBatches
+ text: "Batches"
+ checked: settings.value("Developer", "debugBatches") === "true"
+ onCheckedChanged: marbleMaps.setShowDebugBatches(checked)
+ }
}
}
}
diff --git a/src/lib/marble/declarative/MarbleQuickItem.cpp b/src/lib/marble/declarative/MarbleQuickItem.cpp
index 7d09383..e5c032e 100644
--- a/src/lib/marble/declarative/MarbleQuickItem.cpp
+++ b/src/lib/marble/declarative/MarbleQuickItem.cpp
@@ -900,6 +900,12 @@ namespace Marble
update();
}
+ void MarbleQuickItem::setShowDebugBatches(bool showDebugBatches)
+ {
+ d->m_map.setShowDebugBatchRender(showDebugBatches);
+ update();
+ }
+
void MarbleQuickItem::setPlacemarkDelegate(QQmlComponent *placemarkDelegate)
{
if (d->m_placemarkDelegate == placemarkDelegate) {
diff --git a/src/lib/marble/declarative/MarbleQuickItem.h b/src/lib/marble/declarative/MarbleQuickItem.h
index d7246a8..d9cc4da 100644
--- a/src/lib/marble/declarative/MarbleQuickItem.h
+++ b/src/lib/marble/declarative/MarbleQuickItem.h
@@ -129,6 +129,7 @@ namespace Marble
Q_INVOKABLE void setShowRuntimeTrace(bool showRuntimeTrace);
Q_INVOKABLE void setShowDebugPolygons(bool showDebugPolygons);
Q_INVOKABLE void setShowDebugPlacemarks(bool showDebugPlacemarks);
+ Q_INVOKABLE void setShowDebugBatches(bool showDebugBatches);
void setPlacemarkDelegate(QQmlComponent* placemarkDelegate);