|
libosmscout 0.1
|
Model providing navigation functionality to QML. More...
#include <NavigationModel.h>
Public Types | |
| using | Roles = RouteStep::Roles |
Public Slots | |
| void | locationChanged (bool locationValid, double lat, double lon, bool horizontalAccuracyValid, double horizontalAccuracy) |
| void | onArrivalEstimate (QDateTime arrivalEstimate, osmscout::Distance remainingDistance) |
| void | onCurrentSpeed (double currentSpeed) |
| void | onLaneUpdate (osmscout::LaneAgent::Lane lane) |
| void | onMaxAllowedSpeed (double maxAllowedSpeed) |
| void | onPositionEstimate (const PositionAgent::PositionState state, const GeoCoord coord, const std::optional< osmscout::Bearing > bearing) |
| void | onRerouteRequest (const GeoCoord from, const std::optional< osmscout::Bearing > initialBearing, const GeoCoord to) |
| void | onTargetReached (const osmscout::Bearing targetBearing, const osmscout::Distance targetDistance) |
| void | onUpdate (std::list< RouteStep > instructions) |
| void | onUpdateNext (RouteStep nextRouteInstruction) |
Signals | |
| void | arrivalUpdate () |
| void | currentSpeedUpdate (double currentSpeed) |
| void | laneUpdate () |
| void | maxAllowedSpeedUpdate (double maxAllowedSpeed) |
| void | positionChange (osmscout::GeoCoord coord, bool horizontalAccuracyValid, double horizontalAccuracy) |
| void | positionEstimate (osmscout::PositionAgent::PositionState state, double lat, double lon, QString bearing) |
| void | positionEstimateInTunnelChanged () |
| void | rerouteRequest (double fromLat, double fromLon, const QString bearing, double bearingAngle, double toLat, double toLon) |
| Requesting computation of the new route when vehicle leave current route. | |
| void | routeAheadChanged () |
| void | routeChanged (QtRouteData route, osmscout::Vehicle vehicle) |
| void | targetReached (QString targetBearing, double targetDistance) |
| void | update () |
| void | vehiclePositionChanged () |
Public Member Functions | |
| QVariant | data (const QModelIndex &index, int role) const override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| QDateTime | getArrivalEstimate () const |
| double | getCurrentSpeed () const |
| int | getLaneCount () const |
| QString | getLaneTurn () const |
| QStringList | getLaneTurns () const |
| double | getMaxAllowedSpeed () const |
| QObject * | getNextRoutStep () |
| bool | getPositionEstimateInTunnel () const |
| double | getRemainingDistance () const |
| QObject * | getRoute () const |
| OverlayWay * | getRouteWay () const |
| OverlayWay * | getRouteWayAhead () const |
| OverlayWay * | getRouteWayPassed () const |
| int | getSuggestedLaneFrom () const |
| int | getSuggestedLaneTo () const |
| VehiclePosition * | getVehiclePosition () const |
| bool | isLaneSuggested () const |
| bool | isPositionOnRoute () |
| NavigationModel () | |
| QHash< int, QByteArray > | roleNames () const override |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| void | setRoute (QObject *route) |
| ~NavigationModel () override | |
Properties | |
| QDateTime | arrivalEstimate |
| double | currentSpeed {-1} |
| int | laneCount |
| bool | laneSuggested |
| QString | laneTurn |
| QStringList | laneTurns |
| double | maxAllowedSpeed {-1} |
| QObject * | nextRouteStep |
| bool | positionEstimateInTunnel |
| double | remainingDistance |
| QObject * | route |
| QObject * | routeWay |
| QObject * | routeWayAhead |
| QObject * | routeWayPassed |
| int | suggestedLaneFrom |
| int | suggestedLaneTo |
| QObject * | vehiclePosition |
Model providing navigation functionality to QML.
Main logic sits in osmscout::Navigation class and its Qt wrapper NavigationModule.
| osmscout::NavigationModel::NavigationModel | ( | ) |
References osmscout::NavigationModule::arrivalEstimate(), arrivalUpdate(), osmscout::NavigationModule::currentSpeed(), osmscout::OSMScoutQt::GetInstance(), osmscout::NavigationModule::laneUpdate(), osmscout::NavigationModule::locationChanged(), osmscout::OSMScoutQt::MakeNavigation(), osmscout::NavigationModule::maxAllowedSpeed(), onArrivalEstimate(), onCurrentSpeed(), onLaneUpdate(), onMaxAllowedSpeed(), onPositionEstimate(), onRerouteRequest(), onTargetReached(), onUpdate(), onUpdateNext(), positionChange(), osmscout::NavigationModule::positionEstimate(), osmscout::NavigationModule::rerouteRequest(), routeAheadChanged(), routeChanged(), osmscout::NavigationModule::setupRoute(), osmscout::NavigationModule::targetReached(), osmscout::NavigationModule::update(), osmscout::NavigationModule::updateNext(), and osmscout::vehicleCar.
|
override |
|
signal |
References arrivalUpdate().
Referenced by arrivalUpdate(), NavigationModel(), onArrivalEstimate(), and setRoute().
|
signal |
References currentSpeed, and currentSpeedUpdate().
Referenced by currentSpeedUpdate(), onCurrentSpeed(), and setRoute().
|
override |
References osmscout::RouteStep::data().
Referenced by isPositionOnRoute().
|
override |
Referenced by isPositionOnRoute().
|
inline |
References arrivalEstimate.
|
inline |
References currentSpeed.
|
inline |
|
inline |
References osmscout::LaneTurnString().
|
inline |
References osmscout::LaneTurnString().
|
inline |
References maxAllowedSpeed.
| QObject * osmscout::NavigationModel::getNextRoutStep | ( | ) |
References nextRouteStep.
Referenced by isPositionOnRoute().
|
inline |
References osmscout::PositionAgent::EstimateInTunnel.
|
inline |
References remainingDistance.
| QObject * osmscout::NavigationModel::getRoute | ( | ) | const |
References route.
Referenced by isPositionOnRoute().
|
inline |
References getRouteWay(), and route.
Referenced by getRouteWay().
| OverlayWay * osmscout::NavigationModel::getRouteWayAhead | ( | ) | const |
References remainingDistance, and route.
| OverlayWay * osmscout::NavigationModel::getRouteWayPassed | ( | ) | const |
References remainingDistance, and route.
|
inline |
|
inline |
|
inline |
References nextRouteStep, route, and osmscout::PositionAgent::Uninitialised.
|
inline |
| bool osmscout::NavigationModel::isPositionOnRoute | ( | ) |
References data(), flags(), getNextRoutStep(), getRoute(), isPositionOnRoute(), roleNames(), route, rowCount(), and setRoute().
Referenced by isPositionOnRoute().
|
signal |
References arrivalEstimate, currentSpeed, laneUpdate(), locationChanged(), maxAllowedSpeed, onArrivalEstimate(), onCurrentSpeed(), onLaneUpdate(), onMaxAllowedSpeed(), onPositionEstimate(), onRerouteRequest(), onTargetReached(), onUpdate(), onUpdateNext(), and remainingDistance.
Referenced by laneUpdate(), onLaneUpdate(), and setRoute().
|
slot |
References positionChange().
Referenced by laneUpdate().
|
signal |
References maxAllowedSpeed, and maxAllowedSpeedUpdate().
Referenced by maxAllowedSpeedUpdate(), onMaxAllowedSpeed(), and setRoute().
|
slot |
References arrivalEstimate, arrivalUpdate(), and remainingDistance.
Referenced by laneUpdate(), and NavigationModel().
|
slot |
References currentSpeed, and currentSpeedUpdate().
Referenced by laneUpdate(), and NavigationModel().
|
slot |
References laneUpdate().
Referenced by laneUpdate(), and NavigationModel().
|
slot |
References maxAllowedSpeed, and maxAllowedSpeedUpdate().
Referenced by laneUpdate(), and NavigationModel().
|
slot |
|
slot |
References osmscout::GeoCoord::GetLat(), osmscout::GeoCoord::GetLon(), and rerouteRequest().
Referenced by laneUpdate(), and NavigationModel().
|
slot |
References osmscout::Distance::AsMeter(), osmscout::Bearing::LongDisplayString(), and targetReached().
Referenced by laneUpdate(), and NavigationModel().
|
slot |
Referenced by laneUpdate(), and NavigationModel().
|
slot |
References nextRouteStep, update(), and vehiclePositionChanged().
Referenced by laneUpdate(), and NavigationModel().
|
signal |
References positionChange().
Referenced by locationChanged(), NavigationModel(), and positionChange().
|
signal |
References positionEstimate().
Referenced by onPositionEstimate(), and positionEstimate().
|
signal |
References positionEstimateInTunnelChanged().
Referenced by onPositionEstimate(), positionEstimateInTunnelChanged(), and setRoute().
|
signal |
Requesting computation of the new route when vehicle leave current route.
bearingAngle is in radians.
References rerouteRequest().
Referenced by onRerouteRequest(), and rerouteRequest().
|
override |
References osmscout::RouteStep::roleNames().
Referenced by isPositionOnRoute().
|
signal |
References routeAheadChanged().
Referenced by NavigationModel(), and routeAheadChanged().
|
signal |
References route, and routeChanged().
Referenced by NavigationModel(), routeChanged(), and setRoute().
|
override |
References route.
Referenced by isPositionOnRoute().
| void osmscout::NavigationModel::setRoute | ( | QObject * | route | ) |
References arrivalEstimate, arrivalUpdate(), currentSpeedUpdate(), laneUpdate(), maxAllowedSpeedUpdate(), nextRouteStep, positionEstimateInTunnelChanged(), remainingDistance, route, routeChanged(), osmscout::PositionAgent::Uninitialised, update(), and vehiclePositionChanged().
Referenced by isPositionOnRoute().
|
signal |
References targetReached().
Referenced by onTargetReached(), and targetReached().
|
signal |
References update().
Referenced by onUpdateNext(), setRoute(), and update().
|
signal |
References vehiclePositionChanged().
Referenced by onPositionEstimate(), onUpdateNext(), setRoute(), and vehiclePositionChanged().
|
read |
Referenced by getArrivalEstimate(), laneUpdate(), onArrivalEstimate(), and setRoute().
|
read |
Referenced by currentSpeedUpdate(), getCurrentSpeed(), laneUpdate(), and onCurrentSpeed().
|
read |
|
read |
|
read |
|
read |
|
read |
Referenced by getMaxAllowedSpeed(), laneUpdate(), maxAllowedSpeedUpdate(), and onMaxAllowedSpeed().
|
read |
Referenced by getNextRoutStep(), getVehiclePosition(), onUpdateNext(), and setRoute().
|
read |
|
read |
Referenced by getRemainingDistance(), getRouteWayAhead(), getRouteWayPassed(), laneUpdate(), onArrivalEstimate(), and setRoute().
|
readwrite |
Referenced by getRoute(), getRouteWay(), getRouteWayAhead(), getRouteWayPassed(), getVehiclePosition(), isPositionOnRoute(), routeChanged(), rowCount(), and setRoute().
|
read |
|
read |
|
read |
|
read |
|
read |
|
read |