QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGeoServiceProviderPluginQGC.cpp
Go to the documentation of this file.
2
3#include <QtCore/QThread>
4#include <QtQml/QQmlEngine>
5
8
9QGC_LOGGING_CATEGORY(QGeoServiceProviderFactoryQGCLog, "QtLocationPlugin.QGeoServiceProviderFactoryQGC")
10
12 : QObject(parent)
13{
14 qCDebug(QGeoServiceProviderFactoryQGCLog) << this;
15}
16
18{
19 qCDebug(QGeoServiceProviderFactoryQGCLog) << this;
20}
21
23 const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
24{
25 Q_UNUSED(parameters);
26 if (error) {
27 *error = QGeoServiceProvider::NotSupportedError;
28 }
29 if (errorString) {
30 *errorString = QStringLiteral("Geocoding Not Supported");
31 }
32
33 return nullptr;
34}
35
37 const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
38{
39 if (error) {
40 *error = QGeoServiceProvider::NoError;
41 }
42 if (errorString) {
43 *errorString = "";
44 }
45
46 Q_ASSERT(m_engine);
47 Q_ASSERT(m_engine->thread() == QThread::currentThread());
48
49 QNetworkAccessManager *networkManager = m_engine->networkAccessManager();
50
51 return new QGeoTiledMappingManagerEngineQGC(parameters, error, errorString, networkManager, nullptr);
52}
53
55 const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
56{
57 Q_UNUSED(parameters);
58 if (error) {
59 *error = QGeoServiceProvider::NotSupportedError;
60 }
61 if (errorString) {
62 *errorString = QStringLiteral("Routing Not Supported");
63 }
64
65 return nullptr;
66}
67
69 const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const
70{
71 Q_UNUSED(parameters);
72 if (error) {
73 *error = QGeoServiceProvider::NotSupportedError;
74 }
75 if (errorString) {
76 *errorString = QStringLiteral("Place Not Supported");
77 }
78
79 return nullptr;
80}
QString errorString
Error error
#define QGC_LOGGING_CATEGORY(name, categoryStr)
QGeoRoutingManagerEngine * createRoutingManagerEngine(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const final
QPlaceManagerEngine * createPlaceManagerEngine(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const final
QGeoMappingManagerEngine * createMappingManagerEngine(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const final
QGeoCodingManagerEngine * createGeocodingManagerEngine(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString) const final