summaryrefslogtreecommitdiff
path: root/tests/applications
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@nokia.com>2011-11-02 11:04:41 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-02 03:00:20 +0100
commite684e5451c4575166e3fd5a5f358fd6b2bc878a9 (patch)
tree4b4d6c9dd6ce997a1ed3a32f61823312c3a9421c /tests/applications
parentfb4ec6e0cb62bc0bf25948d5253f89b613834cca (diff)
downloadqtlocation-e684e5451c4575166e3fd5a5f358fd6b2bc878a9.tar.gz
Map QML autotests and improvements part 1/2.
Change-Id: Iba6d434a1b83f4f1fe9654a7f210786f64b293d1 Reviewed-by: David Laing <david.laing@nokia.com>
Diffstat (limited to 'tests/applications')
-rw-r--r--tests/applications/declarative_map/map3d.qml45
1 files changed, 35 insertions, 10 deletions
diff --git a/tests/applications/declarative_map/map3d.qml b/tests/applications/declarative_map/map3d.qml
index 009a6853..0c894b5a 100644
--- a/tests/applications/declarative_map/map3d.qml
+++ b/tests/applications/declarative_map/map3d.qml
@@ -162,14 +162,43 @@ Item {
}
}
Rectangle {color: "lightblue"; width: 80; height: 40;
- Text {text: "Dis pinch"}
+ Text {text: "Width++"}
+ MouseArea{ anchors.fill: parent; onClicked: map.width += 10}
+ }
+ Rectangle {color: "lightblue"; width: 80; height: 40;
+ Text {text: "Width--"}
+ MouseArea{ anchors.fill: parent; onClicked: map.width -= 10}
+ }
+ Rectangle {color: "lightblue"; width: 80; height: 40;
+ Text {text: "Height++"}
+ MouseArea{ anchors.fill: parent; onClicked: map.height += 10}
+ }
+ Rectangle {color: "lightblue"; width: 80; height: 40;
+ Text {text: "Height--"}
+ MouseArea{ anchors.fill: parent; onClicked: map.height -= 10}
+ }
+ Rectangle {color: "lightblue"; width: 80; height: 40;
+ Text {text: "Plugin"}
+ MouseArea{ anchors.fill: parent; onClicked: map.plugin = nokia_plugin}
+ }
+ Rectangle {color: "lightblue"; width: 80; height: 40;
+ Text {text: "toScrPos"}
MouseArea{ anchors.fill: parent;
- onClicked: { map.disableFlickOnStarted = true}
- onDoubleClicked: { map.disableFlickOnStarted = false}
- }
+ onClicked: console.log('coordinate: ' +
+ beyondCoordinate.latitude +
+ ' to screen pos: ' +
+ map.toScreenPosition(beyondCoordinate).x +
+ ' ' + map.toScreenPosition(beyondCoordinate).y) }
}
}
+ Coordinate {
+ id: beyondCoordinate
+ latitude: 80
+ longitude: 80
+ altitude: 0
+ }
+
/*
MapItem {
id: externalStaticMapItem1
@@ -228,13 +257,12 @@ Item {
Map {
id: map
-
property bool disableFlickOnStarted: false
-
MapMouseArea {
id: mapMouseArea
onDoubleClicked: console.log('mapmousearea got clicked')
anchors.fill: parent
+ onClicked: console.log('coordinate: ' + mouse.coordinate.latitude + ' to screen pos: ' + map.toScreenPosition(mouse.coordinate).x + ' ' + map.toScreenPosition(mouse.coordinate).y)
}
MapItem {
id: externalStaticMapItem1
@@ -253,7 +281,6 @@ Item {
}
}
}
-
MapItem {
objectName: 'blinky static item'
zoomLevel: 7 // at which map's zoom level the width and height are '1-to-1'
@@ -356,8 +383,6 @@ Item {
// commented features are checked to work at least somehow
x: 0
y: 0
- //size.width: 100
- //size.height: 100
//anchors.left: parent.left
//anchors.bottom: parent.bottom
//anchors.leftMargin: 70
@@ -444,7 +469,7 @@ Item {
// </unsupported so far>
}
-
+ Plugin {id: nokia_plugin; name: "nokia"}
Row {
id: buttonRow