summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNatalia Shubina <natalia.shubina@nokia.com>2011-12-29 11:41:48 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-29 02:49:14 +0100
commit9835e07310c4095d2cce480a6de59453e34ff6e6 (patch)
tree8e8d4de8fba983d2a4d66e66773bbf3e3de96d09 /examples
parent706d604bbb6bfb153caeb1cdb6e7d1c5e329ecde (diff)
downloadqtlocation-9835e07310c4095d2cce480a6de59453e34ff6e6.tar.gz
removed district, county and country code from geocode dialog
removed district, county and country code from geocode dialog changed menu's z-order so they always be at the top added LanguageMenu state Change-Id: If31ef579f81f11d8b1b864ef16cbebb0f0b5118b Reviewed-by: Alex Wilson <alex.wilson@nokia.com> Reviewed-by: Natalia Shubina <natalia.shubina@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/mapviewer/content/map/MapComponent.qml37
-rw-r--r--examples/declarative/mapviewer/mapviewer.qml13
2 files changed, 23 insertions, 27 deletions
diff --git a/examples/declarative/mapviewer/content/map/MapComponent.qml b/examples/declarative/mapviewer/content/map/MapComponent.qml
index 7966d1d5..9b6c1f73 100644
--- a/examples/declarative/mapviewer/content/map/MapComponent.qml
+++ b/examples/declarative/mapviewer/content/map/MapComponent.qml
@@ -100,7 +100,7 @@ Map {
maximum: map.maximumZoomLevel;
opacity: 1
visible: parent.visible
- z: map.z+1
+ z: map.z + 3
anchors {
bottom: parent.bottom;
bottomMargin: 56; rightMargin: 10; leftMargin: 10
@@ -123,10 +123,7 @@ Map {
anchors.bottomMargin: 8
anchors.right: zoomSlider.right
onClicked: {
- if (languageMenu.opacity ==1)
- languageMenu.opacity = 0;
- else
- languageMenu.opacity = 1;
+ map.state = "LanguageMenu"
}
}
@@ -135,25 +132,21 @@ Map {
horizontalOrientation: false
autoWidth: true
opacity: 0
- z: map.z + 2
- width: 100
+ z: map.z + 4
anchors.bottom: languageButton.top
anchors.right: languageButton.left
onClicked: {
- opacity = 0
switch (button) {
- case "en": {
- setLanguage("en");
- break;
- }
- case "fr" : {
- setLanguage("fr");
+ case "en":
+ case "fr": {
+ setLanguage(button);
break;
}
case "Other": {
map.requestLocale()
}
}
+ map.state = ""
}
Component.onCompleted: {
addItem("en")
@@ -478,7 +471,7 @@ Map {
id: scale
parent: zoomSlider.parent
visible: scaleText.text != "0 m"
- z: map.z
+ z: map.z + 2
opacity: 0.6
anchors {
bottom: zoomSlider.top;
@@ -552,7 +545,7 @@ Map {
id: markerMenu
horizontalOrientation: false
autoWidth: true
- z: map.z + 2
+ z: map.z + 4
opacity: 0
width: 150
@@ -594,7 +587,7 @@ Map {
id: popupMenu
horizontalOrientation: false
autoWidth: true
- z: map.z + 2
+ z: map.z + 4
opacity: 0
width: 150
@@ -670,7 +663,8 @@ Map {
Menu {
id: routeMenu
horizontalOrientation: false
- z: map.z +2
+ autoWidth: true
+ z: map.z + 4
opacity: 0
width: 150
@@ -695,7 +689,8 @@ Map {
Menu {
id: pointMenu
horizontalOrientation: false
- z: map.z +2
+ autoWidth: true
+ z: map.z + 4
opacity: 0
width: 150
@@ -1043,6 +1038,10 @@ Map {
PropertyChanges { target: pointMenu; opacity: 1}
PropertyChanges { target: pointMenu; x: ((map.lastX + pointMenu.width > map.width) ? map.width - pointMenu.width : map.lastX)}
PropertyChanges { target: pointMenu; y: ((map.lastY + pointMenu.height > map.height - 40) ? map.height - pointMenu.height - 40 : map.lastY)}
+ },
+ State {
+ name: "LanguageMenu"
+ PropertyChanges { target: languageMenu; opacity: 1}
}
]
diff --git a/examples/declarative/mapviewer/mapviewer.qml b/examples/declarative/mapviewer/mapviewer.qml
index 597110df..9037146f 100644
--- a/examples/declarative/mapviewer/mapviewer.qml
+++ b/examples/declarative/mapviewer/mapviewer.qml
@@ -356,7 +356,7 @@ Item {
z: backgroundRect.z + 2
Component.onCompleted: {
- var obj = [["Street", "Brandl St"],["District",""],["City", "Eight Mile Plains"], ["County", ""],["State", ""],["Country code",""],["Country","Australia"], ["Postal code", ""]]
+ var obj = [["Street", "Brandl St"],["City", "Eight Mile Plains"],["State", ""],["Country","Australia"], ["Postal code", ""]]
setModel(obj)
}
@@ -368,13 +368,10 @@ Item {
page.state = ""
messageDialog.state = ""
geocodeAddress.street = dialogModel.get(0).inputText
- geocodeAddress.district = dialogModel.get(1).inputText
- geocodeAddress.city = dialogModel.get(2).inputText
- geocodeAddress.county = dialogModel.get(3).inputText
- geocodeAddress.state = dialogModel.get(4).inputText
- geocodeAddress.countryCode = dialogModel.get(5).inputText
- geocodeAddress.country = dialogModel.get(6).inputText
- geocodeAddress.postalCode = dialogModel.get(7).inputText
+ geocodeAddress.city = dialogModel.get(1).inputText
+ geocodeAddress.state = dialogModel.get(2).inputText
+ geocodeAddress.country = dialogModel.get(3).inputText
+ geocodeAddress.postalCode = dialogModel.get(4).inputText
map.geocodeModel.clear()
map.geocodeModel.query = geocodeAddress
map.geocodeModel.update()