6#ifndef MARBLE_DECLARATIVE_ROUTING_H
7#define MARBLE_DECLARATIVE_ROUTING_H
12#include <routing/RoutingModel.h>
13#include <RouteRequestModel.h>
23 Q_PROPERTY( MarbleMap* marbleMap READ marbleMap WRITE setMarbleMap NOTIFY marbleMapChanged)
24 Q_PROPERTY(
QString routingProfile READ routingProfile WRITE setRoutingProfile NOTIFY routingProfileChanged )
25 Q_PROPERTY(
bool hasRoute READ hasRoute NOTIFY hasRouteChanged )
26 Q_PROPERTY(
bool hasWaypoints READ hasWaypoints NOTIFY hasWaypointsChanged )
27 Q_PROPERTY( RoutingModel* routingModel READ routingModel NOTIFY routingModelChanged)
28 Q_PROPERTY(
QQmlComponent* waypointDelegate READ waypointDelegate WRITE setWaypointDelegate NOTIFY waypointDelegateChanged)
29 Q_PROPERTY( RouteRequestModel* routeRequestModel READ routeRequestModel NOTIFY routeRequestModelChanged)
32 enum RoutingProfile { Motorcar, Bicycle, Pedestrian };
38 void setMarbleMap( MarbleMap* marbleMap );
40 MarbleMap *marbleMap();
44 void setRoutingProfile(
const QString & profile );
46 bool hasRoute()
const;
48 bool hasWaypoints()
const;
50 RoutingModel *routingModel();
56 RouteRequestModel* routeRequestModel();
59 void addVia( qreal lon, qreal lat );
61 void addViaAtIndex(
int index, qreal lon, qreal lat );
63 void addViaByPlacemark( Placemark * placemark );
65 void addViaByPlacemarkAtIndex(
int index, Placemark * placemark );
67 void setVia(
int index, qreal lon, qreal lat );
69 void removeVia(
int index );
71 void swapVias(
int index1,
int index2 );
79 void openRoute(
const QString &filename );
81 void saveRoute(
const QString &filename );
87 int addSearchResultPlacemark( Placemark * placemark );
89 void clearSearchResultPlacemarks();
92 void marbleMapChanged();
94 void routingProfileChanged();
96 void hasRouteChanged();
98 void hasWaypointsChanged();
100 void routingModelChanged();
102 void waypointDelegateChanged(
QQmlComponent * waypointDelegate);
104 void routeRequestModelChanged(RouteRequestModel* routeRequestModel);
108 QSGNode * updatePaintNode(
QSGNode *oldNode, UpdatePaintNodeData *)
override;
111 void updateWaypointItems();
113 void updateSearchResultPlacemarks();
116 RoutingPrivate*
const d;
Binds a QML item to a specific geodetic location in screen coordinates.