1 #ifndef OSMSCOUT_CLIENT_QT_ROUTINGMODEL_H 2 #define OSMSCOUT_CLIENT_QT_ROUTINGMODEL_H 36 #include <QAbstractListModel> 48 Q_PROPERTY(
int count READ rowCount NOTIFY computingChanged)
49 Q_PROPERTY(
bool ready READ isReady NOTIFY computingChanged)
50 Q_PROPERTY(QObject *routeWay READ getRouteWay NOTIFY computingChanged)
51 Q_PROPERTY(QObject *route READ getRoute NOTIFY computingChanged)
52 Q_PROPERTY(
double length READ getRouteLength NOTIFY computingChanged)
53 Q_PROPERTY(
double duration READ getRouteDuration NOTIFY computingChanged)
62 void computingChanged();
64 void routeFailed(QString reason);
66 void routingProgress(
int percent);
71 QString vehicleStr="car");
84 void onRouteFailed(QString reason,
87 void onRoutingProgress(
int percent,
104 QVariant data(const QModelIndex &index,
int role) const;
106 int rowCount(const QModelIndex &parent = QModelIndex()) const;
112 double getRouteLength() const;
118 double getRouteDuration() const;
120 Qt::ItemFlags flags(const QModelIndex &index) const;
122 QHash<
int, QByteArray> roleNames() const;
124 Q_INVOKABLE QObject* get(
int row) const;
126 inline
bool isReady()
133 QStringList vehicles;
135 vehicles <<
"bicycle";
159 return new OverlayWay(route.routeWay().nodes);
Q_INVOKABLE QStringList availableVehicles()
Definition: RoutingModel.h:131
#define OSMSCOUT_CLIENT_QT_API
Definition: ClientQtImportExport.h:45
std::shared_ptr< LocationEntry > LocationEntryRef
Definition: LocationEntry.h:112
Q_INVOKABLE QObject * locationEntryFromPosition(double lat, double lon, QString label="")
Definition: RoutingModel.h:144
std::shared_ptr< Breaker > BreakerRef
Definition: Breaker.h:65
Definition: QtRouteData.h:40
Definition: RoutingModel.h:45
Definition: OverlayObject.h:189
std::shared_ptr< QmlRoutingProfile > QmlRoutingProfileRef
Definition: QmlRoutingProfile.h:117
Definition: QmlRoutingProfile.h:42
QObject * getRoute() const
Definition: RoutingModel.h:149
Definition: RouteStep.h:42
Roles
Definition: RouteStep.h:63
Definition: LocationEntry.h:42
OverlayWay * getRouteWay()
Definition: RoutingModel.h:154