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は、画像、レビュー、社説のようなリッチコンテンツと、コンテンツのユーザーや供給者のようなコンテンツに関する属性を保持します。例えば、レビューを保持するアイテムは、一般的にレビューを書いたユーザを含みます。QPlaceContent オブジェクトが表すコンテンツのタイプを調べるにはtype() を使用し、どのデータが保持されているかを調べるにはdataTags() を使用します。QVariant として個々のデータを取得するには、value() を使用してください。

注:プロバイダによっては、コンテンツの一部が表示されるたびに、属性文字列をユーザーに表示することを要求する場合があります。

場所のリッチコンテンツは、一般的にページ分割されたアイテムとして利用可能です。

現在のところ、QPlaceContent クラスはサードパーティによって拡張可能ではありません。

注意: Places APIは、コンテンツオブジェクトを'retrieve-only'オブジェクトとみなします。プロバイダへのコンテンツの送信は、サポートされていないユースケースです。

メンバ型ドキュメント

QPlaceContent::Collection

QMap<int,QPlaceContent>の同義語。マップのキーは、コンテンツのインデックスを表すint 。値はコンテンツオブジェクトそのものである。

Collection は、ページとして取得されたコンテンツ・アイテムを格納できるコンテナであることを意図している。これにより、開発者はページをスキップすることができます。たとえば、インデックス0~9をコレクションに格納し、ユーザーがインデックス80~99にスキップした場合、これらもコレクションに格納することができます。

enum QPlaceContent::DataTag

コンテンツオブジェクトの値エントリを定義します。

定数説明
QPlaceContent::ContentSupplier0このコンテンツを投稿したサプライヤ
QPlaceContent::ContentUser1このコンテンツを投稿したユーザ
QPlaceContent::ContentAttribution2リッチテキスト属性文字列を返します。

注意: プロバイダによっては、コンテンツが表示されたときに、そのコンテンツの属性が常に表示されることを要求する場合があります。

定数説明
QPlaceContent::ImageId3画像の識別子
QPlaceContent::ImageUrl4画像の URL
QPlaceContent::ImageMimeType5画像のMIMEタイプ
QPlaceContent::EditorialTitle6論説のタイトル
QPlaceContent::EditorialText7場所のテキストによる説明。プロバイダによって、テキストはリッチテキスト(HTMLベース)またはプレーンテキストのいずれかになります。
QPlaceContent::EditorialLanguage8論説の言語。通常、これは2文字のISO 639-1フォーマットの言語コードになります。
QPlaceContent::ReviewId9レビューの識別子。
QPlaceContent::ReviewDateTime10レビューが投稿された日時
QPlaceContent::ReviewTitle11レビューのタイトル
QPlaceContent::ReviewText12レビューの本文。プロバイダによって、テキストはリッチテキスト(HTMLベース)またはプレーンテキストになります。
QPlaceContent::ReviewLanguage13レビューの言語。通常、これは2文字のISO 639-1フォーマットの言語コードになります。
QPlaceContent::ReviewRating14このレビューの評価
QPlaceContent::CustomDataTag1000

enum QPlaceContent::Type

コンテンツのタイプを定義します。

定数説明
QPlaceContent::NoType0コンテンツ・オブジェクトはデフォルトで構成され、他のコンテンツ・タイプはこのコンテンツ・オブジェクトに割り当てることができる。
QPlaceContent::ImageType1コンテンツ・オブジェクトは画像です。
QPlaceContent::ReviewType2コンテンツオブジェクトはレビューです
QPlaceContent::EditorialType3コンテンツオブジェクトは論説である
QPlaceContent::CustomType0x0100コンテンツオブジェクトがカスタムタイプである

メンバ関数ドキュメント

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 と等価でない場合は true を返し、そうでない場合は false を返す。

[noexcept] QPlaceContent &QPlaceContent::operator=(const QPlaceContent &other)

other コンテンツオブジェクトを this に代入し、このコンテンツオブジェクトへの参照を返します。

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.