Marble
PlacemarkPositionProviderPlugin.cpp
18PlacemarkPositionProviderPlugin::PlacemarkPositionProviderPlugin(MarbleModel *marbleModel, QObject *parent)
62 return QList<PluginAuthor>() << PluginAuthor(QStringLiteral("Guillaume Martres"), QStringLiteral("smarter@ubuntu.com"))
75 connect(m_marbleModel, SIGNAL(trackedPlacemarkChanged(const GeoDataPlacemark *)), this, SLOT(setPlacemark(const GeoDataPlacemark *)));
132 GeoDataCoordinates const newCoordinates = placemark ? placemark->coordinate(m_timestamp) : GeoDataCoordinates();
134 m_direction = m_coordinates.bearing(newCoordinates, GeoDataCoordinates::Degree, GeoDataCoordinates::FinalBearing);
164 m_direction = previousCoordinates.bearing(m_coordinates, GeoDataCoordinates::Degree, GeoDataCoordinates::FinalBearing);
167 const qreal averageAltitude = (m_coordinates.altitude() + m_coordinates.altitude()) / 2.0 + m_marbleModel->planetRadius();
168 const qreal distance = previousCoordinates.sphericalDistanceTo(m_coordinates) * averageAltitude;
This file contains the headers for MarbleModel.
qreal bearing(const GeoDataCoordinates &other, Unit unit=Radian, BearingType type=InitialBearing) const
Returns the bearing (true bearing, the angle between the line defined by this point and the other and...
Definition GeoDataCoordinates.cpp:742
qreal altitude() const
return the altitude of the Point in meters
Definition GeoDataCoordinates.cpp:688
qreal sphericalDistanceTo(const GeoDataCoordinates &other) const
This method calculates the shortest distance between two points on a sphere.
Definition GeoDataCoordinates.cpp:861
a class representing a point of interest on the map
Definition GeoDataPlacemark.h:47
GeoDataCoordinates coordinate(const QDateTime &dateTime=QDateTime(), bool *iconAtCoordinates=nullptr) const
Return the coordinates of the placemark at time dateTime as a GeoDataCoordinates.
Definition GeoDataPlacemark.cpp:206
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition MarbleModel.h:84
const GeoDataPlacemark * trackedPlacemark() const
Returns the placemark being tracked by this model or 0 if no placemark is currently tracked.
Definition MarbleModel.cpp:601
The abstract class that provides position information.
Definition PositionProviderPlugin.h:20
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
KOSM_EXPORT double distance(const std::vector< const OSM::Node * > &path, Coordinate coord)
bool isValid() const const
qint64 msecsTo(const QDateTime &other) const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QString tr(const char *sourceText, const char *disambiguation, int n)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.