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() | |
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 클래스는 타사에서 확장할 수 없습니다.
참고: 장소 API는 콘텐츠 개체를 '검색 전용' 개체로 간주합니다. 제공업체에 콘텐츠를 제출하는 것은 지원되는 사용 사례가 아닙니다.
멤버 유형 문서
QPlaceContent::Collection
QMap<int, QPlaceContent>의 동의어입니다. 맵의 키는 콘텐츠의 인덱스를 나타내는 int
입니다. 값은 콘텐츠 객체 자체입니다.
Collection
은 페이지로 검색된 콘텐츠 항목을 저장할 수 있는 컨테이너로 사용됩니다. 이를 통해 개발자는 페이지를 건너뛸 수 있습니다. 예를 들어 인덱스 0-9는 컬렉션에 저장될 수 있으며, 사용자가 인덱스 80-99로 건너뛰면 이 인덱스도 컬렉션에 저장될 수 있습니다.
enum QPlaceContent::DataTag
콘텐츠 객체의 값 항목을 정의합니다.
Constant | 값 | 설명 |
---|---|---|
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 의 새 복사본을 생성합니다.
[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 와 같지 않으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.
[noexcept]
QPlaceContent &QPlaceContent::operator=(const QPlaceContent &other)
other 콘텐츠 객체를 여기에 할당하고 이 콘텐츠 객체에 대한 참조를 반환합니다.
bool QPlaceContent::operator==(const QPlaceContent &other) const
이 콘텐츠 객체가 other 와 같으면 참을 반환하고, 그렇지 않으면 거짓을 반환합니다.
© 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.