marble
RoutingModel.cpp
Go to the documentation of this file.
63 static void importPlacemark( RouteSegment &outline, QVector<RouteSegment> &segments, const GeoDataPlacemark *placemark );
89 void RoutingModelPrivate::importPlacemark( RouteSegment &outline, QVector<RouteSegment> &segments, const GeoDataPlacemark *placemark )
208 return QVariant::fromValue( segment.maneuver().position().longitude( GeoDataCoordinates::Degree ) );
211 return QVariant::fromValue( segment.maneuver().position().latitude( GeoDataCoordinates::Degree ) );
295 content += "<gpx xmlns=\"http://www.topografix.com/GPX/1/1\" creator=\"Marble\" version=\"1.1\" ";
312 content += QString( " <rtept lat=\"%1\" lon=\"%2\">\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 );
331 content += QString( " <trkpt lat=\"%1\" lon=\"%2\">\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 );
351 int RoutingModel::rightNeighbor( const GeoDataCoordinates &position, RouteRequest const *const route ) const
418 deviation = qMax<qreal>( d->m_positionTracking->accuracy().vertical, d->m_positionTracking->accuracy().horizontal );
422 RoutingModelPrivate::RouteDeviation const deviated = distance < threshold ? RoutingModelPrivate::OnRoute : RoutingModelPrivate::OffRoute;
void exportGpx(QIODevice *device) const
Export waypoints and instructions in gpx format.
Definition: RoutingModel.cpp:292
iterator insert(const Key &key, const T &value)
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
void setRoleNames(const QHash< int, QByteArray > &roleNames)
This file contains the headers for MarbleModel.
const QHash< int, QByteArray > & roleNames() const
const_iterator constBegin() const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
T value() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:172
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
Definition: MarbleMath.h:52
void updatePosition(GeoDataCoordinates, qreal)
Definition: RoutingModel.cpp:407
int rowCount(const QModelIndex &parent=QModelIndex()) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:158
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Overload of QAbstractListModel.
Definition: RoutingModel.cpp:163
bool setCurrentRoute(GeoDataDocument *document)
Old data in the model is discarded, the parsed content of the provided document is used as the new mo...
Definition: RoutingModel.cpp:231
Definition: Maneuver.h:22
void beginResetModel()
qreal altitude() const
return the altitude of the Point in meters
Definition: GeoDataCoordinates.cpp:1197
void setWaypoint(const GeoDataCoordinates &waypoint, int index)
Definition: Maneuver.cpp:91
bool isValid() const
void positionChanged()
emits a signal regarding information about total time( seconds ) and distance( metres ) remaining to ...
int toInt(bool *ok) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
QVector< GeoDataFolder * > folderList() const
A convenience function that returns all folders in this container.
Definition: GeoDataContainer.cpp:197
const_iterator constEnd() const
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
int row() const
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
Definition: GeoDataFolder.h:50
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
QVariant fromValue(const T &value)
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
bool deviatedFromRoute() const
returns whether the gps location is on route
bool isEmpty() const
qreal distanceTo(const GeoDataCoordinates &point, GeoDataCoordinates &closest, GeoDataCoordinates &interpolated) const
Definition: RouteSegment.cpp:149
int column() const
void push_back(const T &value)
qint64 write(const char *data, qint64 maxSize)
This file contains the headers for MarbleWidget.
Definition: Route.h:20
int rightNeighbor(const GeoDataCoordinates &position, RouteRequest const *const route) const
Maps points from the provided route request to waypoints in the model according to their global minim...
Definition: RoutingModel.cpp:351
Definition: RouteSegment.h:23
void endResetModel()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
int size() const
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
RoutingModel(RouteRequest *request, MarbleModel *model, QObject *parent=0)
Constructor.
Definition: RoutingModel.cpp:131
QVector< GeoDataPlacemark * > placemarkList() const
A convenience function that returns all placemarks in this container.
Definition: GeoDataContainer.cpp:214
GeoDataCoordinates at(int index) const
Accessor for the n-th position.
Definition: RouteRequest.cpp:149
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.