summaryrefslogtreecommitdiff
path: root/examples/location
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-05-12 14:31:57 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-05-26 13:24:44 +0000
commit68115c86eb0bfbe3218ed4fa3af3b006720a8c43 (patch)
treeb57fb4d806012efe315ab65bade60397503094b3 /examples/location
parent71af9f157462b0bef3ac5b6e8472dd2f1cc14286 (diff)
downloadqtlocation-68115c86eb0bfbe3218ed4fa3af3b006720a8c43.tar.gz
Tune up dialog transitions in 'mapviewer' example
If users reselects 'tools' dialog, rewind to map page immediately. Change-Id: Iefc3786c78e441ca765466c54d872ef475a80d59 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location')
-rw-r--r--examples/location/mapviewer/mapviewer.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml
index fb9d462d..08967ded 100644
--- a/examples/location/mapviewer/mapviewer.qml
+++ b/examples/location/mapviewer/mapviewer.qml
@@ -240,6 +240,7 @@ ApplicationWindow {
onSelectTool: {
switch (tool) {
case "AddressRoute":
+ stackView.pop({item:page, immediate: true})
stackView.push({ item: Qt.resolvedUrl("forms/RouteAddress.qml") ,
properties: { "plugin": map.plugin,
"toAddress": toAddress,
@@ -249,6 +250,7 @@ ApplicationWindow {
stackView.currentItem.closeForm.connect(stackView.closeForm)
break
case "CoordinateRoute":
+ stackView.pop({item:page, immediate: true})
stackView.push({ item: Qt.resolvedUrl("forms/RouteCoordinate.qml") ,
properties: { "toCoordinate": toCoordinate,
"fromCoordinate": fromCoordinate}})
@@ -256,18 +258,21 @@ ApplicationWindow {
stackView.currentItem.closeForm.connect(stackView.closeForm)
break
case "Geocode":
+ stackView.pop({item:page, immediate: true})
stackView.push({ item: Qt.resolvedUrl("forms/Geocode.qml") ,
properties: { "address": fromAddress}})
stackView.currentItem.showPlace.connect(map.geocode)
stackView.currentItem.closeForm.connect(stackView.closeForm)
break
case "RevGeocode":
+ stackView.pop({item:page, immediate: true})
stackView.push({ item: Qt.resolvedUrl("forms/ReverseGeocode.qml") ,
properties: { "coordinate": fromCoordinate}})
stackView.currentItem.showPlace.connect(map.geocode)
stackView.currentItem.closeForm.connect(stackView.closeForm)
break
case "Language":
+ stackView.pop({item:page, immediate: true})
stackView.push({ item: Qt.resolvedUrl("forms/Locale.qml") ,
properties: { "locale": map.plugin.locales[0]}})
stackView.currentItem.selectLanguage.connect(setLanguage)