From 32712d70bbab3b703f614ca5b77e5d3b0cf3f74c Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 27 Mar 2012 12:02:57 +1000 Subject: More qtlocation qml documentation fixes MapRectangle: - Added more details to the detailed description section MapPolygon, MapPolyline: - Added description of 'opacity' property MapMouseArea: - Minor grammatical correction, involved -> involve - Added full stop to bullet points in limitations section MapMouseEvent: - Rephrased description of 'accepted' property GeocodeModel: - Added missing fullstop in 'count' property description - Minor grammatical correction to 'limit', 'plugin', and 'query' property descriptions Change-Id: I0a2b8cd570ff1ff082239ed2732fabad1f4e4b85 Reviewed-by: Alex Wilson --- src/imports/location/qdeclarativegeocodemodel.cpp | 8 ++++---- src/imports/location/qdeclarativegeomapmousearea.cpp | 10 +++++----- src/imports/location/qdeclarativegeomapmouseevent.cpp | 2 +- src/imports/location/qdeclarativepolygonmapitem.cpp | 10 ++++++++++ src/imports/location/qdeclarativepolylinemapitem.cpp | 9 +++++++++ src/imports/location/qdeclarativerectanglemapitem.cpp | 8 +++++--- 6 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp index 56fe7bd2..5fac7d6c 100644 --- a/src/imports/location/qdeclarativegeocodemodel.cpp +++ b/src/imports/location/qdeclarativegeocodemodel.cpp @@ -294,7 +294,7 @@ void QDeclarativeGeocodeModel::pluginReady() /*! \qmlproperty Plugin QtLocation5::GeocodeModel::plugin - This property holds the plugin that providers the actual geocoding service. + This property holds the plugin that provides the actual geocoding service. Note that all plugins do not necessarily provide geocoding (could e.g. provide only routing or maps). @@ -467,7 +467,7 @@ void QDeclarativeGeocodeModel::setLocations(const QList &locations /*! \qmlproperty int QtLocation5::GeocodeModel::count - This property holds how many locations the model currently has + This property holds how many locations the model currently has. Amongst other uses, you can use this value when accessing locations via the QtLocation5::GeocodeModel::get -method. */ @@ -499,7 +499,7 @@ QDeclarativeGeoLocation* QDeclarativeGeocodeModel::get(int index) /*! \qmlproperty int QtLocation5::GeocodeModel::limit - This property holds the maximum number of results. The \l limit and \l offset values only + This property holds the maximum number of results. The \l limit and \l offset values are only applicable with free string geocoding (that is they are not considered when using addresses or coordinates in the search query). @@ -585,7 +585,7 @@ void QDeclarativeGeocodeModel::reset() \qmlproperty QVariant QtLocation5::GeocodeModel::query This property holds the data of the geocoding request. - The property accepts three types of queries, which determines both the data and + The property accepts three types of queries which determine both the data and the type of action to be performed: \list diff --git a/src/imports/location/qdeclarativegeomapmousearea.cpp b/src/imports/location/qdeclarativegeomapmousearea.cpp index 8fe1e107..015c8cbd 100644 --- a/src/imports/location/qdeclarativegeomapmousearea.cpp +++ b/src/imports/location/qdeclarativegeomapmousearea.cpp @@ -78,8 +78,8 @@ QT_BEGIN_NAMESPACE Information about the mouse position and button clicks are provided via signals for which event handler properties are defined. The most commonly - used involved handling mouse presses and clicks: onClicked, onDoubleClicked, - onPressed and onReleased. + used handlers involve handling mouse presses and clicks: onClicked, + onDoubleClicked, onPressed and onReleased. \section2 Example Usage @@ -112,9 +112,9 @@ QT_BEGIN_NAMESPACE the mouse event itself should not be stored. The main reason for this is to optimize memory usage; we do not want to allocate heap memory every time the mouse moves. - \li Nested mouse areas are not supported (MapMouseArea { MapMouseArea {} } - \li If two or more MapMouseAreas overlap, the declaration order is significant (not e.g. 'z' value) - \li Only one MapMouseArea per MapItem is supported, and it always fills the whole MapItem + \li Nested mouse areas are not supported (MapMouseArea { MapMouseArea {} }. + \li If two or more MapMouseAreas overlap, the declaration order is significant (not e.g. 'z' value). + \li Only one MapMouseArea per MapItem is supported, and it always fills the whole MapItem. \endlist \sa MapMouseEvent diff --git a/src/imports/location/qdeclarativegeomapmouseevent.cpp b/src/imports/location/qdeclarativegeomapmouseevent.cpp index ad6149a8..9bf646e8 100644 --- a/src/imports/location/qdeclarativegeomapmouseevent.cpp +++ b/src/imports/location/qdeclarativegeomapmouseevent.cpp @@ -79,7 +79,7 @@ QDeclarativeGeoMapMouseEvent::~QDeclarativeGeoMapMouseEvent() \qmlproperty bool QtLocation5::MapMouseEvent::accepted Setting \a accepted to true prevents the mouse event from being - propagated to items below this item. + propagated to items below the item currently handling the event. Generally, if the item acts on the mouse event then it should be accepted so that items lower in the stacking order do not also respond to the same event. diff --git a/src/imports/location/qdeclarativepolygonmapitem.cpp b/src/imports/location/qdeclarativepolygonmapitem.cpp index 8ace4c9d..2ee0cc91 100644 --- a/src/imports/location/qdeclarativepolygonmapitem.cpp +++ b/src/imports/location/qdeclarativepolygonmapitem.cpp @@ -404,6 +404,16 @@ void QDeclarativePolygonMapItem::setColor(const QColor &color) emit colorChanged(color_); } + +/*! + \qmlproperty real MapPolygon::opacity + + This property holds the opacity of the item. Opacity is specified as a + number between 0 (fully transparent) and 1 (fully opaque). The default is 1. + + If an item's opacity is set to 0, the item will no longer receive mouse + events. Similarly, setting the visible property to false stops mouse events. +*/ QSGNode* QDeclarativePolygonMapItem::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData* data) { Q_UNUSED(data); diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp index e8c5440d..1f90a228 100644 --- a/src/imports/location/qdeclarativepolylinemapitem.cpp +++ b/src/imports/location/qdeclarativepolylinemapitem.cpp @@ -604,6 +604,15 @@ void QDeclarativePolylineMapItem::updateMapItem() update(); } +/*! + \qmlproperty real MapPolyline::opacity + + This property holds the opacity of the item. Opacity is specified as a + number between 0 (fully transparent) and 1 (fully opaque). The default is 1. + + If an item's opacity is set to 0, the item will no longer receive mouse + events. Similarly, setting the visible property to false stops mouse events. +*/ QSGNode* QDeclarativePolylineMapItem::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData* data) { Q_UNUSED(data); diff --git a/src/imports/location/qdeclarativerectanglemapitem.cpp b/src/imports/location/qdeclarativerectanglemapitem.cpp index 95a56d50..713244be 100644 --- a/src/imports/location/qdeclarativerectanglemapitem.cpp +++ b/src/imports/location/qdeclarativerectanglemapitem.cpp @@ -59,9 +59,11 @@ QT_BEGIN_NAMESPACE The MapRectangle element displays a rectangle on a Map. Rectangles are a special case of Polygon with exactly 4 vertices and "straight" sides. In - this case, "straight" means that the top-left and top-right points (the - top side) have the same latitude, the points on the left side have the - same longitude, and the points on the right side have another. + this case, "straight" means that the top-left point has the same latitude + as the top-right point (the top side), and the bottom-left point has the + same latitude as the bottom-right point (the bottom side). Similarly, the + points on the left side have the same longitude, and the points on the + right side have the same longitude. To specify the rectangle, it requires a \l topLeft and \l bottomRight point, both given by \l Coordinate elements. -- cgit v1.2.3