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