summaryrefslogtreecommitdiff
path: root/src/imports/positioning/positioning.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-02-04 13:56:17 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-10 00:42:29 +0100
commit20ee891ec034783b09c698916fbfc2127f92c803 (patch)
tree5fe8516cca36ec317ae5e63594293bddcb433d8b /src/imports/positioning/positioning.cpp
parent930de8867937b5a61786e5dc6723b229bf27e529 (diff)
downloadqtlocation-20ee891ec034783b09c698916fbfc2127f92c803.tar.gz
Add direction and vertical speed properties to QML Position type.
The QML and C++ position types now provide the same functionality. Position attributes are always set/reset on every position update. This ensures that old values of speed, accuracy, direction, and vertical speed are not indefinitely reported in QML. Values are set to NaN and if appropriate the associated is valid property is set. [ChangeLog][QtPositioning][Position] Added direction and vertical speed properities. Change-Id: Ia02da8a5bc1cd68489eb58180986df512c24aa2f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/imports/positioning/positioning.cpp')
-rw-r--r--src/imports/positioning/positioning.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp
index 669a2624..4314582d 100644
--- a/src/imports/positioning/positioning.cpp
+++ b/src/imports/positioning/positioning.cpp
@@ -55,6 +55,8 @@
#include "locationsingleton.h"
+#include <QtCore/QVariantAnimation>
+
#include <QtQml/qqmlextensionplugin.h>
#include <QtQml/qqml.h>
#include <QtQml/private/qqmlvaluetype_p.h>
@@ -131,6 +133,7 @@ public:
// Introduction of 5.3 version; existing 5.2 exports automatically become availabe under 5.3 as well
minor = 3;
qmlRegisterType<QDeclarativeGeoCoordinateAnimation >(uri, major, minor, "CoordinateAnimation");
+ qmlRegisterType<QDeclarativePosition, 1 >(uri, major, minor, "Position");
} else {
qDebug() << "Unsupported URI given to load positioning QML plugin: " << QLatin1String(uri);
}