From 0960ad6b4ee2ac6e66f5ce06a395547cd7f34243 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Wed, 28 Dec 2011 15:49:32 +1000 Subject: Adding some docs for basic QML map items that have none Docs for MapCircle, MapQuickItem, MapRectangle and MapRoute, as well as improvements to MapPolygon so that it appears in the list. Change-Id: I71e659f65ad3fe467893136acbec71db87f5ede5 Reviewed-by: Alex --- examples/declarative/mapviewer/content/map/Marker.qml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/declarative/mapviewer/content/map/Marker.qml b/examples/declarative/mapviewer/content/map/Marker.qml index 43e22920..e1686ab9 100644 --- a/examples/declarative/mapviewer/content/map/Marker.qml +++ b/examples/declarative/mapviewer/content/map/Marker.qml @@ -42,17 +42,22 @@ import QtQuick 2.0; import QtLocation 5.0 import QtLocation.examples 5.0 -MapQuickItem { //to be used inside MapComponent only +//! [mqi-top] +MapQuickItem { id: marker +//! [mqi-top] property alias lastMouseX: markerMouseArea.lastX property alias lastMouseY: markerMouseArea.lastY + +//! [mqi-anchor] anchorPoint.x: image.width/4 anchorPoint.y: image.height coordinate: Coordinate { latitude : 0; longitude : 0 } - sourceItem: Image { + sourceItem: Image { id: image +//! [mqi-anchor] source: markerMouseArea.containsMouse ? (markerMouseArea.pressed ? "../../resources/marker_selected.png" :"../../resources/marker_hovered.png") : "../../resources/marker.png" MapMouseArea { id: markerMouseArea @@ -95,10 +100,14 @@ MapQuickItem { //to be used inside MapComponent only } } +//! [mqi-closeimage] } +//! [mqi-closeimage] Component.onCompleted: { coordinate.longitude = mouseArea.lastCoordinate.longitude coordinate.latitude = mouseArea.lastCoordinate.latitude } +//! [mqi-close] } +//! [mqi-close] -- cgit v1.2.1