summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativegeomaneuver_p.h
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-11-28 17:47:00 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-11-29 23:02:25 +0000
commit057fe199941b8783312abeedde315118b59ccb8e (patch)
tree293194d2e0c705d71c9b5d1b809da3e378a6bf40 /src/location/declarativemaps/qdeclarativegeomaneuver_p.h
parente5fab0a22988ed98657a4954b0104cc25213effc (diff)
downloadqtlocation-057fe199941b8783312abeedde315118b59ccb8e.tar.gz
Add extended attributes to QGeoManeuver/QDeclarativeGeoManeuver
Change-Id: I6ed1d869d0a97e397057e92cf17ce9fddb4eca3f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomaneuver_p.h')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomaneuver_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomaneuver_p.h b/src/location/declarativemaps/qdeclarativegeomaneuver_p.h
index 0e957a1f..f321c133 100644
--- a/src/location/declarativemaps/qdeclarativegeomaneuver_p.h
+++ b/src/location/declarativemaps/qdeclarativegeomaneuver_p.h
@@ -50,7 +50,7 @@
#include <QtLocation/private/qlocationglobal_p.h>
#include <QtLocation/qgeomaneuver.h>
-
+#include <QtQml/QQmlPropertyMap>
#include <QtPositioning/QGeoCoordinate>
#include <QObject>
@@ -71,6 +71,7 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoManeuver : public QObject
Q_PROPERTY(qreal distanceToNextInstruction READ distanceToNextInstruction CONSTANT)
Q_PROPERTY(QGeoCoordinate waypoint READ waypoint CONSTANT)
Q_PROPERTY(bool waypointValid READ waypointValid CONSTANT)
+ Q_PROPERTY(QObject *extendedAttributes READ extendedAttributes NOTIFY extendedAttributesChanged)
public:
enum Direction {
@@ -101,9 +102,15 @@ public:
int timeToNextInstruction() const;
qreal distanceToNextInstruction() const;
QGeoCoordinate waypoint() const;
+ QQmlPropertyMap *extendedAttributes() const;
+
+Q_SIGNALS:
+ void extendedAttributesChanged(); //in practice is never emitted since parameters cannot be re-assigned
+ //the declaration is needed to avoid warnings about non-notifyable properties
private:
QGeoManeuver maneuver_;
+ QQmlPropertyMap *m_extendedAttributes = nullptr;
};
QT_END_NAMESPACE