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
qplacecontentreply.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
"qplacecontentreply.h"
6
#
include
"qplacereply_p.h"
7
8
#
include
<
QtLocation
/
QPlaceContentRequest
>
9
10
QT_BEGIN_NAMESPACE
11
class
QPlaceContentReplyPrivate
:
public
QPlaceReplyPrivate
12
{
13
public
:
14
QPlaceContent
::
Collection
contentCollection
;
15
int
totalCount
= 0;
16
QPlaceContentRequest
contentRequest
;
17
QPlaceContentRequest
previousPageRequest
;
18
QPlaceContentRequest
nextPageRequest
;
19
};
20
21
QT_END_NAMESPACE
22
23
QT_USE_NAMESPACE
24
25
/*!
26
\class QPlaceContentReply
27
\inmodule QtLocation
28
\ingroup QtLocation-places
29
\ingroup QtLocation-places-replies
30
\since 5.6
31
32
\brief The QPlaceContentReply class manages a content retrieval operation started by an
33
instance of QPlaceManager.
34
35
See \l {Fetching Rich Content} for an example on how to use a content reply.
36
\sa QPlaceContentRequest, QPlaceManager
37
*/
38
39
/*!
40
Constructs a content reply with a given \a parent.
41
*/
42
QPlaceContentReply::QPlaceContentReply(QObject *parent)
43
: QPlaceReply(
new
QPlaceContentReplyPrivate, parent)
44
{
45
}
46
47
/*!
48
Destroys the reply.
49
*/
50
QPlaceContentReply::~QPlaceContentReply()
51
{
52
}
53
54
/*!
55
Returns the collection of content retrieved.
56
*/
57
QPlaceContent::Collection QPlaceContentReply::content()
const
58
{
59
Q_D(
const
QPlaceContentReply);
60
return
d->contentCollection;
61
}
62
63
/*!
64
Returns the type of reply.
65
*/
66
QPlaceReply::Type QPlaceContentReply::type()
const
67
{
68
return
QPlaceReply::ContentReply;
69
}
70
71
/*!
72
Sets the \a content of the reply.
73
*/
74
void
QPlaceContentReply::setContent(
const
QPlaceContent::Collection &content)
75
{
76
Q_D(QPlaceContentReply);
77
d->contentCollection = content;
78
}
79
80
/*!
81
Returns the total number of content objects for a place. If the total number of
82
content objects cannot be counted, a value of -1 is returned. This count only
83
refers to the total count for a single content type, that is, the content type that
84
was specified when content was requested with the QPlaceManager.
85
*/
86
int
QPlaceContentReply::totalCount()
const
87
{
88
Q_D(
const
QPlaceContentReply);
89
return
d->totalCount;
90
}
91
92
/*!
93
Sets the \a total number of content objects for a place.
94
*/
95
void
QPlaceContentReply::setTotalCount(
int
total)
96
{
97
Q_D(QPlaceContentReply);
98
d->totalCount = total;
99
}
100
101
/*!
102
Returns the content request that was used to generate this reply.
103
*/
104
QPlaceContentRequest QPlaceContentReply::request()
const
105
{
106
Q_D(
const
QPlaceContentReply);
107
return
d->contentRequest;
108
}
109
110
/*!
111
Returns a place content request that can be used to request the previous batch of place content
112
results.
113
*/
114
QPlaceContentRequest QPlaceContentReply::previousPageRequest()
const
115
{
116
Q_D(
const
QPlaceContentReply);
117
return
d->previousPageRequest;
118
}
119
120
/*!
121
Returns a place content request that can be used to request the next batch of place content
122
results.
123
*/
124
QPlaceContentRequest QPlaceContentReply::nextPageRequest()
const
125
{
126
Q_D(
const
QPlaceContentReply);
127
return
d->nextPageRequest;
128
}
129
130
/*!
131
Sets the content \a request used to generate this this reply.
132
*/
133
void
QPlaceContentReply::setRequest(
const
QPlaceContentRequest &request)
134
{
135
Q_D(QPlaceContentReply);
136
d->contentRequest = request;
137
}
138
139
/*!
140
Sets the place content request that can be used to request the previous batch of place content
141
results to \a previous.
142
*/
143
void
QPlaceContentReply::setPreviousPageRequest(
const
QPlaceContentRequest &previous)
144
{
145
Q_D(QPlaceContentReply);
146
d->previousPageRequest = previous;
147
}
148
149
/*!
150
Sets the place content request that can be used to request the next batch of place content
151
results to \a next.
152
*/
153
void
QPlaceContentReply::setNextPageRequest(
const
QPlaceContentRequest &next)
154
{
155
Q_D(QPlaceContentReply);
156
d->nextPageRequest = next;
157
}
QPlaceContentReplyPrivate
Definition
qplacecontentreply.cpp:12
QPlaceContentReplyPrivate::contentCollection
QPlaceContent::Collection contentCollection
Definition
qplacecontentreply.cpp:14
QPlaceContentReplyPrivate::contentRequest
QPlaceContentRequest contentRequest
Definition
qplacecontentreply.cpp:16
QPlaceContentReplyPrivate::nextPageRequest
QPlaceContentRequest nextPageRequest
Definition
qplacecontentreply.cpp:18
QPlaceContentReplyPrivate::totalCount
int totalCount
Definition
qplacecontentreply.cpp:15
QPlaceContentReplyPrivate::previousPageRequest
QPlaceContentRequest previousPageRequest
Definition
qplacecontentreply.cpp:17
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
qtlocation
src
location
places
qplacecontentreply.cpp
Generated on
for Qt by
1.16.1