QPointerEvent Class
ポインタイベントの基底クラス。詳細...
| ヘッダー: | #include <QPointerEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 以下、 | Qt 6.0 |
| 継承元: | QInputEvent |
| 継承元: |
パブリック関数
| bool | addPassiveGrabber(const QEventPoint &point, QObject *grabber) |
| bool | allPointsAccepted() const |
| bool | allPointsGrabbed() const |
| void | clearPassiveGrabbers(const QEventPoint &point) |
| QObject * | exclusiveGrabber(const QEventPoint &point) const |
| QList<QPointer<QObject>> | passiveGrabbers(const QEventPoint &point) const |
| QEventPoint & | point(qsizetype i) |
| QEventPoint * | pointById(int id) |
| qsizetype | pointCount() const |
| QPointingDevice::PointerType | pointerType() const |
| const QPointingDevice * | pointingDevice() const |
| const QList<QEventPoint> & | points() const |
| bool | removePassiveGrabber(const QEventPoint &point, QObject *grabber) |
| void | setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber) |
再実装されたパブリック関数
| virtual void | setAccepted(bool accepted) override |
プロテクトされた関数
| QPointerEvent(QPointerEvent &&) | |
| QPointerEvent & | operator=(QPointerEvent &&) |
| QPointerEvent & | operator=(const QPointerEvent &other) |
メンバ関数のドキュメント
[protected delete] QPointerEvent::QPointerEvent(QPointerEvent &&)
QPointerEvent のインスタンスをMoveコンストラクタで生成します。この関数は削除されています。
bool QPointerEvent::addPassiveGrabber(const QEventPoint &point, QObject *grabber)
指定されたgrabber が、今後発生するすべての更新イベントおよび、指定されたpoint を含むリリースイベントを受信するように、配信ロジックに通知します。これらのイベントが他にどこへ配信されるかには関係ありません。
これは、Qt Quick の入力ハンドラでのみ使用されます。
grabber がすでに追加されている場合はfalse を返し、それ以外の場合はtrue を返します。
bool QPointerEvent::allPointsAccepted() const
points() のすべての点について、isPointAccepted() がtrue の場合、true を返し、それ以外の場合はfalse を返す。
bool QPointerEvent::allPointsGrabbed() const
points() 内のすべての点について、exclusiveGrabber() が存在するか、あるいは 1 つ以上のpassiveGrabbers() が存在する場合、true を返します。
void QPointerEvent::clearPassiveGrabbers(const QEventPoint &point)
指定されたpoint から、すべてのパッシブグラバーを削除します。
これは、Qt Quick の入力ハンドラでのみ使用されます。
QPointerEvent::addPassiveGrabber()も参照してください 。
QObject *QPointerEvent::exclusiveGrabber(const QEventPoint &point) const
指定されたpoint を含む、今後のすべての更新イベントおよびリリースイベントを受信するように設定されたオブジェクトを返します。
現時点では、主にQt Quick 内での使用を想定しています。
setExclusiveGrabber()も参照してください 。
QList<QPointer<QObject>> QPointerEvent::passiveGrabbers(const QEventPoint &point) const
指定されたpoint を含む、今後のすべての更新イベントおよびリリースイベントの受信をリクエストされたオブジェクトのリストを返します。
これは、Qt Quick の入力ハンドラでのみ使用されます。
QPointerEvent::addPassiveGrabber()も参照してください 。
QEventPoint &QPointerEvent::point(qsizetype i)
インデックスi にある点に対する `QEventPoint ` 参照を返します。
QEventPoint *QPointerEvent::pointById(int id)
id が指定されたid と一致する点を返します。該当する点が見つからない場合は、nullptr を返します。
qsizetype QPointerEvent::pointCount() const
このポインタイベントに含まれるポイントの数を返します。
QPointingDevice::PointerType QPointerEvent::pointerType() const
イベントを発生させたポイントの型を返します。
const QPointingDevice *QPointerEvent::pointingDevice() const
このイベントの発生元となったソースデバイスを返します。
これはQInputEvent::device()と同じですが、利便性を考慮して型変換されています。
const QList<QEventPoint> &QPointerEvent::points() const
このポインタイベントに含まれるポイントのリストを返します。
bool QPointerEvent::removePassiveGrabber(const QEventPoint &point, QObject *grabber)
指定されたpoint に対して、以前に追加されていたパッシブなgrabber を削除します。以前にパッシブな として追加されていた場合はtrue を返し、そうでない場合はfalse を返します。
これは、Qt Quick の入力ハンドラでのみ使用されます。
QPointerEvent::addPassiveGrabber()も参照してください 。
[override virtual] void QPointerEvent::setAccepted(bool accepted)
void QPointerEvent::setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber)
指定されたexclusiveGrabber が、今後のすべての更新イベントおよび指定されたpoint を含むリリースイベントを受信すること、また他のアイテムへの配信はスキップしてもよいことを、配信ロジックに通知します。
現時点では、主にQt Quick での使用を想定しています。
exclusiveGrabber()も参照してください 。
[protected delete] QPointerEvent &QPointerEvent::operator=(QPointerEvent &&)
other をこのQPointerEvent インスタンスに割り当てます。この関数は削除されます。
[noexcept protected default] QPointerEvent &QPointerEvent::operator=(const QPointerEvent &other)
other をこのQPointerEvent のインスタンスにコピーして代入します。
© 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.