QPlaceContentRequestclass represents the parameters of a content request. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
clear
()
def
contentContext
()
def
contentType
()
def
limit
()
def
placeId
()
def
setContentContext
(context)
def
setContentType
(type)
def
setLimit
(limit)
def
setPlaceId
(identifier)
QPlaceContentRequestclass is used in conjunction with aQPlaceManagerto retrieve rich content like images and reviews in a paginated fashion. The following code would request a set of 5 images from the 10th index:QPlaceContentRequest request; request.setContentType(QPlaceContent::ImageType); request.setPlaceId(place.placeId()); request.setLimit(5); QPlaceContentReply *contentReply = manager->getPlaceContent(request); //..connect signals..// ... ... void contentHandler() { if (contentReply->error() == QPlaceReply::NoError) { place.insertContent(contentReply->request().contentType(), contentReply->content()); } }另请参阅
QPlaceContentRequest
¶
QPlaceContentRequest(other)
- param other
Constructs a new request object.
构造副本为
other
.
PySide2.QtLocation.QPlaceContentRequest.
clear
(
)
¶
Clears the content request.
PySide2.QtLocation.QPlaceContentRequest.
contentContext
(
)
¶
object
Returns backend specific additional content context associated with this place content request.
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
contentType
(
)
¶
Type
Returns the type of content to be requested, for example reviews or images
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
limit
(
)
¶
int
Returns the maximum number of content items to retrieve.
A negative value for limit means that it is undefined. It is left up to the backend provider to choose an appropriate number of items to return.
The default limit is -1.
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
__ne__
(
other
)
¶
other
–
QPlaceContentRequest
bool
返回 true 若
other
is not equal to this content request, otherwise returns false.
PySide2.QtLocation.QPlaceContentRequest.
__eq__
(
other
)
¶
other
–
QPlaceContentRequest
bool
返回 true 若
other
is equal to this content request, otherwise returns false.
PySide2.QtLocation.QPlaceContentRequest.
placeId
(
)
¶
unicode
Returns the identifier of the place content is to be fetched for.
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
setContentContext
(
context
)
¶
context – object
Sets the content context to
context
.
注意
This method is intended to be used by geo service plugins when returning place content results.
The content context is used by backends to store additional content context related to the content request. Other relevant fields should also be filled in. For example, if the content request is for image content the content type should also be set with
setContentType()
. The content context allows additional context to be kept which is not directly accessible via the Qt Location API.
The content context can be of any type storable in a
QVariant
. The value of the content context is not intended to be used directly by applications.
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
setContentType
(
type
)
¶
type
–
Type
设置
type
of content to be requested.
另请参阅
PySide2.QtLocation.QPlaceContentRequest.
setLimit
(
limit
)
¶
limit
–
int
Set the maximum number of content items to retrieve to
limit
.
另请参阅