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

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


deviceType : enumeration

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

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

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

QInputDevice::DeviceType およびPointerDeviceHandler::acceptedDevicesも参照してください


maximumPoints : int

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


pointerType : enumeration

このプロパティは、PointerDevice と相互作用するものを示します。

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

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

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

QPointingDevice::PointerType およびPointerDeviceHandler::acceptedPointerTypesも参照してください


このプロパティは、利用可能であれば、デバイスの一意の 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()も参照のこと


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