Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickgeocoordinateanimation.cpp File Reference

(a21734ee6730d8f0ed91683904e9bf59f94f133a)

#include "qquickgeocoordinateanimation_p.h"
#include "qquickgeocoordinateanimation_p_p.h"
#include <QtQuick/private/qquickanimation_p_p.h>
#include <QtPositioning/private/qdoublevector2d_p.h>
#include <QtPositioning/private/qwebmercator_p.h>
#include <QtPositioning/private/qgeocoordinate_p.h>
#include "moc_qquickgeocoordinateanimation_p.cpp"
Include dependency graph for qquickgeocoordinateanimation.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE QGeoCoordinate::AltitudeType interpolatedAltitudeType (const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)
 \qmltype CoordinateAnimation \inherits PropertyAnimation \inqmlmodule QtPositioning
QVariant q_coordinateInterpolator (const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)
QVariant q_coordinateShortestInterpolator (const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)
QVariant q_coordinateEastInterpolator (const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)
QVariant q_coordinateWestInterpolator (const QGeoCoordinate &from, const QGeoCoordinate &to, qreal progress)

Function Documentation

◆ interpolatedAltitudeType()

QT_BEGIN_NAMESPACE QGeoCoordinate::AltitudeType interpolatedAltitudeType ( const QGeoCoordinate & from,
const QGeoCoordinate & to,
qreal progress )
static

\qmltype CoordinateAnimation \inherits PropertyAnimation \inqmlmodule QtPositioning

Since
5.3

A PropertyAnimation for geo coordinate properties.

A specialized \l{PropertyAnimation} that defines an animation between two \l{geoCoordinate}{coordinates}.

By default, a \l{geoCoordinate::latitude}{latitude} of the \l geoCoordinate is animated in the direction of shortest (geodesic) distance between those coordinates. Since CoordinateAnimation uses Mercator map projection, the \l{geoCoordinate::latitude}{latitude} animation is always between -90 and 90 degrees. The \l{geoCoordinate::longitude}{longitude} animation path is not limited and can go over 180 degrees in both west and east directions.

The \l{direction} property can be set to specify the direction in which the \l{geoCoordinate::longitude}{longitude} animation should occur.

Since Qt 6.13, the \l{geoCoordinate::altitudeType}{altitude type} of the coordinates is also taken into account. The altitude type cannot be interpolated, so the animated coordinate uses the altitude type of the \l from coordinate during the first half of the animation, and the altitude type of the \l to coordinate during the second half.

Note
If the altitude types of the \l from and \l to coordinates differ, the \l{geoCoordinate::altitude}{altitude} values are still interpolated without any conversion between the reference surfaces.
See also
{Animation and Transitions in Qt Quick}

Definition at line 49 of file qquickgeocoordinateanimation.cpp.

◆ q_coordinateEastInterpolator()

QVariant q_coordinateEastInterpolator ( const QGeoCoordinate & from,
const QGeoCoordinate & to,
qreal progress )

Definition at line 110 of file qquickgeocoordinateanimation.cpp.

◆ q_coordinateInterpolator()

QVariant q_coordinateInterpolator ( const QGeoCoordinate & from,
const QGeoCoordinate & to,
qreal progress )

Definition at line 56 of file qquickgeocoordinateanimation.cpp.

◆ q_coordinateShortestInterpolator()

QVariant q_coordinateShortestInterpolator ( const QGeoCoordinate & from,
const QGeoCoordinate & to,
qreal progress )

Definition at line 72 of file qquickgeocoordinateanimation.cpp.

◆ q_coordinateWestInterpolator()

QVariant q_coordinateWestInterpolator ( const QGeoCoordinate & from,
const QGeoCoordinate & to,
qreal progress )

Definition at line 141 of file qquickgeocoordinateanimation.cpp.