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
qplacesearchreply.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
// Qt-Security score:significant reason:default
4
5
#
include
<
QtLocation
/
QPlaceSearchRequest
>
6
#
include
<
QtLocation
/
QPlaceSearchReply
>
7
#
include
<
QtLocation
/
QPlaceProposedSearchResult
>
8
#
include
<
QtLocation
/
private
/
qplacereply_p
.
h
>
9
10
QT_BEGIN_NAMESPACE
11
12
class
QPlaceSearchReplyPrivate :
public
QPlaceReplyPrivate
13
{
14
public
:
15
QList<QPlaceSearchResult> results;
16
QPlaceSearchRequest searchRequest;
17
QPlaceSearchRequest previousPageRequest;
18
QPlaceSearchRequest nextPageRequest;
19
};
20
21
/*!
22
\class QPlaceSearchReply
23
\inmodule QtLocation
24
\ingroup QtLocation-places
25
\ingroup QtLocation-places-replies
26
\since 5.6
27
28
\brief The QPlaceSearchReply class manages a place search operation started by an
29
instance of QPlaceManager.
30
31
See \l {Discovery/Search} for an example on how to use a search reply.
32
\sa QPlaceSearchRequest, QPlaceManager
33
*/
34
35
/*!
36
Constructs a search reply with a given \a parent.
37
*/
38
QPlaceSearchReply::QPlaceSearchReply(QObject *parent)
39
: QPlaceReply(
new
QPlaceSearchReplyPrivate, parent)
40
{
41
}
42
43
/*!
44
Destroys the search reply.
45
*/
46
QPlaceSearchReply::~QPlaceSearchReply()
47
{
48
}
49
50
/*!
51
Returns the type of reply.
52
*/
53
QPlaceReply::Type QPlaceSearchReply::type()
const
54
{
55
return
QPlaceReply::SearchReply;
56
}
57
58
/*!
59
Returns a list of search results;
60
*/
61
QList<QPlaceSearchResult> QPlaceSearchReply::results()
const
62
{
63
Q_D(
const
QPlaceSearchReply);
64
return
d->results;
65
}
66
67
/*!
68
Sets the list of search \a results.
69
*/
70
void
QPlaceSearchReply::setResults(
const
QList<QPlaceSearchResult> &results)
71
{
72
Q_D(QPlaceSearchReply);
73
d->results = results;
74
}
75
76
/*!
77
Returns the search request that was used to generate this reply.
78
*/
79
QPlaceSearchRequest QPlaceSearchReply::request()
const
80
{
81
Q_D(
const
QPlaceSearchReply);
82
return
d->searchRequest;
83
}
84
85
/*!
86
Returns a place search request which can be used to request the previous page of search
87
results. An empty place search request is returned if there is no previous page of results.
88
89
\sa nextPageRequest(), setPreviousPageRequest()
90
*/
91
QPlaceSearchRequest QPlaceSearchReply::previousPageRequest()
const
92
{
93
Q_D(
const
QPlaceSearchReply);
94
return
d->previousPageRequest;
95
}
96
97
/*!
98
Returns a place search request which can be used to request the next page of search results. An
99
empty place search request is returned if there is no next page of results.
100
101
\sa previousPageRequest(), setNextPageRequest()
102
*/
103
QPlaceSearchRequest QPlaceSearchReply::nextPageRequest()
const
104
{
105
Q_D(
const
QPlaceSearchReply);
106
return
d->nextPageRequest;
107
}
108
109
/*!
110
Sets the search \a request used to generate this reply.
111
*/
112
void
QPlaceSearchReply::setRequest(
const
QPlaceSearchRequest &request)
113
{
114
Q_D(QPlaceSearchReply);
115
d->searchRequest = request;
116
}
117
118
/*!
119
Sets the previous page of search results request to \a previous.
120
121
\sa previousPageRequest()
122
*/
123
void
QPlaceSearchReply::setPreviousPageRequest(
const
QPlaceSearchRequest &previous)
124
{
125
Q_D(QPlaceSearchReply);
126
d->previousPageRequest = previous;
127
}
128
129
/*!
130
Sets the next page of search results request to \a next.
131
132
\sa nextPageRequest()
133
*/
134
void
QPlaceSearchReply::setNextPageRequest(
const
QPlaceSearchRequest &next)
135
{
136
Q_D(QPlaceSearchReply);
137
d->nextPageRequest = next;
138
}
139
140
QT_END_NAMESPACE
qtlocation
src
location
places
qplacesearchreply.cpp
Generated on
for Qt by
1.16.1