QPlaceContentRequest Class
QPlaceContentRequest 클래스는 콘텐츠 요청의 매개변수를 나타냅니다. 더 보기...
| Header: | #include <QPlaceContentRequest> |
| qmake: | QT += location |
공개 함수
| QPlaceContentRequest() | |
| QPlaceContentRequest(const QPlaceContentRequest &other) | |
| QPlaceContentRequest(QPlaceContentRequest &&other) | |
| ~QPlaceContentRequest() | |
| void | clear() |
| QVariant | contentContext() const |
| QPlaceContent::Type | contentType() const |
| int | limit() const |
| QString | placeId() const |
| void | setContentContext(const QVariant &context) |
| void | setContentType(QPlaceContent::Type type) |
| void | setLimit(int limit) |
| void | setPlaceId(const QString &identifier) |
| QPlaceContentRequest & | operator=(const QPlaceContentRequest &other) |
관련 비멤버
| bool | operator!=(const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs) |
| bool | operator==(const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs) |
상세 설명
QPlaceContentRequest 클래스는 QPlaceManager 와 함께 사용되어 이미지나 리뷰와 같은 리치 콘텐츠를 페이지 단위로 가져옵니다. 다음 코드는 10번째 인덱스부터 5개의 이미지 세트를 요청합니다.
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());
}
}QPlaceContentReply도 참조하십시오 .
멤버 함수 문서
QPlaceContentRequest::QPlaceContentRequest()
새로운 요청 객체를 생성합니다.
[noexcept] QPlaceContentRequest::QPlaceContentRequest(const QPlaceContentRequest &other)
other 의 복사본을 생성합니다.
[constexpr noexcept default] QPlaceContentRequest::QPlaceContentRequest(QPlaceContentRequest &&other)
QPlaceContentRequest 의 인스턴스를 move-construct로 생성합니다.
[noexcept] QPlaceContentRequest::~QPlaceContentRequest()
요청 객체를 삭제합니다.
void QPlaceContentRequest::clear()
콘텐츠 요청을 취소합니다.
QVariant QPlaceContentRequest::contentContext() const
이 장소 콘텐츠 요청과 관련된 백엔드별 추가 콘텐츠 컨텍스트를 반환합니다.
setContentContext()도 참조하십시오 .
QPlaceContent::Type QPlaceContentRequest::contentType() const
요청할 콘텐츠의 유형(예: 리뷰 또는 이미지)을 반환합니다.
setContentType()도 참조하십시오 .
int QPlaceContentRequest::limit() const
검색할 콘텐츠 항목의 최대 개수를 반환합니다.
limit에 음수 값을 지정하면 정의되지 않은 것으로 간주됩니다. 반환할 항목의 적절한 개수는 백엔드 제공자가 결정합니다.
기본 limit 값은 -1입니다.
setLimit()도 참조하십시오 .
QString QPlaceContentRequest::placeId() const
콘텐츠를 가져올 위치의 식별자를 반환합니다.
setPlaceId()도 참조하십시오 .
void QPlaceContentRequest::setContentContext(const QVariant &context)
콘텐츠 컨텍스트를 context 로 설정합니다.
참고: 이 메서드는 지리 서비스 플러그인이 장소 콘텐츠 결과를 반환할 때 사용하도록 의도되었습니다.
콘텐츠 컨텍스트는 백엔드에서 콘텐츠 요청과 관련된 추가 정보를 저장하는 데 사용됩니다. 기타 관련 필드도 함께 채워야 합니다. 예를 들어, 콘텐츠 요청이 이미지 콘텐츠인 경우 콘텐츠 유형도 setContentType()로 설정해야 합니다. 콘텐츠 컨텍스트를 사용하면 Qt Location API를 통해 직접 액세스할 수 없는 추가 정보를 보관할 수 있습니다.
콘텐츠 컨텍스트는 QVariant 에 저장 가능한 모든 유형일 수 있습니다. 콘텐츠 컨텍스트의 값은 애플리케이션에서 직접 사용하기 위한 것이 아닙니다.
contentContext()도 참조하십시오 .
void QPlaceContentRequest::setContentType(QPlaceContent::Type type)
요청할 콘텐츠의 type 를 설정합니다.
contentType()도 참조하십시오 .
void QPlaceContentRequest::setLimit(int limit)
limit 로 가져올 콘텐츠 항목의 최대 개수를 설정합니다.
limit()도 참조하십시오 .
void QPlaceContentRequest::setPlaceId(const QString &identifier)
콘텐츠를 가져올 위치의 식별자를 identifier 로 설정합니다.
placeId()도 참조하십시오 .
[noexcept] QPlaceContentRequest &QPlaceContentRequest::operator=(const QPlaceContentRequest &other)
이 콘텐츠 요청에 ‘ other ’을 할당하고, 이 콘텐츠 요청에 대한 참조를 반환합니다.
관련 비회원
[noexcept] bool operator!=(const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs)
lhs 가 rhs 과 같지 않으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
[noexcept] bool operator==(const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs)
lhs 가 rhs 와 같으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.