diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-08-16 13:32:43 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-28 10:07:49 +0200 |
commit | 059388adce26be48868cd741b4c5d751298fb4d8 (patch) | |
tree | 1a8a41c0f280b7ab3c502b49527bd609d1c0884a /src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp | |
parent | 7dd46f8c96a4bdaca2809ff97b773f358392516f (diff) |
Convert GeoShape, GeoRectangle and GeoCircle into QML value types.v5.0.0-beta1
This replaces the GeoShape, GeoRectangle and GeoCircle QML elements with
value types. A value type is a better fit for shape types. It is very
similar to a rect with some utility functions.
Declare QGeoShape, QGeoRectangle and QGeoCircle as movable types.
Update documentation.
Change-Id: Id6c48e1e841c68f2f0c5c6a9c4a6580a57e2dfb6
Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp')
-rw-r--r-- | src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp index 87194ad3..42afc88b 100644 --- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp +++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp @@ -205,14 +205,14 @@ QT_USE_NAMESPACE */ /*! - \qmlproperty GeoShape PlaceSearchModel::searchArea + \qmlproperty variant PlaceSearchModel::searchArea This property holds the search area. The search result returned by the model will be within the search area. - If this property is set to a \l GeoCircle its \l {GeoCircle::radius}{radius} property - may be left unset, in which case the \l Plugin will choose an appropriate radius for the - search. + If this property is set to a \l {QtLocation5::geocircle}{geocircle} its + \l {QtLocation5::geocircle}{radius} property may be left unset, in which case the \l Plugin + will choose an appropriate radius for the search. Support for specifying a search area can vary according to the \l plugin backend implementation. For example, some may support a search center only while others may only @@ -271,18 +271,10 @@ QT_USE_NAMESPACE \c PlaceSearchModel.Error and the model cleared. \code - GeoCircle { - id: searchLocation - center { - latitude: 10 - longitude: 10 - } - } - PlaceSearchModel { id: model plugin: backendPlugin - searchArea : searchLocation + searchArea: QtLocation.circle(QtLocation.coordinate(10, 10)) ... } @@ -291,8 +283,8 @@ QT_USE_NAMESPACE onClicked: { model.searchTerm = "pizza"; model.categories = null; //not searching by any category - searchLocation.center.latitude = -27.5 - searchLocation.center.longitude = 153 + model.searchArea.center.latitude = -27.5; + model.searchArea.center.longitude = 153; model.update(); } } |