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/qdeclarativegeolocation_p.h | |
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/qdeclarativegeolocation_p.h')
-rw-r--r-- | src/imports/location/qdeclarativegeolocation_p.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/imports/location/qdeclarativegeolocation_p.h b/src/imports/location/qdeclarativegeolocation_p.h index 9d39ef42..253b49c3 100644 --- a/src/imports/location/qdeclarativegeolocation_p.h +++ b/src/imports/location/qdeclarativegeolocation_p.h @@ -42,12 +42,12 @@ #ifndef QDECLARATIVEGEOLOCATION_P_H #define QDECLARATIVEGEOLOCATION_P_H +#include "qdeclarativegeoaddress_p.h" + #include <QtCore/QObject> #include <QtQml/QQmlListProperty> #include <QtLocation/QGeoLocation> -#include "qdeclarativecoordinate_p.h" -#include "qdeclarativegeorectangle.h" -#include "qdeclarativegeoaddress_p.h" +#include <QtLocation/QGeoRectangle> QT_BEGIN_NAMESPACE @@ -58,23 +58,23 @@ class QDeclarativeGeoLocation : public QObject Q_PROPERTY(QGeoLocation location READ location WRITE setLocation) Q_PROPERTY(QDeclarativeGeoAddress *address READ address WRITE setAddress NOTIFY addressChanged) Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged) - Q_PROPERTY(QDeclarativeGeoRectangle *boundingBox READ boundingBox WRITE setBoundingBox NOTIFY boundingBoxChanged) + Q_PROPERTY(QGeoRectangle boundingBox READ boundingBox WRITE setBoundingBox NOTIFY boundingBoxChanged) public: explicit QDeclarativeGeoLocation(QObject *parent = 0); explicit QDeclarativeGeoLocation(const QGeoLocation &src, QObject *parent = 0); ~QDeclarativeGeoLocation(); - QGeoLocation location() ; + QGeoLocation location() const; void setLocation(const QGeoLocation &src); - QDeclarativeGeoAddress *address(); + QDeclarativeGeoAddress *address() const; void setAddress(QDeclarativeGeoAddress *address); - QGeoCoordinate coordinate(); + QGeoCoordinate coordinate() const; void setCoordinate(const QGeoCoordinate coordinate); - QDeclarativeGeoRectangle *boundingBox(); - void setBoundingBox(QDeclarativeGeoRectangle *boundingBox); + QGeoRectangle boundingBox() const; + void setBoundingBox(const QGeoRectangle &boundingBox); Q_SIGNALS: void addressChanged(); @@ -83,7 +83,7 @@ Q_SIGNALS: private: QDeclarativeGeoAddress *m_address; - QDeclarativeGeoRectangle *m_boundingBox; + QGeoRectangle m_boundingBox; QGeoCoordinate m_coordinate; }; |