|
libosmscout 1.1.1
|
#include <libosmscout-client-qt/include/osmscoutclientqt/RoutingModel.h>


Public Types | |
| using | Roles = RouteStep::Roles |
Public Slots | |
| void | setStartAndTarget (LocationEntry *start, LocationEntry *target, QString vehicleStr="car", double vehicleBearing=-1) |
| void | setStartAndTarget (LocationEntry *start, LocationEntry *target, QmlRoutingProfile *routingProfile, double vehicleBearing=-1) |
| void | clear () |
| void | cancel () |
| void | onRouteComputed (QtRouteData route, int requestId) |
| void | onRouteFailed (QString reason, int requestId) |
| void | onRoutingProgress (int percent, int requestId) |
Signals | |
| void | routeRequest (LocationEntryRef start, LocationEntryRef target, QmlRoutingProfileRef profile, int requestId, osmscout::BreakerRef breaker, std::optional< osmscout::Bearing > bearing) |
| void | computingChanged () |
| void | routeFailed (QString reason) |
| void | routingProgress (int percent) |
Public Member Functions | |
| RoutingListModel (QObject *parent=nullptr) | |
| RoutingListModel (const RoutingListModel &)=delete | |
| RoutingListModel (RoutingListModel &&)=delete | |
| ~RoutingListModel () override | |
| RoutingListModel & | operator= (const RoutingListModel &)=delete |
| RoutingListModel & | operator= (RoutingListModel &&)=delete |
| QVariant | data (const QModelIndex &index, int role) const override |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| double | getRouteLength () const |
| double | getRouteDuration () const |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| QHash< int, QByteArray > | roleNames () const override |
| Q_INVOKABLE QObject * | get (int row) const |
| bool | isReady () |
| Q_INVOKABLE QStringList | availableVehicles () |
| Q_INVOKABLE QObject * | locationEntryFromPosition (double lat, double lon, QString label="") |
| QObject * | getRoute () const |
| OverlayWay * | getRouteWay () |
Properties | |
| int | count |
| bool | ready |
| QObject * | routeWay |
| QObject * | route |
| double | length |
| double | duration |
|
explicit |
|
delete |
|
delete |
|
override |
|
inline |
|
slot |
|
slot |
|
signal |
|
override |
|
override |
| Q_INVOKABLE QObject * osmscout::RoutingListModel::get | ( | int | row | ) | const |
|
inline |
| double osmscout::RoutingListModel::getRouteDuration | ( | ) | const |
Route duration in seconds
| double osmscout::RoutingListModel::getRouteLength | ( | ) | const |
Route length in meters
|
inline |
|
inline |
|
inline |
Create LocationEntry from geographic coordinate with optional label. It may be used from QML when selecting route start/end via point on map.
|
slot |
|
slot |
|
slot |
|
delete |
|
delete |
|
override |
|
signal |
|
signal |
|
signal |
|
override |
|
slot |
Compute new route.
| start | |
| target | |
| routingProfile | profile of the routing |
| vehicleBearing | in radians, when negative, it is not taken into account |
|
slot |
Compute new route.
| start | |
| target | |
| vehicleStr | predefined vehicle string. It may be car|bicycle|foot |
| vehicleBearing | in radians, when negative, it is not taken into account |
|
read |
|
read |
|
read |
|
read |
|
read |
|
read |