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
qplacemanagerengineosm.h
Go to the documentation of this file.
1// Copyright (C) 2016 Aaron McCarthy <mccarthy.aaron@gmail.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 QPLACEMANAGERENGINEOSM_H
5#define QPLACEMANAGERENGINEOSM_H
6
7#include <QtLocation/QPlaceManagerEngine>
8#include <QtLocation/QGeoServiceProvider>
9
11
13class QNetworkReply;
15
17{
19
20public:
22 QString *errorString);
24
26
28 QString parentCategoryId(const QString &categoryId) const override;
29 QStringList childCategoryIds(const QString &categoryId) const override;
30 QPlaceCategory category(const QString &categoryId) const override;
31
32 QList<QPlaceCategory> childCategories(const QString &parentId) const override;
33
34 QList<QLocale> locales() const override;
35 void setLocales(const QList<QLocale> &locales) override;
36
37private slots:
38 void categoryReplyFinished();
39 void categoryReplyError();
40 void replyFinished();
41 void replyError(QPlaceReply::Error errorCode, const QString &errorString);
42
43private:
44 void fetchNextCategoryLocale();
45
46 QNetworkAccessManager *m_networkManager;
47 QByteArray m_userAgent;
48 QString m_urlPrefix;
49 QList<QLocale> m_locales;
50 bool m_debugQuery = false;
51 int m_pageSize = 50; // the default page size of the public nominatim server
52
53 QNetworkReply *m_categoriesReply;
54 QList<QPlaceCategoriesReplyOsm *> m_pendingCategoriesReply;
55 QHash<QString, QPlaceCategory> m_categories;
56 QHash<QString, QStringList> m_subcategories;
57
58 QList<QLocale> m_categoryLocales;
59};
60
62
63#endif // QPLACEMANAGERENGINEOSM_H
\inmodule QtCore
Definition qbytearray.h:57
Error
Describes an error related to the loading and setup of a service provider plugin.
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
QStringList childCategoryIds(const QString &categoryId) const override
Returns the child category identifiers of the category corresponding to categoryId.
QPlaceReply * initializeCategories() override
Initializes the categories of the manager engine.
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.
QPlaceSearchReply * search(const QPlaceSearchRequest &request) override
Searches for places according to the parameters specified in request.
QString parentCategoryId(const QString &categoryId) const override
Returns the parent category identifier of the category corresponding to categoryId.
QPlaceManagerEngineOsm(const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString)
void setLocales(const QList< QLocale > &locales) override
Set the list of preferred locales.
\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)