marble
RoutingModel.cpp
Go to the documentation of this file.
63 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\" ";
308 content += QString( " <rtept lat=\"%1\" lon=\"%2\"><name>%3</name></rtept>\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 ).arg( text );
317 content += QString( " <trkpt lat=\"%1\" lon=\"%2\"></trkpt>\n" ).arg( lat, 0, 'f', 7 ).arg( lon, 0, 'f', 7 );
333 int RoutingModel::rightNeighbor( const GeoDataCoordinates &position, RouteRequest const *const route ) const
400 deviation = qMax<qreal>( d->m_positionTracking->accuracy().vertical, d->m_positionTracking->accuracy().horizontal );
404 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
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
This file contains the headers for MarbleModel.
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:389
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 setWaypoint(const GeoDataCoordinates &waypoint, int index)
Definition: Maneuver.cpp:91
void positionChanged()
emits a signal regarding information about total time( seconds ) and distance( metres ) remaining to ...
QVector< GeoDataFolder * > folderList() const
A convenience function that returns all folders in this container.
Definition: GeoDataContainer.cpp:90
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:442
Definition: GeoDataFolder.h:50
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
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
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
bool deviatedFromRoute() const
returns whether the gps location is on route
qreal distanceTo(const GeoDataCoordinates &point, GeoDataCoordinates &closest, GeoDataCoordinates &interpolated) const
Definition: RouteSegment.cpp:149
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:333
Definition: RouteSegment.h:23
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:107
GeoDataCoordinates at(int index) const
Accessor for the n-th position.
Definition: RouteRequest.cpp:149
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.