QPointingDeviceUniqueId Class
QPointingDeviceUniqueId は、ポインティングデバイスとともに使用される、タグ付きトークンやスタイラスなど、一意のオブジェクトを識別します。詳細...
| ヘッダー: | #include <QPointingDeviceUniqueId> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- 継承されたメンバーを含む、すべてのメンバーの一覧
- QPointingDeviceUniqueId は、イベントクラスに属しています。
プロパティ
- numericId : const qint64
パブリック関数
| QPointingDeviceUniqueId() | |
| bool | isValid() const |
| qint64 | numericId() const |
静的パブリックメンバー
| QPointingDeviceUniqueId | fromNumericId(qint64 id) |
関連する非メンバー
| size_t | qHash(QPointingDeviceUniqueId key, size_t seed = 0) |
| bool | operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) |
| bool | operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs) |
詳細な説明
QPointingDeviceUniqueIds は等価比較が可能であり、QHash のキーとして使用できます。デバイスがそのような ID をサポートしている場合、numericId() を通じて数値 ID にアクセスできます。ただし、将来の拡張に備えて、その関数を使用せず、等価演算子を使用してこの型のオブジェクトを比較するようにしてください。
このクラスは、整数IDをラップした薄いラッパーです。関数への引数として、また関数からの戻り値として、値渡しで渡します。
QEventPointも参照してください 。
プロパティのドキュメント
[read-only] numericId : const qint64
このプロパティには、タッチポイントによって表されるトークンの一意の数値 ID が格納されます
デバイスが数値 ID を提供している場合、isValid() は true を返し、このプロパティは数値 ID を返します。そうでない場合は -1 を返します。
ポータブルなコードでは、このプロパティの値を使用せず、代わりに等価性チェックを利用してポインタを識別する必要があります。
アクセス関数:
| qint64 | numericId() const |
isValid()も参照してください 。
メンバ関数のドキュメント
[constexpr noexcept] QPointingDeviceUniqueId::QPointingDeviceUniqueId()
無効な一意のポインタIDを生成します。
[static] QPointingDeviceUniqueId QPointingDeviceUniqueId::fromNumericId(qint64 id)
数値ID「id 」から一意のポインタIDを生成します。
[constexpr noexcept] bool QPointingDeviceUniqueId::isValid() const
この一意のポインタ ID が有効であるか、つまり実際のポインタを表しているかどうかを返します。
関連する非メンバー関数
[noexcept] size_t qHash(QPointingDeviceUniqueId key, size_t seed = 0)
`key` のハッシュ値を返します。計算のシードには `seed ` を使用します。
[noexcept] bool operator!=(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
2つの固有のポインタID「lhs 」と「rhs 」が、異なるポインタ(true )を指しているか、そうでないか(false )を返します。
[noexcept] bool operator==(QPointingDeviceUniqueId lhs, QPointingDeviceUniqueId rhs)
2つの一意なポインタID「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.