diff --git a/src/positioning/qgeoaddress.h b/src/positioning/qgeoaddress.h
index 93a5c19..9c107b1 100644
--- a/src/positioning/qgeoaddress.h
+++ b/src/positioning/qgeoaddress.h
@@ -43,6 +43,10 @@ class QGeoCirclePrivate;
class Q_POSITIONING_EXPORT QGeoCircle : public QGeoShape
{
+ Q_GADGET
+ Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter)
+ Q_PROPERTY(qreal radius READ radius WRITE setRadius)
+
public:
QGeoCircle();
QGeoCircle(const QGeoCoordinate ¢er, qreal radius = -1.0);
@@ -68,6 +72,8 @@ public:
void translate(double degreesLatitude, double degreesLongitude);
QGeoCircle translated(double degreesLatitude, double degreesLongitude) const;
+ Q_INVOKABLE QString toString() const;
+
private:
inline QGeoCirclePrivate *d_func();
inline const QGeoCirclePrivate *d_func() const;
diff --git a/src/positioning/qgeocoordinate.h b/src/positioning/qgeocoordinate.h
index deef67f..a1a636d 100644
--- a/src/positioning/qgeocoordinate.h
+++ b/src/positioning/qgeocoordinate.h
@@ -47,7 +47,15 @@ class QDataStream;
class QGeoCoordinatePrivate;
class Q_POSITIONING_EXPORT QGeoCoordinate
{
+ Q_GADGET
+
+ Q_PROPERTY(double latitude READ latitude WRITE setLatitude)
+ Q_PROPERTY(double longitude READ longitude WRITE setLongitude)
+ Q_PROPERTY(double altitude READ altitude WRITE setAltitude)
+ Q_PROPERTY(bool isValid READ isValid)
+
public:
+
enum CoordinateType {
InvalidCoordinate,
Coordinate2D,
@@ -88,12 +96,12 @@ public:
void setAltitude(double altitude);
double altitude() const;
- qreal distanceTo(const QGeoCoordinate &other) const;
- qreal azimuthTo(const QGeoCoordinate &other) const;
+ Q_INVOKABLE qreal distanceTo(const QGeoCoordinate &other) const;
+ Q_INVOKABLE qreal azimuthTo(const QGeoCoordinate &other) const;
- QGeoCoordinate atDistanceAndAzimuth(qreal distance, qreal azimuth, qreal distanceUp = 0.0) const;
+ Q_INVOKABLE QGeoCoordinate atDistanceAndAzimuth(qreal distance, qreal azimuth, qreal distanceUp = 0.0) const;
- QString toString(CoordinateFormat format = DegreesMinutesSecondsWithHemisphere) const;
+ Q_INVOKABLE QString toString(CoordinateFormat format = DegreesMinutesSecondsWithHemisphere) const;
private:
QSharedDataPointer<QGeoCoordinatePrivate> d;
diff --git a/src/positioning/qgeolocation.h b/src/positioning/qgeolocation.h
index a923cd9..579a2a4 100644
--- a/src/positioning/qgeolocation.h
+++ b/src/positioning/qgeolocation.h
@@ -43,6 +43,15 @@ class QGeoRectanglePrivate;
class Q_POSITIONING_EXPORT QGeoRectangle : public QGeoShape
{
+ Q_GADGET
+ Q_PROPERTY(QGeoCoordinate bottomLeft READ bottomLeft WRITE setBottomLeft)
+ Q_PROPERTY(QGeoCoordinate bottomRight READ bottomRight WRITE setBottomRight)
+ Q_PROPERTY(QGeoCoordinate topLeft READ topLeft WRITE setTopLeft)
+ Q_PROPERTY(QGeoCoordinate topRight READ topRight WRITE setTopRight)
+ Q_PROPERTY(QGeoCoordinate center READ center WRITE setCenter)
+ Q_PROPERTY(double height READ height WRITE setHeight)
+ Q_PROPERTY(double width READ width WRITE setWidth)
+
public:
QGeoRectangle();
QGeoRectangle(const QGeoCoordinate ¢er, double degreesWidth, double degreesHeight);
@@ -93,6 +102,8 @@ public:
QGeoRectangle operator|(const QGeoRectangle &rectangle) const;
QGeoRectangle &operator|=(const QGeoRectangle &rectangle);
+ Q_INVOKABLE QString toString() const;
+
private:
inline QGeoRectanglePrivate *d_func();
inline const QGeoRectanglePrivate *d_func() const;
diff --git a/src/positioning/qgeosatelliteinfo.h b/src/positioning/qgeosatelliteinfo.h
index 8686ed3..0c203a5 100644
--- a/src/positioning/qgeosatelliteinfo.h
+++ b/src/positioning/qgeosatelliteinfo.h
@@ -44,6 +44,12 @@ class QGeoShapePrivate;
class Q_POSITIONING_EXPORT QGeoShape
{
+ Q_GADGET
+ Q_PROPERTY(ShapeType type READ type)
+ Q_PROPERTY(bool isValid READ isValid)
+ Q_PROPERTY(bool isEmpty READ isEmpty)
+ Q_ENUMS(ShapeType)
+
public:
QGeoShape();
QGeoShape(const QGeoShape &other);
@@ -59,7 +65,9 @@ public:
bool isValid() const;
bool isEmpty() const;
- bool contains(const QGeoCoordinate &coordinate) const;
+ Q_INVOKABLE bool contains(const QGeoCoordinate &coordinate) const;
+
+ QGeoCoordinate center() const;
void extendShape(const QGeoCoordinate &coordinate);
@@ -68,6 +76,7 @@ public:
QGeoShape &operator=(const QGeoShape &other);
+ Q_INVOKABLE QString toString() const;
protected:
QGeoShape(QGeoShapePrivate *d);
diff --git a/src/positioning/qnmeapositioninfosource.h b/src/positioning/qnmeapositioninfosource.h
index bfbee06..9bb67c9 100644
--- a/src/positioning/qnmeapositioninfosource.h
+++ b/src/positioning/qnmeapositioninfosource.h
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development