QGeoServiceProvider ClassThe QGeoServiceProvider class aggregates access to services which provide geographical information. More... #include <QGeoServiceProvider> Inherits: QObject. This class was introduced in Qt Location 5.0. Public Types
Public Functions
Static Public Members
Additional Inherited Members
Detailed DescriptionThe QGeoServiceProvider class aggregates access to services which provide geographical information. The Maps and Navigation API allows people to access various kinds of geographical information, including functionality to perform geocoding, routing and the display of maps. The QGeoServiceProvider aggregates the access to a set of these services that are provided by a single vendor. It is possible to mix and match service providers for the various domains, so that a geocoding manager from one service provider can be used with a geographic routing manager from another service provider. This is not recommended unless the client is able to verify that the data provided by the different services are compatible, as differences in the underlying data sets could cause serious incongruences between the services. Subclasses of QGeoServiceProvider guarantee that the different services that they provide are interoperable. At this point only the Nokia Services plugin is packaged with Qt, which is accessible using the provider name "nokia". Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QGeoServiceProvider::NoError | 0 | No error has occurred. |
QGeoServiceProvider::NotSupportedError | 1 | The plugin does not support this functionality. |
QGeoServiceProvider::UnknownParameterError | 2 | The plugin did not recognize one of the parameters it was given. |
QGeoServiceProvider::MissingRequiredParameterError | 3 | The plugin did not find one of the parameters it was expecting. |
QGeoServiceProvider::ConnectionError | 4 | The plugin could not connect to its backend service or database. |
The GeocodingFeatures type is a typedef for QFlags<GeocodingFeature>. It stores an OR combination of GeocodingFeature values.
The MappingFeatures type is a typedef for QFlags<MappingFeature>. It stores an OR combination of MappingFeature values.
The PlacesFeatures type is a typedef for QFlags<PlacesFeature>. It stores an OR combination of PlacesFeature values.
The RoutingFeatures type is a typedef for QFlags<RoutingFeature>. It stores an OR combination of RoutingFeature values.
Destroys the service provider object.
Returns a list of names of the available service providers, for use with the QGeoServiceProvider constructors.
Returns an error code describing the error which occurred during the last operation that was performed by this class.
Returns a string describing the error which occurred during the last operation that was performed by this class.
Returns the QGeocodingManager made available by the service provider.
This function will return 0 if the service provider does not provide any geocoding services.
This function will attempt to construct a QGeocodingManager instance when it is called for the first time. If the attempt is successful the QGeocodingManager will be cached, otherwise each call of this function will attempt to construct a QGeocodingManager instance until the construction is successful.
The QGeocodingManager is owned by this QGeoServiceProvider and should not be deleted separately. Users should assume that deleting the QGeoServiceProvider renders the pointer returned by this method invalid.
After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeocodingManager.
Returns the QGeoMappingManager made available by the service provider.
This function will return 0 if the service provider does not provide any mapping services.
This function will attempt to construct a QGeoMappingManager instance when it is called for the first time. If the attempt is successful the QGeoMappingManager will be cached, otherwise each call of this function will attempt to construct a QGeoMappingManager instance until the construction is successful.
The QGeoMappingManager is owned by this QGeoServiceProvider and should not be deleted separately. Users should assume that deleting the QGeoServiceProvider renders the pointer returned by this method invalid.
After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeoMappingManager.
Returns the QPlaceManager made available by the service provider.
This function will return 0 if the service provider does not provide any place searching services.
This function will attempt to construct a QPlaceManager instance when it is called for the first time. If the attempt is successful the QPlaceManager will be cached, otherwise each call of this function will attempt to construct a QPlace instance until the construction is successful.
The QGeoPlaceManager is owned by this QGeoServiceProvider and should not be deleted separately. Users should assume that deleting the QGeoServiceProvider renders the pointer returned by this method invalid.
After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QPlaceManager.
Returns the QGeoRoutingManager made available by the service provider.
This function will return 0 if the service provider does not provide any geographic routing services.
This function will attempt to construct a QGeoRoutingManager instance when it is called for the first time. If the attempt is successful the QGeoRoutingManager will be cached, otherwise each call of this function will attempt to construct a QGeoRoutingManager instance until the construction is successful.
The QGeoRoutingManager is owned by this QGeoServiceProvider and should not be deleted separately. Users should assume that deleting the QGeoServiceProvider renders the pointer returned by this method invalid.
After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeoRoutingManager.
Sets whether experimental plugins are considered when locating the correct plugin library for this service provider.
Important: this will destroy any existing managers held by this service provider instance. You should be sure not to attempt to use any pointers that you have previously retrieved after calling this method.
Sets the locale used by this service provider. If the relevant features (see LocalizedMappingFeature etc), this will change the languages, units and other locale-specific attributes of the provider's data.
Sets the parameters used to construct individual manager classes for this service provider.
Important: this will destroy any existing managers held by this service provider instance. You should be sure not to attempt to use any pointers that you have previously retrieved after calling this method.