このページでは

PointerDevice QML Type

QPointingDevice に相当するQML。詳細...

Import Statement: import QtQuick
In C++: QPointingDevice

プロパティ

信号

  • grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)

詳細説明

PointerDevice はQPointingDevice クラスの QML 名です。QPointingDevice と同じプロパティと列挙型を持ちます。

プロパティの説明

buttonCount : int [read-only]

このプロパティは、検出可能なデバイス上のボタンの最大数を示す。

deviceType : enumeration

このプロパティは、PointerEvent を生成したデバイスのタイプを示す。

有効な値は

定数説明
PointerDevice.Unknownデバイスを識別できない。
PointerDevice.Mouseマウス。
PointerDevice.TouchScreenタッチスクリーン。
PointerDevice.TouchPadタッチパッドまたはトラックパッド。
PointerDevice.Stylusグラフィックタブレット上のスタイラス。
PointerDevice.Airbrushグラフィックタブレット上のエアブラシ。
PointerDevice.Puckグラフィックスタブレット上の十字線付きデジタイザ。

QInputDevice::DeviceType およびPointerDeviceHandler::acceptedDevicesも参照

maximumPoints : int [read-only]

このプロパティは、同時に検出可能なタッチポイント(指)の最大数を示す。

pointerType : enumeration [read-only]

このプロパティは、何がPointerDevice と相互作用しているかを示す。

このプロパティとdeviceType の間には冗長性がある。例えば、タッチスクリーンを使用する場合、deviceTypeTouchScreen であり、pointerTypeFinger です。しかし、グラフィック・タブレットでは、スタイラスの両端が使用されることがよくあり、プログラムはそれらを区別する必要があります。PointerDeviceHandler::acceptedDevicesPointerDeviceHandler::acceptedPointerTypes を組み合わせて使用することで、特定のハンドラが反応すべきイベントのサブセットをフィルタリングすることができます。

有効な値は次のとおりです:

定数説明
PointerDevice.Unknownデバイスを識別できない。
PointerDevice.Genericマウスまたはマウスをエミュレートするデバイス。
PointerDevice.Fingerタッチスクリーン上の指。
PointerDevice.Penグラフィックタブレット上のスタイラス。
PointerDevice.Eraserグラフィックタブレット上の消しゴム。
PointerDevice.Cursorグラフィックス・タブレット上の十字線付きデジタイザ。

QPointingDevice::PointerType およびPointerDeviceHandler::acceptedPointerTypesも参照

uniqueId : pointingDeviceUniqueId [read-only]

このプロパティは、利用可能であれば、デバイスの固有 ID を提供することができる。例えば、グラフィックタブレットのスタイラスデバイスには固有のシリアル番号があります。

eventPoint およびQEventPoint::uniqueId()も参照してください

シグナルのドキュメント

grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)

このシグナルは、event の配信中に、grabber オブジェクトがpoint の排他的または受動的なグラブを得たり失ったりしたときに発行される。transition は、Item または入力ハンドラのいずれかであるgrabber オブジェクトの視点から、何が起こったかを伝える。

transition

定数説明
PointerDevice.GrabExclusivegrabber は、point を処理するための主要な責任を取った。
PointerDevice.UngrabExclusivegrabber は、以前の排他的なグラブを放棄した。
PointerDevice.CancelGrabExclusivegrabber の排他的グラブが引き継がれたか、キャンセルされた。
PointerDevice.GrabPassivegrabber は、point を監視するために、パッシブグラブを獲得した。
PointerDevice.UngrabPassivegrabber は以前のパッシブグラブを放棄した。
PointerDevice.CancelGrabPassive前のパッシブグラブが異常終了した。

注: あるオブジェクトから別のオブジェクトへのグラブ遷移は、あるオブジェクトがグラブを失ったことを通知するシグナルと、別のグラブがあることを通知するシグナルの2つが発生する。それ以外の場合、グラブでない状態への遷移やグラブでない状態からの遷移では、シグナルは1つしか発せられません。

注: 対応するハンドラはonGrabChanged です。

QPointerEvent::setExclusiveGrabber(),QPointerEvent::addPassiveGrabber(),QPointerEvent::removePassiveGrabber(),PointerHandler::grabChanged()も参照のこと

© 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.