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
qplacemanagerenginemapbox.h
Go to the documentation of this file.
1// Copyright (C) 2017 Mapbox, Inc.
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 QPLACEMANAGERENGINEMAPBOX_H
5#define QPLACEMANAGERENGINEMAPBOX_H
6
7#include <QtLocation/QPlaceManagerEngine>
8#include <QtLocation/QGeoServiceProvider>
9
11
13
15{
17
18public:
20 QString *errorString);
22
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 QList<QPlaceCategory> childCategories(const QString &parentId) const override;
32
33 QList<QLocale> locales() const override;
34 void setLocales(const QList<QLocale> &locales) override;
35
36 // TODO: icon
37 //QPlaceIcon icon(const QString &remotePath,
38 // const QList<QPlaceCategory> &categories = QList<QPlaceCategory>()) const;
39
40 //QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size) const override;
41
42private slots:
43 void onReplyFinished();
44 void onReplyError(QPlaceReply::Error, const QString &errorString);
45
46private:
47 enum PlaceSearchType {
48 CompleteSearch = 0,
49 SuggestionSearch
50 };
51
52 QPlaceReply *doSearch(const QPlaceSearchRequest&, PlaceSearchType);
53
54 QNetworkAccessManager *m_networkManager;
55 QByteArray m_userAgent;
56 QString m_accessToken;
57 QString m_urlPrefix;
58 bool m_isEnterprise;
59
60 QList<QLocale> m_locales;
61 QHash<QString, QPlaceCategory> m_categories;
62};
63
65
66#endif // QPLACEMANAGERENGINEMAPBOX_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.
\inmodule QtLocation
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.
QList< QLocale > locales() const override
Returns a list of preferred locales.
QPlaceManagerEngineMapbox(const QVariantMap &parameters, QGeoServiceProvider::Error *, QString *errorString)
QPlaceSearchReply * search(const QPlaceSearchRequest &) 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.
QString parentCategoryId(const QString &categoryId) const override
Returns the parent category identifier of the category corresponding to categoryId.
void setLocales(const QList< QLocale > &locales) override
Set the list of preferred locales.
QPlaceSearchSuggestionReply * searchSuggestions(const QPlaceSearchRequest &) override
Requests a set of search term suggestions according to the parameters specified in request.
\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.
#define Q_OBJECT
#define slots