QPlaceContentRequest Class

QPlaceContentRequest 클래스는 콘텐츠 요청의 매개 변수를 나타냅니다. 더 보기...

Header: #include <QPlaceContentRequest>
qmake: QT += location

공용 함수

QPlaceContentRequest()
QPlaceContentRequest(const 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 의 복사본을 생성합니다.

[noexcept] QPlaceContentRequest::~QPlaceContentRequest()

요청 객체를 삭제합니다.

void QPlaceContentRequest::clear()

콘텐츠 요청을 지웁니다.

QVariant QPlaceContentRequest::contentContext() const

이 장소 콘텐츠 요청과 관련된 백엔드 특정 추가 콘텐츠 컨텍스트를 반환합니다.

setContentContext()도 참조하세요 .

QPlaceContent::Type QPlaceContentRequest::contentType() const

요청할 콘텐츠 유형(예: 리뷰 또는 이미지)을 반환합니다.

setContentType()도 참조하세요 .

int QPlaceContentRequest::limit() const

검색할 콘텐츠 항목의 최대 개수를 반환합니다.

제한 값이 음수이면 정의되지 않은 값입니다. 반환할 적절한 항목 수를 선택하는 것은 백엔드 제공업체의 몫입니다.

기본 제한은 -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)

lhsrhs 과 같지 않으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.

[noexcept] bool operator==(const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs)

lhsrhs 과 같으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.

© 2025 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.