QTabletEvent Class Reference |
Constant | Value | Description |
---|---|---|
QTabletEvent::UnknownPointer | 0 | An unknown device. |
QTabletEvent::Pen | 1 | Tip end of a stylus-like device (the narrow end of the pen). |
QTabletEvent::Cursor | 2 | Any puck-like device. |
QTabletEvent::Eraser | 3 | Eraser end of a stylus-like device (the broad end of the pen). |
See also pointerType().
This enum defines what type of device is generating the event.
Constant | Value | Description |
---|---|---|
QTabletEvent::NoDevice | 0 | No device, or an unknown device. |
QTabletEvent::Puck | 1 | A Puck (a device that is similar to a flat mouse with a transparent circle with cross-hairs). |
QTabletEvent::Stylus | 2 | A Stylus. |
QTabletEvent::Airbrush | 3 | An airbrush |
QTabletEvent::FourDMouse | 4 | A 4D Mouse. |
QTabletEvent::RotationStylus | 6 | A special stylus that also knows about rotation (a 6D stylus). |
This enum was introduced in Qt 4.1.
Construct a tablet event of the given type.
The pos parameter indicates where the event occurred in the widget; globalPos is the corresponding position in absolute coordinates. The hiResGlobalPos contains a high resolution measurement of the position.
pressure contains the pressure exerted on the device.
pointerType describes the type of pen that is being used.
xTilt and yTilt contain the device's degree of tilt from the x and y axes respectively.
keyState specifies which keyboard modifiers are pressed (e.g., Ctrl).
The uniqueID parameter contains the unique ID for the current device.
The z parameter contains the coordinate of the device on the tablet, this is usually given by a wheel on 4D mouse. If the device does not support a Z-axis, pass zero here.
The tangentialPressure paramater contins the tangential pressure of an air brush. If the device does not support tangential pressure, pass 0 here.
rotation contains the device's rotation in degrees. 4D mice support rotation. If the device does not support rotation, pass 0 here.
See also pos(), globalPos(), device(), pressure(), xTilt(), yTilt(), uniqueId(), rotation(), tangentialPressure(), and z().
Returns the type of device that generated the event.
This is useful if you want to know which end of a pen was used to draw on the tablet.
See also TabletDevice.
Returns the global position of the device at the time of the event. This is important on asynchronous windows systems like X11; whenever you move your widgets around in response to mouse events, globalPos() can differ significantly from the current position QCursor::pos().
See also globalX(), globalY(), and hiResGlobalPos().
Returns the global x position of the mouse pointer at the time of the event.
See also globalY(), globalPos(), and hiResGlobalX().
Returns the global y position of the tablet device at the time of the event.
See also globalX(), globalPos(), and hiResGlobalY().
The high precision coordinates delivered from the tablet expressed. Sub pixeling information is in the fractional part of the QPointF.
See also globalPos(), hiResGlobalX(), and hiResGlobalY().
The high precision x position of the tablet device.
The high precision y position of the tablet device.
Returns the type of point that generated the event.
Returns the position of the device, relative to the widget that received the event.
If you move widgets around in response to mouse events, use globalPos() instead of this function.
See also x(), y(), and globalPos().
Returns the pressure for the device. 0.0 indicates that the stylus is not on the tablet, 1.0 indicates the maximum amount of pressure for the stylus.
See also tangentialPressure().
Returns the rotation of the current device in degress. This is usually given by a 4D Mouse. If the device doesn't support rotation this value is always 0.0.
Returns the tangential pressure for the device. This is typically given by a finger wheel on an airbrush tool. The range is from -1.0 to 1.0. 0.0 indicates a neutral position. Current airbrushes can only move in the positive direction from the neutrual position. If the device does not support tangential pressure, this value is always 0.0.
See also pressure().
Returns a unique ID for the current device, making it possible to differentiate between multiple devices being used at the same time on the tablet.
Values for the same device may vary from OS to OS.
It is possible to generate a unique ID for any Wacom device.
Returns the x position of the device, relative to the widget that received the event.
Returns the angle between the device (a pen, for example) and the perpendicular in the direction of the x axis. Positive values are towards the tablet's physical right. The angle is in the range -60 to +60 degrees.
See also yTilt().
Returns the y position of the device, relative to the widget that received the event.
Returns the angle between the device (a pen, for example) and the perpendicular in the direction of the y axis. Positive values are towards the bottom of the tablet. The angle is within the range -60 to +60 degrees.
See also xTilt().
Returns the z position of the device. Typically this is represented by a wheel on a 4D Mouse. If the device does not support a Z-axis, this value is always zero. This is <em>not</em> the same as pressure.
See also pressure().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.1 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com