summaryrefslogtreecommitdiff
path: root/src/imports/positioning/positioning.cpp
diff options
context:
space:
mode:
authorAlbin Olsson <albin.olsson@cybercom.com>2013-09-19 16:17:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 12:18:46 +0200
commit42541b2406f6b35e109ee6bee64283582dfd2adc (patch)
tree96c873be5b39ef46022b72d88c04233578f4457b /src/imports/positioning/positioning.cpp
parent7ec8919a055e35232b5127e312a525f61b0bc483 (diff)
downloadqtlocation-42541b2406f6b35e109ee6bee64283582dfd2adc.tar.gz
Make geo coordinates animatable in QML.
Interpolation logic in AnimatableCoordinate has been moved around so that QGeoCoordinates can be animated directly by QPropertyAnimation. A new QML type has been added, 'CoordinateAnimation', for animating coordinates in QML. This type follows the pattern of 'ColorAnimation' and other specializations of 'PropertyAnimation'. QDoubleVector2D, QDoubleVector3D and QGeoProjection has been moved to QtPositioning Testcase for CoordinateAnimation has been added to declarative_ui. AnimatableCoordinate and QGeoCoordinateInterpolator are redundant and have been removed. Change-Id: I0809da566e1800274384f9c5337df65623d1e61a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/imports/positioning/positioning.cpp')
-rw-r--r--src/imports/positioning/positioning.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp
index 031b06b2..b4bda5fd 100644
--- a/src/imports/positioning/positioning.cpp
+++ b/src/imports/positioning/positioning.cpp
@@ -51,6 +51,7 @@
#include "qdeclarativegeorectangle.h"
#include "qdeclarativegeocircle.h"
#include "qdeclarativecoordinate_p.h"
+#include "qdeclarativegeocoordinateanimation_p.h"
#include "locationsingleton.h"
@@ -112,6 +113,9 @@ public:
qRegisterMetaType<QGeoRectangle>("QGeoRectangle");
qRegisterMetaType<QGeoCircle>("QGeoCircle");
qRegisterMetaType<QGeoLocation>("QGeoLocation");
+
+ qRegisterAnimationInterpolator<QGeoCoordinate>(geoCoordinateInterpolator);
+ qmlRegisterType<QDeclarativeGeoCoordinateAnimation>(uri, 5, 3, "CoordinateAnimation");
} else {
qDebug() << "Unsupported URI given to load positioning QML plugin: " << QLatin1String(uri);
}