diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-02-10 18:17:11 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-04-13 14:53:55 +0000 |
commit | fb1395c2af753d559763f79b4d75320498f30ab5 (patch) | |
tree | d0c8c41ec01ccab56c5148bd690f30d86319fc0e /examples/location/mapviewer/mapviewer.qml | |
parent | 6d50e7cd5ed38b9ea00e0fea8c525b64e6eba0e0 (diff) | |
download | qtlocation-fb1395c2af753d559763f79b4d75320498f30ab5.tar.gz |
Replace reverse geocode dialog in mapviewer example.
Reverse geocode dialog use qtquickcontrols now.
Change-Id: Ifb231fbdaf70e972516980407218386329b083b3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/location/mapviewer/mapviewer.qml')
-rw-r--r-- | examples/location/mapviewer/mapviewer.qml | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml index 621f0726..e0751bbe 100644 --- a/examples/location/mapviewer/mapviewer.qml +++ b/examples/location/mapviewer/mapviewer.qml @@ -129,9 +129,11 @@ ApplicationWindow { properties: { "address": fromAddress}}) stackView.currentItem.showPlace.connect(showPlace) stackView.currentItem.closeForm.connect(closeForm) - } else { - stackView.pop(page) - page.state = tool + } else if (tool === "RevGeocode") { + stackView.push({ item: Qt.resolvedUrl("ReverseGeocode.qml") , + properties: { "coordinate": fromCoordinate}}) + stackView.currentItem.showPlace.connect(showPlace) + stackView.currentItem.closeForm.connect(closeForm) } } @@ -354,29 +356,6 @@ ApplicationWindow { //=====================Dialogs===================== - //Reverse Geocode Dialog - OwnControls.InputDialog { - id: reverseGeocodeDialog - title: "Reverse Geocode" - z: backgroundRect.z + 2 - - Component.onCompleted: { - var obj = [["Latitude","-27.575"],["Longitude", "153.088"]] - setModel(obj) - } - - onGoButtonClicked: { - page.state = "" - map.geocodeModel.query = QtPositioning.coordinate(parseFloat(dialogModel.get(0).inputText), - parseFloat(dialogModel.get(1).inputText)); - map.geocodeModel.update(); - } - - onCancelButtonClicked: { - page.state = "" - } - } - //Get new coordinates for marker OwnControls.InputDialog { id: coordinatesDialog @@ -431,10 +410,6 @@ ApplicationWindow { //=====================States of page===================== states: [ State { - name: "RevGeocode" - PropertyChanges { target: reverseGeocodeDialog; opacity: 1 } - }, - State { name: "Coordinates" PropertyChanges { target: coordinatesDialog; opacity: 1 } }, @@ -447,10 +422,6 @@ ApplicationWindow { //=====================State-transition animations for page===================== transitions: [ Transition { - to: "RevGeocode" - NumberAnimation { properties: "opacity" ; duration: 500; easing.type: Easing.Linear } - }, - Transition { to: "Coordinates" NumberAnimation { properties: "opacity" ; duration: 500; easing.type: Easing.Linear } }, |