diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-11-18 19:21:21 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-12-07 11:11:37 +0000 |
commit | e70502b14a6b78067c18a4645570c077453c34ea (patch) | |
tree | e93850d0ee06cd1d1b220e123dea81f6eb630739 /examples | |
parent | 3faac8cc62a9101902baebbda348e7da9921cce4 (diff) | |
download | qtlocation-e70502b14a6b78067c18a4645570c077453c34ea.tar.gz |
Add clearData() call to map qml api
Add clearData call to clear texture, memory and disk
cache. Update mapviewer example and add "prefetchData"
and "clearData" to Tools menu.
Task-number: QTBUG-47292
Change-Id: Ifc71a3652688d1403f5b011ef231b59381c17ee3
Reviewed-by: Harald Meyer <dev@meh.at>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/location/mapviewer/mapviewer.qml | 6 | ||||
-rw-r--r-- | examples/location/mapviewer/menus/MainMenu.qml | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml index bcc2c919..eca51485 100644 --- a/examples/location/mapviewer/mapviewer.qml +++ b/examples/location/mapviewer/mapviewer.qml @@ -221,6 +221,12 @@ ApplicationWindow { stackView.currentItem.selectLanguage.connect(setLanguage) stackView.currentItem.closeForm.connect(stackView.closeForm) break + case "Clear": + map.clearData() + break + case "Prefetch": + map.prefetchData() + break default: console.log("Unsupported operation") } diff --git a/examples/location/mapviewer/menus/MainMenu.qml b/examples/location/mapviewer/menus/MainMenu.qml index 3dc3e9fb..7054c40d 100644 --- a/examples/location/mapviewer/menus/MainMenu.qml +++ b/examples/location/mapviewer/menus/MainMenu.qml @@ -125,6 +125,8 @@ MenuBar { item.triggered.connect(function() {toggleMapState("FollowMe")}) addItem(qsTr("Language")).triggered.connect(function(){selectTool("Language")}) + addItem(qsTr("Prefetch Map Data")).triggered.connect(function(){selectTool("Prefetch")}) + addItem(qsTr("Clear Map Data")).triggered.connect(function(){selectTool("Clear")}) } } } |