Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QGeoServiceProvider Class Reference

\inmodule QtLocation More...

#include <qgeoserviceprovider.h>

+ Inheritance diagram for QGeoServiceProvider:
+ Collaboration diagram for QGeoServiceProvider:

Public Types

enum  Error {
  NoError , NotSupportedError , UnknownParameterError , MissingRequiredParameterError ,
  ConnectionError , LoaderError
}
 Describes an error related to the loading and setup of a service provider plugin. More...
 
enum  RoutingFeature {
  NoRoutingFeatures = 0 , OnlineRoutingFeature = (1<<0) , OfflineRoutingFeature = (1<<1) , LocalizedRoutingFeature = (1<<2) ,
  RouteUpdatesFeature = (1<<3) , AlternativeRoutesFeature = (1<<4) , ExcludeAreasRoutingFeature = (1<<5) , AnyRoutingFeatures = ~(0)
}
 Describes the routing features supported by the geo service provider. More...
 
enum  GeocodingFeature {
  NoGeocodingFeatures = 0 , OnlineGeocodingFeature = (1<<0) , OfflineGeocodingFeature = (1<<1) , ReverseGeocodingFeature = (1<<2) ,
  LocalizedGeocodingFeature = (1<<3) , AnyGeocodingFeatures = ~(0)
}
 Describes the geocoding features supported by the geo service provider. More...
 
enum  MappingFeature {
  NoMappingFeatures = 0 , OnlineMappingFeature = (1<<0) , OfflineMappingFeature = (1<<1) , LocalizedMappingFeature = (1<<2) ,
  AnyMappingFeatures = ~(0)
}
 Describes the mapping features supported by the geo service provider. More...
 
enum  PlacesFeature {
  NoPlacesFeatures = 0 , OnlinePlacesFeature = (1<<0) , OfflinePlacesFeature = (1<<1) , SavePlaceFeature = (1<<2) ,
  RemovePlaceFeature = (1<<3) , SaveCategoryFeature = (1<<4) , RemoveCategoryFeature = (1<<5) , PlaceRecommendationsFeature = (1<<6) ,
  SearchSuggestionsFeature = (1<<7) , LocalizedPlacesFeature = (1<<8) , NotificationsFeature = (1<<9) , PlaceMatchingFeature = (1<<10) ,
  AnyPlacesFeatures = ~(0)
}
 Describes the places features supported by the geo service provider. More...
 
enum  NavigationFeature { NoNavigationFeatures = 0 , OnlineNavigationFeature = (1<<0) , OfflineNavigationFeature = (1<<1) , AnyNavigationFeatures = ~(0) }
 Describes the navigation features supported by the geo service provider. More...
 

Public Member Functions

 QGeoServiceProvider (const QString &providerName, const QVariantMap &parameters=QVariantMap(), bool allowExperimental=false)
 Constructs a QGeoServiceProvider whose backend has the name providerName, using the provided parameters.
 
 ~QGeoServiceProvider ()
 Destroys the service provider object.
 
RoutingFeatures routingFeatures () const
 Returns the routing features supported by the geo service provider.
 
GeocodingFeatures geocodingFeatures () const
 Returns the geocoding features supported by the geo service provider.
 
MappingFeatures mappingFeatures () const
 Returns the mapping features supported by the geo service provider.
 
PlacesFeatures placesFeatures () const
 Returns the places features supported by the geo service provider.
 
NavigationFeatures navigationFeatures () const
 Returns the navigation features supported by the geo service provider.
 
QGeoCodingManagergeocodingManager () const
 Returns the QGeoCodingManager made available by the service provider.
 
QGeoMappingManagermappingManager () const
 Returns the QGeoMappingManager made available by the service provider.
 
QGeoRoutingManagerroutingManager () const
 Returns the QGeoRoutingManager made available by the service provider.
 
QPlaceManagerplaceManager () const
 Returns the QPlaceManager made available by the service provider.
 
Error error () const
 Returns an error code describing the error which occurred during the last operation that was performed by this class.
 
QString errorString () const
 Returns a string describing the error which occurred during the last operation that was performed by this class.
 
Error mappingError () const
 Returns an error code describing the error which occurred during the last attempt to create a mapping manager.
 
QString mappingErrorString () const
 Returns a string describing the error which occurred during the last attempt to create a mapping manager.
 
Error geocodingError () const
 Returns an error code describing the error which occurred during the last attempt to create a geocoding manager.
 
QString geocodingErrorString () const
 Returns a string describing the error which occurred during the last attempt to create a geocoding manager.
 
Error routingError () const
 Returns an error code describing the error which occurred during the last attempt to create a routing manager.
 
QString routingErrorString () const
 Returns a string describing the error which occurred during the last attempt to create a routing manager.
 
Error placesError () const
 Returns an error code describing the error which occurred during the last attempt to create a places manager.
 
QString placesErrorString () const
 Returns a string describing the error which occurred during the last attempt to create a places manager.
 
Error navigationError () const
 Returns an error code describing the error which occurred during the last attempt to create a navigation manager.
 
QString navigationErrorString () const
 Returns a string describing the error which occurred during the last attempt to create a navigation manager.
 
void setParameters (const QVariantMap &parameters)
 Sets the parameters used to construct individual manager classes for this service provider to parameters.
 
void setLocale (const QLocale &locale)
 Sets the locale used by this service provider to locale.
 
void setAllowExperimental (bool allow)
 Sets whether experimental plugins are considered when locating the correct plugin library for this service provider to allow.
 
void setQmlEngine (QQmlEngine *engine)
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
bool moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
 Changes the thread affinity for this object and its children and returns true on success.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
void killTimer (Qt::TimerId id)
 
template<typename T >
findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 

Static Public Member Functions

static QStringList availableServiceProviders ()
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Detailed Description

\inmodule QtLocation

Since
5.6

The 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.

Each service provider must follow a naming convention for their service specific parameter names/keys. They use the provider name as prefix for all their parameter names. When a provider is loaded only those parameters are passed on whose parameter names start with the provider name. This avoids the sharing sensitive parameters such as confidential token or app_id parameters with other plugins.

Please check the GeoServices plugin specific documentation to obtain a complete list of the available parameter names/keys and values.

Definition at line 26 of file qgeoserviceprovider.h.

Member Enumeration Documentation

◆ Error

Describes an error related to the loading and setup of a service provider plugin.

\value NoError No error has occurred. \value NotSupportedError The plugin does not support this functionality. \value UnknownParameterError The plugin did not recognize one of the parameters it was given. \value MissingRequiredParameterError The plugin did not find one of the parameters it was expecting. \value ConnectionError The plugin could not connect to its backend service or database. \value LoaderError The plugin failed to load.

Enumerator
NoError 
NotSupportedError 
UnknownParameterError 
MissingRequiredParameterError 
ConnectionError 
LoaderError 

Definition at line 31 of file qgeoserviceprovider.h.

◆ GeocodingFeature

Describes the geocoding features supported by the geo service provider.

\value NoGeocodingFeatures No geocoding features are supported. \value OnlineGeocodingFeature Online geocoding is supported. \value OfflineGeocodingFeature Offline geocoding is supported. \value ReverseGeocodingFeature Reverse geocoding is supported. \value LocalizedGeocodingFeature Supports returning geocoding results with localized addresses. \value AnyGeocodingFeatures Matches a geo service provider that provides any geocoding features.

Enumerator
NoGeocodingFeatures 
OnlineGeocodingFeature 
OfflineGeocodingFeature 
ReverseGeocodingFeature 
LocalizedGeocodingFeature 
AnyGeocodingFeatures 

Definition at line 51 of file qgeoserviceprovider.h.

◆ MappingFeature

Describes the mapping features supported by the geo service provider.

\value NoMappingFeatures No mapping features are supported. \value OnlineMappingFeature Online mapping is supported. \value OfflineMappingFeature Offline mapping is supported. \value LocalizedMappingFeature Supports returning localized map data. \value AnyMappingFeatures Matches a geo service provider that provides any mapping features.

Enumerator
NoMappingFeatures 
OnlineMappingFeature 
OfflineMappingFeature 
LocalizedMappingFeature 
AnyMappingFeatures 

Definition at line 60 of file qgeoserviceprovider.h.

◆ NavigationFeature

Describes the navigation features supported by the geo service provider.

\value NoNavigationFeatures No navigation features are supported. \value OnlineNavigationFeature Online navigation is supported. \value OfflineNavigationFeature Offline navigation is supported. \value AnyNavigationFeatures Matches a geo service provider that provides any navigation features.

Enumerator
NoNavigationFeatures 
OnlineNavigationFeature 
OfflineNavigationFeature 
AnyNavigationFeatures 

Definition at line 84 of file qgeoserviceprovider.h.

◆ PlacesFeature

Describes the places features supported by the geo service provider.

\value NoPlacesFeatures No places features are supported. \value OnlinePlacesFeature Online places is supported. \value OfflinePlacesFeature Offline places is supported. \value SavePlaceFeature Saving places is supported. \value RemovePlaceFeature Removing or deleting places is supported. \value SaveCategoryFeature Saving categories is supported. \value RemoveCategoryFeature Removing or deleting categories is supported. \value PlaceRecommendationsFeature Searching for recommended places similar to another place is supported. \value SearchSuggestionsFeature Search suggestions is supported. \value LocalizedPlacesFeature Supports returning localized place data. \value NotificationsFeature Notifications of place and category changes is supported. \value PlaceMatchingFeature Supports matching places from two different geo service providers. \value AnyPlacesFeatures Matches a geo service provider that provides any places features.

Enumerator
NoPlacesFeatures 
OnlinePlacesFeature 
OfflinePlacesFeature 
SavePlaceFeature 
RemovePlaceFeature 
SaveCategoryFeature 
RemoveCategoryFeature 
PlaceRecommendationsFeature 
SearchSuggestionsFeature 
LocalizedPlacesFeature 
NotificationsFeature 
PlaceMatchingFeature 
AnyPlacesFeatures 

Definition at line 68 of file qgeoserviceprovider.h.

◆ RoutingFeature

Describes the routing features supported by the geo service provider.

\value NoRoutingFeatures No routing features are supported. \value OnlineRoutingFeature Online routing is supported. \value OfflineRoutingFeature Offline routing is supported. \value LocalizedRoutingFeature Supports returning routes with localized addresses and instructions. \value RouteUpdatesFeature Updating an existing route based on the current position is supported. \value AlternativeRoutesFeature Supports returning alternative routes. \value ExcludeAreasRoutingFeature Supports specifying a areas which the returned route must not cross. \value AnyRoutingFeatures Matches a geo service provider that provides any routing features.

Enumerator
NoRoutingFeatures 
OnlineRoutingFeature 
OfflineRoutingFeature 
LocalizedRoutingFeature 
RouteUpdatesFeature 
AlternativeRoutesFeature 
ExcludeAreasRoutingFeature 
AnyRoutingFeatures 

Definition at line 40 of file qgeoserviceprovider.h.

Constructor & Destructor Documentation

◆ QGeoServiceProvider()

QGeoServiceProvider::QGeoServiceProvider ( const QString & providerName,
const QVariantMap & parameters = QVariantMap(),
bool allowExperimental = false )

Constructs a QGeoServiceProvider whose backend has the name providerName, using the provided parameters.

If multiple plugins have the same providerName, the plugin with the highest reported providerVersion() will be used.

If allowExperimental is true then plugins marked as experimental may be used. By default experimental plugins are not considered.

If no plugin matching providerName was able to be loaded then error() and errorString() will provide details about why this is the case.

Note
Before the list of parameters is passed on to the to-be-loaded provider plugin, the list is filtered to avoid the sharing of plugin specific parameters with unrelated provider plugins. Plugin specific parameter keys must be prefixed with the provider name (e.g. here.app_id).

Definition at line 202 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::experimental, QGeoServiceProviderPrivate::loadMeta(), QGeoServiceProviderPrivate::parameterMap, QGeoServiceProviderPrivate::providerName, and QStringLiteral.

+ Here is the call graph for this function:

◆ ~QGeoServiceProvider()

QGeoServiceProvider::~QGeoServiceProvider ( )

Destroys the service provider object.

Definition at line 220 of file qgeoserviceprovider.cpp.

Member Function Documentation

◆ availableServiceProviders()

static QStringList QGeoServiceProvider::availableServiceProviders ( )
static

Referenced by QDeclarativeGeoServiceProvider::componentComplete().

+ Here is the caller graph for this function:

◆ error()

QGeoServiceProvider::Error QGeoServiceProvider::error ( ) const

Returns an error code describing the error which occurred during the last operation that was performed by this class.

Definition at line 503 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::error.

Referenced by QDeclarativeSupportedCategoriesModel::update().

+ Here is the caller graph for this function:

◆ errorString()

QString QGeoServiceProvider::errorString ( ) const

Returns a string describing the error which occurred during the last operation that was performed by this class.

Definition at line 512 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::errorString.

Referenced by QDeclarativeSearchModelBase::update(), and QDeclarativeSupportedCategoriesModel::update().

+ Here is the caller graph for this function:

◆ geocodingError()

QGeoServiceProvider::Error QGeoServiceProvider::geocodingError ( ) const

Returns an error code describing the error which occurred during the last attempt to create a geocoding manager.

Since
5.13

Definition at line 545 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::geocodeError.

Referenced by QDeclarativeGeocodeModel::pluginReady().

+ Here is the caller graph for this function:

◆ geocodingErrorString()

QString QGeoServiceProvider::geocodingErrorString ( ) const

Returns a string describing the error which occurred during the last attempt to create a geocoding manager.

Since
5.13

Definition at line 556 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::geocodeErrorString.

Referenced by QDeclarativeGeocodeModel::pluginReady().

+ Here is the caller graph for this function:

◆ geocodingFeatures()

QGeoServiceProvider::GeocodingFeatures QGeoServiceProvider::geocodingFeatures ( ) const

Returns the geocoding features supported by the geo service provider.

Definition at line 263 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::features().

Referenced by QDeclarativeGeoServiceProviderRequirements::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ geocodingManager()

QGeoCodingManager * QGeoServiceProvider::geocodingManager ( ) const

Returns the QGeoCodingManager made available by the service provider.

This function will return \nullptr 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.

Definition at line 397 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::error, QGeoServiceProviderPrivate::errorString, QGeoServiceProviderPrivate::geocodeError, QGeoServiceProviderPrivate::geocodeErrorString, QGeoServiceProviderPrivate::geocodingManager, QGeoServiceProviderPrivate::manager(), and qDebug.

Referenced by QDeclarativeGeocodeModel::pluginReady(), and QDeclarativeGeocodeModel::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mappingError()

QGeoServiceProvider::Error QGeoServiceProvider::mappingError ( ) const

Returns an error code describing the error which occurred during the last attempt to create a mapping manager.

Since
5.13

Definition at line 523 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::mappingError.

◆ mappingErrorString()

QString QGeoServiceProvider::mappingErrorString ( ) const

Returns a string describing the error which occurred during the last attempt to create a mapping manager.

Since
5.13

Definition at line 534 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::mappingErrorString.

◆ mappingFeatures()

QGeoServiceProvider::MappingFeatures QGeoServiceProvider::mappingFeatures ( ) const

Returns the mapping features supported by the geo service provider.

Definition at line 271 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::features().

Referenced by QDeclarativeGeoServiceProviderRequirements::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mappingManager()

QGeoMappingManager * QGeoServiceProvider::mappingManager ( ) const

Returns the QGeoMappingManager made available by the service provider.

This function will return \nullptr 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.

Definition at line 430 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::error, QGeoServiceProviderPrivate::errorString, QGeoServiceProviderPrivate::manager(), QGeoServiceProviderPrivate::mappingError, QGeoServiceProviderPrivate::mappingErrorString, QGeoServiceProviderPrivate::mappingManager, and qDebug.

+ Here is the call graph for this function:

◆ navigationError()

QGeoServiceProvider::Error QGeoServiceProvider::navigationError ( ) const

Returns an error code describing the error which occurred during the last attempt to create a navigation manager.

Since
5.13

Definition at line 611 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::navigationError.

◆ navigationErrorString()

QString QGeoServiceProvider::navigationErrorString ( ) const

Returns a string describing the error which occurred during the last attempt to create a navigation manager.

Since
5.13

Definition at line 622 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::navigationErrorString.

◆ navigationFeatures()

QGeoServiceProvider::NavigationFeatures QGeoServiceProvider::navigationFeatures ( ) const

Returns the navigation features supported by the geo service provider.

Since
QtLocation 5.11

Definition at line 289 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::features().

Referenced by QDeclarativeGeoServiceProviderRequirements::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ placeManager()

QPlaceManager * QGeoServiceProvider::placeManager ( ) const

Returns the QPlaceManager made available by the service provider.

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.

Definition at line 488 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::error, QGeoServiceProviderPrivate::errorString, QGeoServiceProviderPrivate::manager(), QGeoServiceProviderPrivate::placeError, QGeoServiceProviderPrivate::placeErrorString, QGeoServiceProviderPrivate::placeManager, and qDebug.

Referenced by QDeclarativePlaceContentModel::fetchMore(), RequestHandler::initializeManager(), QDeclarativeSearchModelBase::initializePlugin(), QDeclarativeSearchResultModel::initializePlugin(), QDeclarativeSearchResultModel::queryFinished(), QDeclarativeSearchResultModel::setFavoritesPlugin(), QDeclarativeSupportedCategoriesModel::setPlugin(), QDeclarativeSearchModelBase::update(), and QDeclarativeSupportedCategoriesModel::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ placesError()

QGeoServiceProvider::Error QGeoServiceProvider::placesError ( ) const

Returns an error code describing the error which occurred during the last attempt to create a places manager.

Since
5.13

Definition at line 589 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::placeError.

◆ placesErrorString()

QString QGeoServiceProvider::placesErrorString ( ) const

Returns a string describing the error which occurred during the last attempt to create a places manager.

Since
5.13

Definition at line 600 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::placeErrorString.

◆ placesFeatures()

QGeoServiceProvider::PlacesFeatures QGeoServiceProvider::placesFeatures ( ) const

Returns the places features supported by the geo service provider.

Definition at line 279 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::features().

Referenced by QDeclarativeGeoServiceProviderRequirements::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routingError()

QGeoServiceProvider::Error QGeoServiceProvider::routingError ( ) const

Returns an error code describing the error which occurred during the last attempt to create a routing manager.

Since
5.13

Definition at line 567 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::routingError.

◆ routingErrorString()

QString QGeoServiceProvider::routingErrorString ( ) const

Returns a string describing the error which occurred during the last attempt to create a routing manager.

Since
5.13

Definition at line 578 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::routingErrorString.

◆ routingFeatures()

QGeoServiceProvider::RoutingFeatures QGeoServiceProvider::routingFeatures ( ) const

Returns the routing features supported by the geo service provider.

Definition at line 255 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::features().

Referenced by QDeclarativeGeoServiceProviderRequirements::matches().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ routingManager()

QGeoRoutingManager * QGeoServiceProvider::routingManager ( ) const

Returns the QGeoRoutingManager made available by the service provider.

This function will return \nullptr 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.

Definition at line 461 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::error, QGeoServiceProviderPrivate::errorString, QGeoServiceProviderPrivate::manager(), qDebug, QGeoServiceProviderPrivate::routingError, QGeoServiceProviderPrivate::routingErrorString, and QGeoServiceProviderPrivate::routingManager.

Referenced by QDeclarativeGeoRouteModel::measurementSystem(), QDeclarativeGeoRouteModel::setMeasurementSystem(), and QDeclarativeGeoRouteModel::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAllowExperimental()

void QGeoServiceProvider::setAllowExperimental ( bool allow)

Sets whether experimental plugins are considered when locating the correct plugin library for this service provider to allow.

{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.

Definition at line 635 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::experimental, QGeoServiceProviderPrivate::loadMeta(), and QGeoServiceProviderPrivate::unload().

+ Here is the call graph for this function:

◆ setLocale()

void QGeoServiceProvider::setLocale ( const QLocale & locale)

Sets the locale used by this service provider to locale.

If the relevant features (see LocalizedMappingFeature etc), this will change the languages, units and other locale-specific attributes of the provider's data.

Definition at line 672 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::geocodingManager, QGeoServiceProviderPrivate::locale, QGeoServiceProviderPrivate::localeSet, QGeoServiceProviderPrivate::mappingManager, QGeoServiceProviderPrivate::placeManager, and QGeoServiceProviderPrivate::routingManager.

◆ setParameters()

void QGeoServiceProvider::setParameters ( const QVariantMap & parameters)

Sets the parameters used to construct individual manager classes for this service provider to parameters.

Before the list of parameters is passed on to the to-be-loaded service provider, the list is filtered to avoid the sharing of provider specific parameters with unrelated service providers. Provider specific parameter keys must be prefixed with the provider name (e.g. here.app_id).

{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.

Definition at line 660 of file qgeoserviceprovider.cpp.

References QGeoServiceProviderPrivate::loadMeta(), QGeoServiceProviderPrivate::parameterMap, and QGeoServiceProviderPrivate::unload().

+ Here is the call graph for this function:

◆ setQmlEngine()

void QGeoServiceProvider::setQmlEngine ( QQmlEngine * engine)

Definition at line 642 of file qgeoserviceprovider.cpp.

References engine, and QGeoServiceProviderPrivate::qmlEngine.


The documentation for this class was generated from the following files: