25#include <QCoreApplication>
29#include <QtCore/private/qfactoryloader_p.h>
34 (
"org.qt-project.qt.geoservice.serviceproviderfactory/6.0",
204 bool allowExperimental)
228template <
class Flags>
231 const QMetaObject *
mo = &QGeoServiceProvider::staticMetaObject;
233 mo->indexOfEnumerator(enumName));
243 if (
v.isString() &&
val != -1) {
257 return d_ptr->
features<RoutingFeatures>(
"RoutingFeatures");
265 return d_ptr->
features<GeocodingFeatures>(
"GeocodingFeatures");
273 return d_ptr->
features<MappingFeatures>(
"MappingFeatures");
281 return d_ptr->
features<PlacesFeatures>(
"PlacesFeatures");
291 return d_ptr->
features<NavigationFeatures>(
"NavigationFeatures");
297template <
class Engine>
321template <
class Manager,
class Engine>
342 Engine *
engine = createEngine<Engine>(
this);
348 engine->setManagerVersion(
370 this->errorString.
clear();
719 for (
auto it = availablePlugins.keyBegin(),
end = availablePlugins.keyEnd();
it !=
end; ++
it) {
744 int versionFound = -1;
787 factory = qobject_cast<QGeoServiceProviderFactory *>(
loader()->instance(idx));
790 errorString =
QLatin1String(
"loader()->instance(idx) failed to return an instance. Set the environment variable QT_DEBUG_PLUGINS to see more details.");
799 static bool alreadyDiscovered =
false;
802 alreadyDiscovered =
false;
804 if (!alreadyDiscovered) {
806 alreadyDiscovered =
true;
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
QCborValue value(qint64 key) const
Returns the QCborValue element in this map that corresponds to key key, if there is one.
bool contains(qint64 key) const
Returns true if this map contains a key-value pair identified by key key.
iterator insert(qint64 key, const QCborValue &value_)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QCborArray toArray() const
MetaDataList metaData() const
virtual QPlaceManagerEngine * createPlaceManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QPlaceManagerEngine instance, initialized with parameters, which implements the place s...
virtual void setQmlEngine(QQmlEngine *engine)
Notify the plugin when the qml engine is ready.
virtual QGeoMappingManagerEngine * createMappingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QGeoMappingManagerEngine instance, initialized with parameters, which implements mappin...
virtual QGeoCodingManagerEngine * createGeocodingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QGeoCodingManagerEngine instance, initialized with parameters, which implements the loc...
virtual QGeoRoutingManagerEngine * createRoutingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QGeoRoutingManagerEngine instance, initialized with parameters, which implements routin...
std::unique_ptr< QGeoRoutingManager > routingManager
QVariantMap cleanedParameterMap
QString geocodeErrorString
QGeoServiceProvider::Error geocodeError
QGeoServiceProvider::Error routingError
QString navigationErrorString
QGeoServiceProvider::Error mappingError
std::unique_ptr< QGeoMappingManager > mappingManager
void loadPlugin(const QVariantMap ¶meters)
QGeoServiceProviderPrivate()
Manager * manager(QGeoServiceProvider::Error *error, QString *errorString)
~QGeoServiceProviderPrivate()
QString routingErrorString
QGeoServiceProvider::Error placeError
static void loadPluginMetadata(QMultiHash< QString, QCborMap > &list)
std::unique_ptr< QPlaceManager > placeManager
QGeoServiceProvider::Error navigationError
void filterParameterMap()
static QMultiHash< QString, QCborMap > plugins(bool reload=false)
QString mappingErrorString
QGeoServiceProvider::Error error
Flags features(const char *enumName) const
QGeoServiceProviderFactory * factory
std::unique_ptr< QGeoCodingManager > geocodingManager
Error routingError() const
Returns an error code describing the error which occurred during the last attempt to create a routing...
MappingFeatures mappingFeatures() const
Returns the mapping features supported by the geo service provider.
QGeoMappingManager * mappingManager() const
Returns the QGeoMappingManager made available by the service provider.
Error mappingError() const
Returns an error code describing the error which occurred during the last attempt to create a mapping...
Error placesError() const
Returns an error code describing the error which occurred during the last attempt to create a places ...
void setQmlEngine(QQmlEngine *engine)
~QGeoServiceProvider()
Destroys the service provider object.
QString navigationErrorString() const
Returns a string describing the error which occurred during the last attempt to create a navigation m...
void setLocale(const QLocale &locale)
Sets the locale used by this service provider to locale.
QGeoServiceProvider(const QString &providerName, const QVariantMap ¶meters=QVariantMap(), bool allowExperimental=false)
Constructs a QGeoServiceProvider whose backend has the name providerName, using the provided paramete...
PlacesFeatures placesFeatures() const
Returns the places features supported by the geo service provider.
Error
Describes an error related to the loading and setup of a service provider plugin.
RoutingFeatures routingFeatures() const
Returns the routing features supported by the geo service provider.
Error navigationError() const
Returns an error code describing the error which occurred during the last attempt to create a navigat...
Error geocodingError() const
Returns an error code describing the error which occurred during the last attempt to create a geocodi...
GeocodingFeatures geocodingFeatures() const
Returns the geocoding features supported by the geo service provider.
Error error() const
Returns an error code describing the error which occurred during the last operation that was performe...
void setAllowExperimental(bool allow)
Sets whether experimental plugins are considered when locating the correct plugin library for this se...
QString mappingErrorString() const
Returns a string describing the error which occurred during the last attempt to create a mapping mana...
QString geocodingErrorString() const
Returns a string describing the error which occurred during the last attempt to create a geocoding ma...
QString routingErrorString() const
Returns a string describing the error which occurred during the last attempt to create a routing mana...
NavigationFeatures navigationFeatures() const
Returns the navigation features supported by the geo service provider.
void setParameters(const QVariantMap ¶meters)
Sets the parameters used to construct individual manager classes for this service provider to paramet...
QPlaceManager * placeManager() const
Returns the QPlaceManager made available by the service provider.
QGeoCodingManager * geocodingManager() const
Returns the QGeoCodingManager made available by the service provider.
QString errorString() const
Returns a string describing the error which occurred during the last operation that was performed by ...
QGeoRoutingManager * routingManager() const
Returns the QGeoRoutingManager made available by the service provider.
QString placesErrorString() const
Returns a string describing the error which occurred during the last attempt to create a places manag...
QString arg(Args &&...args) const
qsizetype size() const noexcept
iterator insert(qsizetype i, parameter_type t)
const_reference at(qsizetype i) const noexcept
iterator erase(const_iterator it)
The QQmlEngine class provides an environment for instantiating QML components.
\macro QT_RESTRICTED_CAST_FROM_ASCII
void clear()
Clears the contents of the string and makes it null.
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QGeoCodingManagerEngine * createEngine< QGeoCodingManagerEngine >(QGeoServiceProviderPrivate *d_ptr)
Engine * createEngine(QGeoServiceProviderPrivate *)
QGeoRoutingManagerEngine * createEngine< QGeoRoutingManagerEngine >(QGeoServiceProviderPrivate *d_ptr)
QPlaceManagerEngine * createEngine< QPlaceManagerEngine >(QGeoServiceProviderPrivate *d_ptr)
QGeoMappingManagerEngine * createEngine< QGeoMappingManagerEngine >(QGeoServiceProviderPrivate *d_ptr)
#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS)
GLsizei const GLfloat * v
[13]
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static double toDouble(Value v)
const char className[16]
[1]
QNetworkAccessManager manager
char * toString(const MyType &t)
[31]
\inmodule QtCore \reentrant
QT_BEGIN_NAMESPACE bool toBool(const QString &str)