このページでは

QPlaceAttribute Class

QPlaceAttribute クラスは、場所に関する一般的な属性情報を表します。詳細...

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

プロパティ

パブリック関数

QPlaceAttribute()
QPlaceAttribute(const QPlaceAttribute &other)
QPlaceAttribute(QPlaceAttribute &&other)
~QPlaceAttribute()
bool isEmpty() const
QString label() const
void setLabel(const QString &label)
void setText(const QString &text)
QString text() const
QPlaceAttribute &operator=(const QPlaceAttribute &other)

静的パブリックメンバー

const QString OpeningHours
const QString Payment
const QString Provider
bool operator!=(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs)
bool operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs)

詳細な説明

QPlaceAttribute インスタンスは、QPlace クラスを通じて通常は公開されない、場所に関する追加情報を格納します。QPlaceAttribute は、その属性を説明するローカライズされたラベルと、属性の値を表すリッチテキスト文字列をカプセル化しています。一般的に、これらはいずれもそのままエンドユーザーに表示されることを意図しています。

プラグインによっては、属性をまったくサポートしていないものもあれば、特定のセットのみをサポートするもの、時間の経過とともに動的に変化する属性セットをサポートするもの、さらにはクライアントアプリケーションによる任意の属性定義を許可するものもあります。また、属性は場所ごとに異なる場合もあります。例えば、ある場所には営業時間がある一方で、別の場所にはそれがないといった具合です。 詳細については、プラグインのリファレンスを参照してください。

属性の種類

QPlaceAttribute クラスは、標準的な属性タイプを特徴づけるいくつかの定数文字列を定義しています。

x_id_<provider> という形式の属性タイプ(例: x_id_here)のクラスがあります。このクラスの属性は、指定されたプロバイダの観点から見た、その場所の代替識別子のセットです。

上記のタイプは、QPlace 内の属性へのアクセスおよび変更に、以下を通じて使用されます。

属性型は文字列型であるため、プロバイダーは必要に応じて新しい属性を導入することができます。競合を避けるため、カスタム属性型には常に修飾子をプレフィックスとして付ける必要があります。

ユーザーが読み取れる属性と読み取れない属性

一部の属性は、エンドユーザーによる閲覧を意図していない場合があります。そのような属性のlabelフィールドは、この事実を示すために空になっています。

プロパティのドキュメント

label : QString

このプロパティには、その属性を説明するローカライズされたラベルが格納されています。

アクセス関数:

QString label() const
void setLabel(const QString &label)

text : QString

このプロパティには、属性値を表すリッチテキストが格納されています。

アクセス関数:

QString text() const
void setText(const QString &text)

メンバー関数のドキュメント

QPlaceAttribute::QPlaceAttribute()

属性を作成します。

[noexcept] QPlaceAttribute::QPlaceAttribute(const QPlaceAttribute &other)

other のコピーを作成します。

[constexpr noexcept default] QPlaceAttribute::QPlaceAttribute(QPlaceAttribute &&other)

QPlaceAttribute のインスタンスをMoveコンストラクタで生成します。

[noexcept] QPlaceAttribute::~QPlaceAttribute()

その属性を削除します。

bool QPlaceAttribute::isEmpty() const

place 属性のすべてのフィールドが空であるかどうかを示すブール値を返します。

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

この属性にother を割り当て、この属性への参照を返します。

メンバ変数のドキュメント

const QString QPlaceAttribute::OpeningHours

営業時間指定します。

const QString QPlaceAttribute::Payment

支払い方法を定義する属性を指定するための定数。

const QString QPlaceAttribute::Provider

その場所がどのプロバイダーに由来するかを定義する属性を指定するための定数。

関連する非会員

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

lhs がrhs と等しくない場合はtrueを返し、そうでない場合はfalseを返します。

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

lhs がrhs と等しい場合は 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.