diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-06-19 12:55:53 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-21 04:09:32 +0200 |
commit | 6b68304f59de5fa3f6c861186d98b0c7fe54a4ba (patch) | |
tree | 1d94a6db5a3ad399149e44510a86c008c58814f2 /src/imports/location/qdeclarativegeocodemodel.cpp | |
parent | 4b10442e2e83bf7440837e469af344579d1ad9d5 (diff) |
Rename QGeoBoundingArea and related classes to QGeoShape.
QGeoBoundingArea is used for describing more than just a bounding area.
Renaming it to a more appropriate name, QGeoShape. The same is done
for subclasses and QML equivalents.
In C++:
QGeoBoundingArea -> QGeoShape
QGeoBoundingCircle -> QGeoCircle
QGeoBoundingBox -> QGeoRectangle
In QML:
BoundingArea -> GeoShape
BoundingCircle -> GeoCircle
BoundingBox -> GeoRectangle
Change-Id: I93c6df8f1b6c5179ed52fd8354a05f709063b1cf
Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'src/imports/location/qdeclarativegeocodemodel.cpp')
-rw-r--r-- | src/imports/location/qdeclarativegeocodemodel.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp index aeedee89..79e8b676 100644 --- a/src/imports/location/qdeclarativegeocodemodel.cpp +++ b/src/imports/location/qdeclarativegeocodemodel.cpp @@ -144,14 +144,14 @@ void QDeclarativeGeocodeModel::componentComplete() /*! \internal */ -QGeoBoundingArea QDeclarativeGeocodeModel::boundingArea() +QGeoShape QDeclarativeGeocodeModel::boundingArea() { - if (qobject_cast<QDeclarativeGeoBoundingBox *>(boundingArea_) && boundingBox_.isValid()) { + if (qobject_cast<QDeclarativeGeoRectangle *>(boundingArea_) && boundingBox_.isValid()) { return boundingBox_; - } else if (qobject_cast<QDeclarativeGeoBoundingCircle *>(boundingArea_) && boundingCircle_.isValid()) { + } else if (qobject_cast<QDeclarativeGeoCircle *>(boundingArea_) && boundingCircle_.isValid()) { return boundingCircle_; } - return QGeoBoundingArea(); + return QGeoShape(); } /*! @@ -338,10 +338,10 @@ void QDeclarativeGeocodeModel::setBounds(QObject *bounds) { if (boundingArea_ == bounds) return; - if (qobject_cast<QDeclarativeGeoBoundingBox *>(bounds)) { - boundingBox_ = qobject_cast<QDeclarativeGeoBoundingBox *>(bounds)->box(); - } else if (qobject_cast<QDeclarativeGeoBoundingCircle *>(bounds)) { - boundingCircle_ = qobject_cast<QDeclarativeGeoBoundingCircle *>(bounds)->circle(); + if (qobject_cast<QDeclarativeGeoRectangle *>(bounds)) { + boundingBox_ = qobject_cast<QDeclarativeGeoRectangle *>(bounds)->rectangle(); + } else if (qobject_cast<QDeclarativeGeoCircle *>(bounds)) { + boundingCircle_ = qobject_cast<QDeclarativeGeoCircle *>(bounds)->circle(); } else { qmlInfo(this) << QCoreApplication::translate(CONTEXT_NAME, UNSUPPORTED_BOUND_TYPE); return; @@ -351,13 +351,13 @@ void QDeclarativeGeocodeModel::setBounds(QObject *bounds) } /*! - \qmlproperty bounding area QtLocation5::GeocodeModel::bounds + \qmlproperty GeoShape QtLocation5::GeocodeModel::bounds This property holds the bounding area used to limit the results to those within the area. his is particularly useful if query is only partially filled out, as the service will attempt to (reverse) geocode all matches for the specified data. - Accepted element types are \l BoundingBox and \l BoundingCircle. + Accepted element types are \l GeoRectangle and \l GeoCircle. */ |