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
placemanagerengine_esri.h
Go to the documentation of this file.
1// Copyright (C) 2013-2018 Esri <contracts@esri.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef PLACEMANAGERENGINEESRI_H
5#define PLACEMANAGERENGINEESRI_H
6
7#include <QtLocation/QPlaceManagerEngine>
8#include <QtLocation/QGeoServiceProvider>
9
11
14class QNetworkReply;
15
17{
19
20public:
23
25
27 QString parentCategoryId(const QString &categoryId) const override;
28 QStringList childCategoryIds(const QString &categoryId) const override;
29 QPlaceCategory category(const QString &categoryId) const override;
30
31 QList<QPlaceCategory> childCategories(const QString &parentId) const override;
32
33 QList<QLocale> locales() const override;
34 void setLocales(const QList<QLocale> &locales) override;
35
36private slots:
37 void geocodeServerReplyFinished();
38 void geocodeServerReplyError();
39 void replyFinished();
40 void replyError(QPlaceReply::Error errorCode, const QString &errorString);
41
42private:
43 QNetworkAccessManager *m_networkManager = nullptr;
44
45 // geocode serveur
46 void initializeGeocodeServer();
47
48 QNetworkReply *m_geocodeServerReply = nullptr;
49
50 // categories
51 void finishCategories();
52 void errorCaterogies(const QString &error);
53 void parseCategories(const QJsonArray &jsonArray, const QString &parentCategoryId);
54
55 QList<PlaceCategoriesReplyEsri *> m_pendingCategoriesReply;
56 QHash<QString, QPlaceCategory> m_categories;
57 QHash<QString, QStringList> m_subcategories;
58 QHash<QString, QString> m_parentCategory;
59
60 // localized names
61 QString localizedName(const QJsonObject &jsonObject);
62 void parseCandidateFields(const QJsonArray &jsonArray);
63 void parseCountries(const QJsonArray &jsonArray);
64
65 QList<QLocale> m_locales;
66 QHash<QString, QString> m_candidateFieldsLocale;
67 QHash<QString, QString> m_countriesLocale;
68 void localizedName();
69};
70
72
73#endif // PLACEMANAGERENGINEESRI_H
QPlaceReply * initializeCategories() override
Initializes the categories of the manager engine.
QStringList childCategoryIds(const QString &categoryId) const override
Returns the child category identifiers of the category corresponding to categoryId.
QPlaceSearchReply * search(const QPlaceSearchRequest &request) override
Searches for places according to the parameters specified in request.
QList< QPlaceCategory > childCategories(const QString &parentId) const override
Returns a list of categories that are children of the category corresponding to parentId.
QList< QLocale > locales() const override
Returns a list of preferred locales.
void setLocales(const QList< QLocale > &locales) override
Set the list of preferred locales.
PlaceManagerEngineEsri(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString)
QString parentCategoryId(const QString &categoryId) const override
Returns the parent category identifier of the category corresponding to categoryId.
Error
Describes an error related to the loading and setup of a service provider plugin.
\inmodule QtCore\reentrant
Definition qjsonarray.h:18
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
The QNetworkAccessManager class allows the application to send network requests and receive replies.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
Definition qplacereply.h:15
Error
Describes an error which occurred during an operation.
Definition qplacereply.h:18
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
#define Q_OBJECT
#define slots
QNetworkRequest request(url)