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
qplacematchreply.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
"qplacematchreply.h"
6
#
include
"qplacereply_p.h"
7
#
include
"qplace.h"
8
#
include
"qplacematchrequest.h"
9
10
11
QT_BEGIN_NAMESPACE
12
class
QPlaceMatchReplyPrivate
:
public
QPlaceReplyPrivate
13
{
14
public
:
15
QList
<
QPlace
>
places
;
16
QPlaceMatchRequest
request
;
17
};
18
19
QT_END_NAMESPACE
20
21
QT_USE_NAMESPACE
22
23
/*!
24
\class QPlaceMatchReply
25
\inmodule QtLocation
26
\ingroup QtLocation-places
27
\ingroup QtLocation-places-replies
28
\since 5.6
29
30
\brief The QPlaceMatchReply class manages a place matching operation started by an
31
instance of QPlaceManager.
32
33
If the operation is successful, the number of places in the reply matches those
34
in the request. If a particular place in the request is not found, a default
35
constructed place is used as a place holder in the reply. In this way, there
36
is always a one is to one relationship between input places in the request,
37
and output places in the reply.
38
39
If the operation is not successful the number of places is always zero.
40
41
See \l {Matching places between managers} for an example on how to use
42
a match reply.
43
44
\sa QPlaceMatchRequest, QPlaceManager
45
*/
46
47
/*!
48
Constructs a match reply with a given \a parent.
49
*/
50
QPlaceMatchReply::QPlaceMatchReply(QObject *parent)
51
: QPlaceReply(
new
QPlaceMatchReplyPrivate, parent)
52
{
53
}
54
55
/*!
56
Destroys the match reply.
57
*/
58
QPlaceMatchReply::~QPlaceMatchReply()
59
{
60
}
61
62
/*!
63
Returns the type of reply.
64
*/
65
QPlaceReply::Type QPlaceMatchReply::type()
const
66
{
67
return
QPlaceReply::MatchReply;
68
}
69
70
/*!
71
Returns a list of matching places;
72
*/
73
QList<QPlace> QPlaceMatchReply::places()
const
74
{
75
Q_D(
const
QPlaceMatchReply);
76
return
d->places;
77
}
78
79
/*!
80
Sets the list of matching \a places.
81
*/
82
void
QPlaceMatchReply::setPlaces(
const
QList<QPlace> &places)
83
{
84
Q_D(QPlaceMatchReply);
85
d->places = places;
86
}
87
88
/*!
89
Returns the match request that was used to generate this reply.
90
*/
91
QPlaceMatchRequest QPlaceMatchReply::request()
const
92
{
93
Q_D(
const
QPlaceMatchReply);
94
return
d->request;
95
}
96
97
/*!
98
Sets the match \a request used to generate this reply.
99
*/
100
void
QPlaceMatchReply::setRequest(
const
QPlaceMatchRequest &request)
101
{
102
Q_D(QPlaceMatchReply);
103
d->request = request;
104
}
QPlaceMatchReplyPrivate
Definition
qplacematchreply.cpp:13
QPlaceMatchReplyPrivate::request
QPlaceMatchRequest request
Definition
qplacematchreply.cpp:16
QPlaceMatchReplyPrivate::places
QList< QPlace > places
Definition
qplacematchreply.cpp:15
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtlocation
src
location
places
qplacematchreply.cpp
Generated on
for Qt by
1.16.1