Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QTabletEvent class contains parameters that describe a Tablet event. More...
#include <qevent.h>
Inherits QEvent.
Tablet Events are generated from a Wacom(c) tablet. Most of the time you will want to deal with events from the tablet as if they were events from a mouse, for example retrieving the position with x(), y(), pos(), globalX(), globalY() and globalPos(). In some situations you may wish to retrieve the extra information provided by the tablet device driver, for example, you might want to adjust color brightness based on pressure. QTabletEvent allows you to get the pressure(), the xTilt() and yTilt(), as well as the type of device being used with device() (see TabletDevice).
A tablet event contains a special accept flag that indicates whether the receiver wants the event. You should call QTabletEvent::accept() if you handle the tablet event; otherwise it will be sent to the parent widget.
The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handler QWidget::tabletEvent() receives tablet events.
See also Event Classes.
This enum defines what type of device is generating the event.
Constructs a tablet event object.
The globalPos() is initialized to QCursor::pos(), i.e. pos, which is usually (but not always) correct. Use the other constructor if you need to specify the global position explicitly. device contains the device type, pressure contains the pressure exerted on the device, xTilt and yTilt contain the device's degrees of tilt from the X and Y axis respectively. The uId contains an event id.
See also pos(), device(), pressure(), xTilt() and yTilt().
Constructs a tablet event object. The position when the event occurred is is given in pos and globalPos. device contains the device type, pressure contains the pressure exerted on the device, xTilt and yTilt contain the device's degrees of tilt from the X and Y axis respectively. The uId contains an event id.
On Irix, globalPos will contain the high-resolution coordinates received from the tablet device driver, instead of from the windowing system.
See also pos(), globalPos(), device(), pressure(), xTilt() and yTilt().
Setting the accept flag indicates that the receiver of the event wants the tablet event. Unwanted tablet events are sent to the parent widget.
The accept flag is set by default.
See also ignore().
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() and globalY().
See also globalY() and globalPos().
See also globalX() and globalPos().
Clearing the accept flag indicates that the event receiver does not want the tablet event. Unwanted tablet events are sent to the parent widget.
The accept flag is set by default.
See also accept().
If you move widgets around in response to mouse events, use globalPos() instead of this function.
See also x(), y() and globalPos().
Returns a unique id for the current device. It is possible to generate a unique id for any Wacom device. This is helpful to differentiate multiple devices being used at the same time on the tablet. The first member contains a value for the type, the second member contains a physical id obtained from the device. Together these values are unique. Note: for different platforms, the first value is different due to different driver implementations.
See also yTilt().
See also xTilt().
This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.
Copyright © 2002 Trolltech | Trademarks | Qt version 3.0.3
|