QPlaceAttribute Class
QPlaceAttributeクラスは、場所に関する一般的な属性情報を表します。詳細...
Header: | #include <QPlaceAttribute> |
qmake: | QT += location |
プロパティ
パブリック関数
QPlaceAttribute() | |
QPlaceAttribute(const 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> のような形式の属性タイプのクラスがあります。この属性のクラスは、指定されたプロバイダーから見た場所の代替識別子のセットです。
上記の型は、QPlace :
- QPlace::extendedAttribute()
- QPlace::setExtendedAttribute()
- QPlace::removeExtendedAttribute()
- QPlace::removeExtendedAttribute()
属性型は文字列型なので、プロバイダは必要に応じて新しい属性を導入することができます。独自の属性型は、衝突を避けるために、常に修飾子を先頭に付けるべきです。
ユーザー可読属性と非ユーザー可読属性
属性の中には、エンドユーザーが読むことを意図していないものもあります。そのような属性のラベルフィールドは、この事実を示すために空です。
属性文書
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 のコピーを作成する。
[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 と等しくなければ真を返し、そうでなければ偽を返す。
[noexcept]
bool operator==(const QPlaceAttribute &lhs, const QPlaceAttribute &rhs)
lhs がrhs と等しければ真を返し、そうでなければ偽を返す。
© 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.