From e777a50c6ee5485a00b800adc3e00e337e65e187 Mon Sep 17 00:00:00 2001 From: Juha Vuolle Date: Thu, 3 Nov 2011 12:08:11 +1000 Subject: Map QML autotests and improvements part 2/2. Map uses mapcontroller now. Change-Id: I4249408e4473455fca2634d8150cec00563ad015 Reviewed-by: David Laing --- tests/applications/declarative_map/map3d.qml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tests/applications') diff --git a/tests/applications/declarative_map/map3d.qml b/tests/applications/declarative_map/map3d.qml index 0c894b5a..bff6adc8 100644 --- a/tests/applications/declarative_map/map3d.qml +++ b/tests/applications/declarative_map/map3d.qml @@ -260,7 +260,7 @@ Item { property bool disableFlickOnStarted: false MapMouseArea { id: mapMouseArea - onDoubleClicked: console.log('mapmousearea got clicked') + onDoubleClicked: console.log('mapmousearea got doubleclicked') anchors.fill: parent onClicked: console.log('coordinate: ' + mouse.coordinate.latitude + ' to screen pos: ' + map.toScreenPosition(mouse.coordinate).x + ' ' + map.toScreenPosition(mouse.coordinate).y) } @@ -346,13 +346,31 @@ Item { } Column { + id: infoText y: 100 spacing: 2 Text {id: positionText; text: "Map zoom level: " + map.zoomLevel; color: 'red'; font.bold: true} Text {color: positionText.color; font.bold: true; width: page.width / 2; elide: Text.ElideRight; text: "Map center lat: " + mapCenterCoordinate.latitude } Text {color: positionText.color; font.bold: true; width: page.width / 2; elide: Text.ElideRight; text: "Map center lon: " + mapCenterCoordinate.longitude } Text {color: positionText.color; font.bold: true; width: page.width / 2; elide: Text.ElideRight; text: "Map bearing: " + map.bearing } + Text {color: positionText.color; font.bold: true; width: page.width / 2; elide: Text.ElideRight; text: "Map tilt: " + map.tilt } + } + Grid { + id: panNav + z: 10 + anchors.top: infoText.bottom + columns: 3 + spacing: 2 + Rectangle { id: navRect; width: 50; height: 50; color: 'peru'; Text {text: "\u2196";} MouseArea {anchors.fill: parent; onClicked: { map.pan(-1,1)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2191";} MouseArea {anchors.fill: parent; onClicked: {map.pan(0,1)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2197";} MouseArea {anchors.fill: parent; onClicked: {map.pan(1,1)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2190";} MouseArea {anchors.fill: parent; onClicked: {map.pan(-1,0)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "Tickle";} MouseArea {anchors.fill: parent; onClicked: {console.log('ticle tickle hehehe')}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2192";} MouseArea {anchors.fill: parent; onClicked: {map.pan(1,0)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2199";} MouseArea {anchors.fill: parent; onClicked: {map.pan(-1,-1)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2193";} MouseArea {anchors.fill: parent; onClicked: {map.pan(0,-1)}}} + Rectangle { width: navRect.width; height: navRect.height; color: navRect.color; Text {text: "\u2198";} MouseArea {anchors.fill: parent; onClicked: {map.pan(1,-1)}}} } /* -- cgit v1.2.1