QPlaceContent Class
QPlaceContent 클래스는 장소에 대한 내용을 담고 있습니다. 더 보기...
| Header: | #include <QPlaceContent> |
| qmake: | QT += location |
공개 유형
| Collection | |
| enum | DataTag { ContentSupplier, ContentUser, ContentAttribution, ImageId, ImageUrl, …, CustomDataTag } |
| enum | Type { NoType, ImageType, ReviewType, EditorialType, CustomType } |
공개 함수
| QPlaceContent(QPlaceContent::Type type = NoType) | |
| QPlaceContent(const QPlaceContent &other) | |
| QPlaceContent(QPlaceContent &&other) | |
| ~QPlaceContent() | |
| QList<QPlaceContent::DataTag> | dataTags() const |
| void | setValue(QPlaceContent::DataTag tag, const QVariant &value) |
| QPlaceContent::Type | type() const |
| QVariant | value(QPlaceContent::DataTag tag) const |
| bool | operator!=(const QPlaceContent &other) const |
| QPlaceContent & | operator=(const QPlaceContent &other) |
| bool | operator==(const QPlaceContent &other) const |
상세 설명
QPlaceContent는 이미지, 리뷰, 사설과 같은 풍부한 콘텐츠는 물론, 콘텐츠의 사용자나 제공자와 같은 콘텐츠에 대한 속성도 보관합니다. 콘텐츠 객체는 여러 데이터를 포함할 수 있습니다. 예를 들어, 리뷰를 포함하는 항목에는 일반적으로 해당 리뷰를 작성한 사용자가 포함됩니다. ` type()`를 사용하여 QPlaceContent 객체가 나타내는 콘텐츠의 유형을 확인하고, ` dataTags()`를 사용하여 어떤 데이터가 포함되어 있는지 확인하십시오. ` value()`를 사용하여 개별 데이터를 ` QVariant`로 가져오십시오.
참고: 일부 제공자는 콘텐츠가 표시될 때마다 사용자에게 출처 정보를 표시하도록 요구할 수 있습니다.
장소의 리치 콘텐츠는 일반적으로 페이지 단위로 제공됩니다.
현재 QPlaceContent 클래스는 타사에서 확장할 수 없습니다.
참고: Places API는 콘텐츠 객체를 '조회 전용' 객체로 간주합니다. 제공자에게 콘텐츠를 제출하는 것은 지원되지 않는 사용 사례입니다.
멤버 유형 문서
QPlaceContent::Collection
QMap<int, QPlaceContent>의 동의어입니다. 맵의 키는 콘텐츠의 인덱스를 나타내는 int 이며, 값은 콘텐츠 객체 자체입니다.
Collection 은 페이지로 불러온 콘텐츠 항목을 저장할 수 있는 컨테이너로 설계되었습니다. 이를 통해 개발자는 페이지를 건너뛸 수 있습니다. 예를 들어, 인덱스 0~9가 컬렉션에 저장되어 있는 경우, 사용자가 인덱스 80~99로 건너뛰면 이 항목들도 컬렉션에 저장될 수 있습니다.
enum QPlaceContent::DataTag
콘텐츠 객체의 값 입력을 정의합니다
| 상수 | 값 | 설명 |
|---|---|---|
QPlaceContent::ContentSupplier | 0 | 이 콘텐츠를 제공한 공급자 |
QPlaceContent::ContentUser | 1 | 이 콘텐츠를 제공한 사용자 |
QPlaceContent::ContentAttribution | 2 | 리치 텍스트 형식의 출처 정보 문자열을 반환합니다 참고: 일부 제공업체는 특정 콘텐츠 항목이 표시될 때마다 해당 항목의 출처 정보를 항상 표시하도록 요구할 수 있습니다. |
QPlaceContent::ImageId | 3 | 이미지의 식별자 |
QPlaceContent::ImageUrl | 4 | 이미지의 URL |
QPlaceContent::ImageMimeType | 5 | 이미지의 MIME 유형 |
QPlaceContent::EditorialTitle | 6 | 기사 제목 |
QPlaceContent::EditorialText | 7 | 장소에 대한 텍스트 설명. 제공자에 따라 텍스트는 리치 텍스트(HTML 기반)이거나 일반 텍스트일 수 있습니다. |
QPlaceContent::EditorialLanguage | 8 | 기사의 언어. 일반적으로 2글자 ISO 639-1 형식의 언어 코드입니다. |
QPlaceContent::ReviewId | 9 | 리뷰의 식별자 |
QPlaceContent::ReviewDateTime | 10 | 리뷰가 제출된 날짜 및 시간 |
QPlaceContent::ReviewTitle | 11 | 리뷰의 제목 |
QPlaceContent::ReviewText | 12 | 리뷰 본문. 제공자에 따라 텍스트는 리치 텍스트(HTML 기반)이거나 일반 텍스트일 수 있습니다. |
QPlaceContent::ReviewLanguage | 13 | 리뷰의 언어. 일반적으로 2글자 ISO 639-1 형식의 언어 코드입니다. |
QPlaceContent::ReviewRating | 14 | 이 리뷰에서 해당 장소에 부여한 평점 |
QPlaceContent::CustomDataTag | 1000 |
enum QPlaceContent::Type
콘텐츠의 유형을 정의합니다.
| 상수 | 값 | 설명 |
|---|---|---|
QPlaceContent::NoType | 0 | 콘텐츠 객체는 기본 생성되며, 이 콘텐츠 객체에는 다른 모든 콘텐츠 유형을 할당할 수 있습니다. |
QPlaceContent::ImageType | 1 | 콘텐츠 객체는 이미지입니다. |
QPlaceContent::ReviewType | 2 | 콘텐츠 객체는 리뷰입니다 |
QPlaceContent::EditorialType | 3 | 콘텐츠 객체는 편집물입니다 |
QPlaceContent::CustomType | 0x0100 | 콘텐츠 객체는 사용자 정의 유형입니다. |
멤버 함수 문서
QPlaceContent::QPlaceContent(QPlaceContent::Type type = NoType)
type 용 콘텐츠 객체를 생성합니다.
[noexcept] QPlaceContent::QPlaceContent(const QPlaceContent &other)
other 의 새 복사본을 생성합니다.
[constexpr noexcept default] QPlaceContent::QPlaceContent(QPlaceContent &&other)
QPlaceContent 의 인스턴스를 생성합니다.
[noexcept] QPlaceContent::~QPlaceContent()
콘텐츠 객체를 삭제합니다.
QList<QPlaceContent::DataTag> QPlaceContent::dataTags() const
이 콘텐츠 객체에 값이 저장된 데이터 태그의 목록을 반환합니다.
void QPlaceContent::setValue(QPlaceContent::DataTag tag, const QVariant &value)
tag 데이터에 저장된 값을 value 로 설정합니다.
value()도 참조하십시오 .
QPlaceContent::Type QPlaceContent::type() const
콘텐츠 유형을 반환합니다.
QVariant QPlaceContent::value(QPlaceContent::DataTag tag) const
tag 에 저장된 값을 반환하며, 해당 태그에 대한 데이터가 없는 경우 무효한 QVariant 를 반환합니다.
setValue()도 참조하십시오 .
bool QPlaceContent::operator!=(const QPlaceContent &other) const
이 콘텐츠 객체가 ` other`과 동일하지 않으면 true를 반환하고, 그렇지 않으면 false를 반환합니다.
[noexcept] QPlaceContent &QPlaceContent::operator=(const QPlaceContent &other)
other 콘텐츠 객체를 이 객체에 할당하고, 이 콘텐츠 객체에 대한 참조를 반환합니다.
bool QPlaceContent::operator==(const QPlaceContent &other) const
이 콘텐츠 객체가 other 과 동일하면 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.