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
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
16class QNetworkReply;
20class QGeoUriProvider;
21
28
29typedef QMap<QString, PlaceCategoryNode> QPlaceCategoryTree;
30
32{
34
35public:
37 const QVariantMap &parameters,
39 QString *errorString);
41
42 QPlaceDetailsReply *getPlaceDetails(const QString &placeId) override;
43
45
47
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
94
95#endif // QPLACEMANAGERENGINE_NOKIAV2_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
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
Definition qplaceicon.h:23
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.
QPlaceManagerEngineNokiaV2(QGeoNetworkAccessManager *networkManager, const QVariantMap &parameters, QGeoServiceProvider::Error *error, QString *errorString)
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.
\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
Definition qsize.h:25
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLenum * categories
GLenum query
QMap< QString, PlaceCategoryNode > QPlaceCategoryTree
#define Q_OBJECT
#define Q_SLOTS
QUrl url("example.com")
[constructor-url-reference]
QNetworkRequest request(url)