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.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
7
8#include <QtCore/QLocale>
9#include <QtCore/QMap>
10#include <QtCore/QMetaType>
11#include <QtCore/QUrl>
12#include <QtCore/QVariant>
13
14#include "qplace.h"
15#include "qplacecategory.h"
16#include "qplaceicon.h"
17
19
51 QObject *parent)
52: QObject(parent), d_ptr(new QPlaceManagerEnginePrivate)
53{
54 qRegisterMetaType<QPlaceReply::Error>();
55 qRegisterMetaType<QPlaceReply *>();
56 Q_UNUSED(parameters);
57}
58
66
76void QPlaceManagerEngine::setManagerName(const QString &managerName)
77{
78 d_ptr->managerName = managerName;
79}
80
89{
90 return d_ptr->managerName;
91}
92
100void QPlaceManagerEngine::setManagerVersion(int managerVersion)
101{
103}
104
112{
113 return d_ptr->managerVersion;
114}
115
120{
121 Q_UNUSED(placeId);
122
123 return new QPlaceDetailsReplyUnsupported(this);
124}
125
135
146
157
162{
163 Q_UNUSED(place);
164
165 return new QPlaceIdReplyUnsupported(QStringLiteral("Save place is not supported"),
167}
168
173{
174 Q_UNUSED(placeId);
175
176 return new QPlaceIdReplyUnsupported(QStringLiteral("Remove place is not supported"),
178}
179
185 const QString &parentId)
186{
188 Q_UNUSED(parentId);
189
190 return new QPlaceIdReplyUnsupported(QStringLiteral("Save category is not supported"),
192}
193
199{
200 Q_UNUSED(categoryId);
201
202 return new QPlaceIdReplyUnsupported(QStringLiteral("Remove category is not supported"),
204}
205
210{
211 return new QPlaceReplyUnsupported(QStringLiteral("Categories are not supported."), this);
212}
213
218{
219 Q_UNUSED(categoryId);
220
221 return QString();
222}
223
229{
230 Q_UNUSED(categoryId);
231
232 return QStringList();
233}
234
239{
240 Q_UNUSED(categoryId);
241
242 return QPlaceCategory();
243}
244
249QList<QPlaceCategory> QPlaceManagerEngine::childCategories(const QString &parentId) const
250{
251 Q_UNUSED(parentId);
252
253 return QList<QPlaceCategory>();
254}
255
268QList<QLocale> QPlaceManagerEngine::locales() const
269{
270 return QList<QLocale>();
271}
272
276void QPlaceManagerEngine::setLocales(const QList<QLocale> &locales)
277{
279}
280
285{
286 return d_ptr->manager;
287}
288
298{
299 Q_UNUSED(original);
300 return QPlace();
301}
302
313
321{
322 Q_UNUSED(icon);
323 Q_UNUSED(size);
324
325 return QUrl();
326}
327
\inmodule QtCore
Definition qobject.h:103
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
Definition qplaceicon.h:23
\inmodule QtLocation
virtual QPlaceIdReply * removeCategory(const QString &categoryId)
Removes the category corresponding to categoryId from the manager engine's datastore.
virtual QPlaceIdReply * saveCategory(const QPlaceCategory &category, const QString &parentId)
Saves a category that is a child of the category specified by parentId.
QPlaceManager * manager() const
Returns the manager instance used to create this engine.
virtual QPlaceSearchReply * search(const QPlaceSearchRequest &request)
Searches for places according to the parameters specified in request.
virtual QPlaceIdReply * savePlace(const QPlace &place)
Saves a specified place to the manager engine's datastore.
virtual QPlaceSearchSuggestionReply * searchSuggestions(const QPlaceSearchRequest &request)
Requests a set of search term suggestions according to the parameters specified in request.
virtual QPlaceDetailsReply * getPlaceDetails(const QString &placeId)
Retrieves details of place corresponding to the given placeId.
virtual QPlaceReply * initializeCategories()
Initializes the categories of the manager engine.
QString managerName() const
Returns the name which this engine implementation uses to distinguish itself from the implementations...
int managerVersion() const
Returns the version of this engine implementation.
virtual QList< QLocale > locales() const
Returns a list of preferred locales.
virtual void setLocales(const QList< QLocale > &locales)
Set the list of preferred locales.
virtual QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size) const
QUrl QPlaceManagerEngine::constructIconUrl(const QPlaceIcon &icon, const QSize &size)
virtual QStringList childCategoryIds(const QString &categoryId) const
Returns the child category identifiers of the category corresponding to categoryId.
virtual QPlaceContentReply * getPlaceContent(const QPlaceContentRequest &request)
Retrieves content for a place according to the parameters specified in request.
virtual QPlaceMatchReply * matchingPlaces(const QPlaceMatchRequest &request)
Returns a reply which contains a list of places which correspond/match those specified in request.
virtual QList< QPlaceCategory > childCategories(const QString &parentId) const
Returns a list of categories that are children of the category corresponding to parentId.
virtual QPlace compatiblePlace(const QPlace &original) const
Returns a pruned or modified version of the original place which is suitable to be saved by the manag...
virtual QPlaceIdReply * removePlace(const QString &placeId)
Removes the place corresponding to placeId from the manager engine's datastore.
QPlaceManagerEngine(const QVariantMap &parameters, QObject *parent=nullptr)
Constructs a new engine with the specified parent, using parameters to pass any implementation specif...
virtual QPlaceCategory category(const QString &categoryId) const
Returns the category corresponding to the given categoryId.
virtual ~QPlaceManagerEngine()
Destroys this engine.
virtual QString parentCategoryId(const QString &categoryId) const
Returns the parent category identifier of the category corresponding to categoryId.
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
Definition qplacereply.h:15
\inmodule QtLocation
\inmodule QtLocation
\inmodule QtLocation
Definition qplace.h:25
\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.
QList< QString > QStringList
Constructs a string list that contains the given string, str.
GLenum GLuint GLintptr GLsizeiptr size
[1]
#define QStringLiteral(str)
#define Q_UNUSED(x)
QNetworkRequest request(url)