Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplacemanagerengine_nokiav2.h
Go to the documentation of this file.
1// Copyright (C) 2015 The Qt Company Ltd.
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 QPLACEMANAGERENGINE_NOKIAV2_H
5#define QPLACEMANAGERENGINE_NOKIAV2_H
6
7#include <QtCore/QPointer>
8#include <QtNetwork/QNetworkReply>
9#include <QtLocation/QPlaceCategory>
10#include <QtLocation/QPlaceManagerEngine>
11#include <QtLocation/QGeoServiceProvider>
12
14
15class QPlaceContentReply;
16class QNetworkReply;
17class QNetworkAccessManager;
18class QPlaceCategoriesReplyHere;
20class QGeoUriProvider;
21
28
30
32{
34
35public:
41
42 QPlaceDetailsReply *getPlaceDetails(const QString &placeId) override;
43
44 QPlaceContentReply *getPlaceContent(const QPlaceContentRequest &request) override;
45
46 QPlaceSearchReply *search(const QPlaceSearchRequest &query) override;
47
48 QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &query) override;
49
51 QString parentCategoryId(const QString &categoryId) const override;
52 QStringList childCategoryIds(const QString &categoryId) const override;
53 QPlaceCategory category(const QString &categoryId) const override;
54 QList<QPlaceCategory> childCategories(const QString &parentId) const override;
55
56 QList<QLocale> locales() const override;
57 void setLocales(const QList<QLocale> &locales) override;
58
59 QPlaceIcon icon(const QString &remotePath,
60 const QList<QPlaceCategory> &categories = QList<QPlaceCategory>()) const;
61
62 QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size) const override;
63
64private:
65 QNetworkReply *sendRequest(const QUrl &url);
66 QByteArray createLanguageString() const;
67
68private Q_SLOTS:
69 void replyFinished();
70 void replyError(QPlaceReply::Error error_, const QString &errorString);
71 void categoryReplyFinished();
72 void categoryReplyError();
73
74private:
75 QGeoNetworkAccessManager *m_manager;
76 QGeoUriProvider *m_uriProvider;
77
78 QList<QLocale> m_locales;
79
80 QPlaceCategoryTree m_categoryTree;
81 QPlaceCategoryTree m_tempTree;
82 QHash<QString, QString> m_restIdToIconHash;
83
84 QPointer<QPlaceCategoriesReplyHere> m_categoryReply;
85 QHash<QString, QNetworkReply *> m_categoryRequests;
86
87 QString m_apiKey;
88
89 QString m_localDataPath;
90 QString m_theme;
91};
92
93QT_END_NAMESPACE
94
95#endif // QPLACEMANAGERENGINE_NOKIAV2_H
QPlaceContentReply * getPlaceContent(const QPlaceContentRequest &request) override
Retrieves content for a place according to the parameters specified in request.
QStringList childCategoryIds(const QString &categoryId) const override
Returns the child category identifiers of the category corresponding to categoryId.
QString parentCategoryId(const QString &categoryId) const override
Returns the parent category identifier of the category corresponding to categoryId.
QPlaceSearchSuggestionReply * searchSuggestions(const QPlaceSearchRequest &query) override
Requests a set of search term suggestions according to the parameters specified in request.
QPlaceReply * initializeCategories() override
Initializes the categories of the manager engine.
QPlaceDetailsReply * getPlaceDetails(const QString &placeId) override
Retrieves details of place corresponding to the given placeId.
QList< QPlaceCategory > childCategories(const QString &parentId) const override
Returns a list of categories that are children of the category corresponding to parentId.
QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size) const override
QUrl QPlaceManagerEngine::constructIconUrl(const QPlaceIcon &icon, const QSize &size)
QPlaceSearchReply * search(const QPlaceSearchRequest &query) override
Searches for places according to the parameters specified in request.
void setLocales(const QList< QLocale > &locales) override
Set the list of preferred locales.
QList< QLocale > locales() const override
Returns a list of preferred locales.
QPlaceCategory category(const QString &categoryId) const override
Returns the category corresponding to the given categoryId.
QPlaceIcon icon(const QString &remotePath, const QList< QPlaceCategory > &categories=QList< QPlaceCategory >()) const
QList< QPlaceContactDetail > parseContactDetails(const QJsonArray &contacts)
QList< QPlaceCategory > parseCategories(const QJsonArray &categoryArray, const QPlaceManagerEngineNokiaV2 *engine)
QT_BEGIN_NAMESPACE QGeoCoordinate parseCoordinate(const QJsonArray &coordinateArray)
QPlaceSupplier parseSupplier(const QJsonObject &supplierObject, const QPlaceManagerEngineNokiaV2 *engine)
QPlaceContent parseReview(const QJsonObject &reviewObject, const QPlaceManagerEngineNokiaV2 *engine)
QPlaceCategory parseCategory(const QJsonObject &categoryObject, const QPlaceManagerEngineNokiaV2 *engine)
void parseCollection(QPlaceContent::Type type, const QJsonObject &object, QPlaceContent::Collection *collection, int *totalCount, QPlaceContentRequest *previous, QPlaceContentRequest *next, const QPlaceManagerEngineNokiaV2 *engine)
QPlaceContent parseImage(const QJsonObject &imageObject, const QPlaceManagerEngineNokiaV2 *engine)
QPlaceContent parseEditorial(const QJsonObject &editorialObject, const QPlaceManagerEngineNokiaV2 *engine)
Combined button and popup list for selecting options.
QMap< QString, PlaceCategoryNode > QPlaceCategoryTree