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