PointerDevice QML Type
Equivalente en QML para QPointingDevice. Más...
| Import Statement: | import QtQuick |
| In C++: | QPointingDevice |
Propiedades
- buttonCount : int
- deviceType : enumeration
- maximumPoints : int
- pointerType : enumeration
- uniqueId : pointingDeviceUniqueId
Señales
- grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)
Descripción detallada
PointerDevice es el nombre en QML de la clase « QPointingDevice ». Tiene las mismas propiedades y enumeraciones que « QPointingDevice ».
Documentación de propiedades
buttonCount : int [read-only]
Esta propiedad indica el número máximo de botones del dispositivo que se pueden detectar.
deviceType : enumeration
Esta propiedad indica el tipo de dispositivo que generó un « PointerEvent ».
Los valores válidos son:
| Constante | Descripción |
|---|---|
PointerDevice.Unknown | No se puede identificar el dispositivo. |
PointerDevice.Mouse | Un ratón. |
PointerDevice.TouchScreen | Una pantalla táctil. |
PointerDevice.TouchPad | Un panel táctil o trackpad. |
PointerDevice.Stylus | Un lápiz óptico en una tableta gráfica. |
PointerDevice.Airbrush | Un aerógrafo en una tableta gráfica. |
PointerDevice.Puck | Un digitalizador con retículo, en una tableta gráfica. |
Véase también QInputDevice::DeviceType y PointerDeviceHandler::acceptedDevices.
maximumPoints : int [read-only]
Esta propiedad indica el número máximo de puntos de contacto simultáneos (dedos) que se pueden detectar.
pointerType : enumeration [read-only]
Esta propiedad indica qué elemento interactúa con el « PointerDevice ».
Existe cierta redundancia entre esta propiedad y deviceType. Por ejemplo, si se utiliza una pantalla táctil, entonces deviceType es TouchScreen y pointerType es Finger. Sin embargo, en una tableta gráfica, a menudo es posible utilizar ambos extremos del lápiz óptico, y los programas deben distinguirlos. PointerDeviceHandler::acceptedDevices y PointerDeviceHandler::acceptedPointerTypes pueden utilizarse en combinación para filtrar el subconjunto de eventos a los que debe reaccionar un controlador concreto.
Los valores válidos son:
| Constante | Descripción |
|---|---|
PointerDevice.Unknown | No se puede identificar el dispositivo. |
PointerDevice.Generic | Un ratón o un dispositivo que emula un ratón. |
PointerDevice.Finger | Un dedo sobre una pantalla táctil. |
PointerDevice.Pen | Un lápiz óptico en una tableta gráfica. |
PointerDevice.Eraser | Un borrador en una tableta gráfica. |
PointerDevice.Cursor | Un digitalizador con retículo en una tableta gráfica. |
Véase también QPointingDevice::PointerType y PointerDeviceHandler::acceptedPointerTypes.
uniqueId : pointingDeviceUniqueId [read-only]
Esta propiedad puede proporcionar un identificador único para el dispositivo, si está disponible. Por ejemplo, el lápiz óptico de una tableta gráfica puede tener un número de serie único.
Véase también eventPoint y QEventPoint::uniqueId().
Documentación de Signal
grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)
Esta señal se emite cuando el objeto ` grabber ` obtiene o pierde un control exclusivo o pasivo sobre ` point ` durante la entrega de ` event`. El ` transition ` indica lo que ha ocurrido, desde la perspectiva del objeto ` grabber `, que puede ser un ` Item ` o un `Input Handler`.
Los valores válidos para « transition » son:
| Constante | Descripción |
|---|---|
PointerDevice.GrabExclusive | El « grabber » ha asumido la responsabilidad principal de gestionar el « point ». |
PointerDevice.UngrabExclusive | El « grabber » ha renunciado a su control exclusivo anterior. |
PointerDevice.CancelGrabExclusive | El control exclusivo de grabber ha sido asumido o cancelado. |
PointerDevice.GrabPassive | grabber ha adquirido un control pasivo para supervisar point. |
PointerDevice.UngrabPassive | grabber ha renunciado a su captura pasiva anterior. |
PointerDevice.CancelGrabPassive | La captura pasiva anterior ha finalizado de forma anómala. Nota: Una transición de captura de un objeto a otro da lugar a dos señales: una para notificar que un objeto ha perdido su captura y otra para notificar que hay otro capturador. En otros casos, al pasar a un estado sin captura o al salir de él, solo se emite una señal. |
Nota: El controlador correspondiente es onGrabChanged.
Véase también QPointerEvent::setExclusiveGrabber(), QPointerEvent::addPassiveGrabber(), QPointerEvent::removePassiveGrabber() y 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.