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
qplacemanager.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 QPLACEMANAGER_H
5#define QPLACEMANAGER_H
6
7#include <QtLocation/QPlaceReply>
8
9#include <QtCore/QList>
10#include <QtCore/QString>
11#include <QtCore/QObject>
12
13QT_BEGIN_NAMESPACE
14
15class QLocale;
16class QPlace;
17class QPlaceCategory;
18class QPlaceContentReply;
19class QPlaceContentRequest;
20class QPlaceDetailsReply;
21class QPlaceIcon;
22class QPlaceIdReply;
23class QPlaceManagerEngine;
24class QPlaceMatchReply;
25class QPlaceMatchRequest;
26class QPlaceSearchRequest;
27class QPlaceSearchReply;
28class QPlaceSearchResult;
29class QPlaceSearchSuggestionReply;
30
31class Q_LOCATION_EXPORT QPlaceManager : public QObject
32{
33 Q_OBJECT
34public:
35 ~QPlaceManager();
36
37 QString managerName() const;
38 int managerVersion() const;
39
40 QPlaceDetailsReply *getPlaceDetails(const QString &placeId) const;
41
42 QPlaceContentReply *getPlaceContent(const QPlaceContentRequest &request) const;
43
44 QPlaceSearchReply *search(const QPlaceSearchRequest &query) const;
45
46 QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &request) const;
47
48 QPlaceIdReply *savePlace(const QPlace &place);
49 QPlaceIdReply *removePlace(const QString &placeId);
50
51 QPlaceIdReply *saveCategory(const QPlaceCategory &category, const QString &parentId = QString());
52 QPlaceIdReply *removeCategory(const QString &categoryId);
53
54 QPlaceReply *initializeCategories();
55 QString parentCategoryId(const QString &categoryId) const;
56 QStringList childCategoryIds(const QString &parentId = QString()) const;
57
58 QPlaceCategory category(const QString &categoryId) const;
59 QList<QPlaceCategory> childCategories(const QString &parentId = QString()) const;
60
61 QList<QLocale> locales() const;
62 void setLocale(const QLocale &locale);
63 void setLocales(const QList<QLocale> &locale);
64
65 QPlace compatiblePlace(const QPlace &place) const;
66
67 QPlaceMatchReply *matchingPlaces(const QPlaceMatchRequest &request) const;
68
69Q_SIGNALS:
70 void finished(QPlaceReply *reply);
71 void errorOccurred(QPlaceReply *, QPlaceReply::Error error,
72 const QString &errorString = QString());
73
74 void placeAdded(const QString &placeId);
75 void placeUpdated(const QString &placeId);
76 void placeRemoved(const QString &placeId);
77
78 void categoryAdded(const QPlaceCategory &category, const QString &parentId);
79 void categoryUpdated(const QPlaceCategory &category, const QString &parentId);
80 void categoryRemoved(const QString &categoryId, const QString &parentId);
81 void dataChanged();
82
83private:
84 explicit QPlaceManager(QPlaceManagerEngine *engine, QObject *parent = nullptr);
85 Q_DISABLE_COPY(QPlaceManager)
86
87 QPlaceManagerEngine *d;
88
89 friend class QGeoServiceProvider;
90 friend class QGeoServiceProviderPrivate;
91 friend class QPlaceIcon;
92};
93
94QT_END_NAMESPACE
95
96#endif // QPLACEMANAGER_H
\inmodule QtLocation
Combined button and popup list for selecting options.