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