QGeoRoutingManagerEngine Class
The QGeoRoutingManagerEngine class provides an interface and convenience methods to implementers of QGeoServiceProvider plugins who want to provide access to geographic routing information. More...
| Header: | #include <QGeoRoutingManagerEngine> |
| qmake: | QT += location |
| Since: | Qt 5.6 |
| Inherits: | QObject |
This class was introduced in Qt 5.6.
Detailed Description
Subclasses of QGeoRoutingManagerEngine need to provide an implementation of calculateRoute().
In the default implementation, supportsRouteUpdates() returns false and updateRoute() returns a QGeoRouteReply object containing a QGeoRouteReply::UnsupportedOptionError.
If the routing service supports updating routes as they are being traveled, the subclass should provide an implementation of updateRoute() and call setSupportsRouteUpdates(true) at some point in time before updateRoute() is called.
The function setSupportsRouteUpdates() is one of several functions which configure the reported capabilities of the engine. If the capabilities of an engine differ from the default values these functions should be used so that the reported capabilities are accurate.
It is important that this is done before calculateRoute(), updateRoute() or any of the capability reporting functions are used to prevent incorrect or inconsistent behavior.
A subclass of QGeoRouteManagerEngine will often make use of a subclass fo QGeoRouteReply internally, in order to add any engine-specific data (such as a QNetworkReply object for network-based services) to the QGeoRouteReply instances used by the engine.
See also QGeoRoutingManager.