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::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 と等価でない場合は 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.