Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QTabletEvent class contains parameters that describe a Tablet event. More...
Public Types | |
enum | PointerType { Cursor = 2, Eraser = 3, Pen = 1, UnknownPointer = 0 } |
More... | |
enum | TabletDevice { Airbrush = 3, FourDMouse = 4, NoDevice = 0, Puck = 1, RotationStylus = 6, Stylus = 2, XFreeEraser = 5 } |
More... | |
Public Member Functions | |
QTabletEvent (QTabletEvent copy) | |
| |
QTabletEvent (QEvent.Type t, QPoint pos, QPoint globalPos, QPointF hiResGlobalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, Qt.KeyboardModifier keyState, long uniqueID) | |
| |
override void | CreateProxy () |
new QTabletEvent.TabletDevice | Device () |
| |
new QPoint | GlobalPos () |
| |
new int | GlobalX () |
| |
new int | GlobalY () |
| |
new QPointF | HiResGlobalPos () |
| |
new double | HiResGlobalX () |
| |
new double | HiResGlobalY () |
| |
new QTabletEvent.PointerType | pointerType () |
| |
new QPoint | Pos () |
| |
new double | Pressure () |
| |
new double | Rotation () |
| |
new double | TangentialPressure () |
| |
new long | UniqueId () |
| |
new int | X () |
| |
new int | xTilt () |
| |
new int | Y () |
| |
new int | yTilt () |
| |
new int | Z () |
| |
new void | Dispose () |
Public Member Functions inherited from QtGui.QInputEvent | |
QInputEvent (QInputEvent copy) | |
QInputEvent (QEvent.Type type, Qt.KeyboardModifier modifiers=Qt.KeyboardModifier.NoModifier) | |
new void | Dispose () |
Public Member Functions inherited from QtCore.QEvent | |
QEvent (QEvent copy) | |
| |
QEvent (QEvent.Type type) | |
| |
new void | Accept () |
| |
new void | Ignore () |
| |
new bool | IsAccepted () |
new void | SetAccepted (bool accepted) |
new bool | Spontaneous () |
| |
new QEvent.Type | type () |
| |
new void | Dispose () |
Protected Member Functions | |
QTabletEvent (System.Type dummy) | |
Protected Member Functions inherited from QtGui.QInputEvent | |
QInputEvent (System.Type dummy) | |
Protected Member Functions inherited from QtCore.QEvent | |
QEvent (System.Type dummy) | |
Properties | |
new int | MDev [get, set] |
new QPoint | MGPos [get, set] |
new QPointF | MHiResGlobalPos [get, set] |
new int | MPointerType [get, set] |
new QPoint | MPos [get, set] |
new double | MPress [get, set] |
new double | MRot [get, set] |
new double | MTangential [get, set] |
new long | MUnique [get, set] |
new int | MXT [get, set] |
new int | MYT [get, set] |
new int | MZ [get, set] |
Properties inherited from QtGui.QInputEvent | |
new Qt.KeyboardModifier | Modifiers [get, set] |
| |
new Qt.KeyboardModifier | ModState [get, set] |
Properties inherited from QtCore.QEvent | |
virtual System.IntPtr | SmokeObject [get, set] |
new ushort | T [get, set] |
static new QMetaObject | StaticMetaObject [get] |
Additional Inherited Members | |
Static Public Member Functions inherited from QtCore.QEvent | |
static int | RegisterEventType (int hint=-1) |
| |
Protected Attributes inherited from QtCore.QEvent | |
SmokeInvocation | interceptor |
The QTabletEvent class contains parameters that describe a Tablet event.
Tablet Events are generated from a Wacom 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, you would retrieve the cursor 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 do subpixeling with higher resolution coordinates or you may want to adjust color brightness based on pressure. QTabletEvent allows you to read the pressure(), the xTilt(), and yTilt(), as well as the type of device being used with device() (see TabletDevice). It can also give you the minimum and maximum values for each device's pressure and high resolution coordinates.
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 exception are TabletEnterProximity and TabletLeaveProximity events, these are only sent to QApplication and don't check whether or not they are accepted.
The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handler QWidget::tabletEvent() receives all three types of tablet events. Qt will first send a tabletEvent then, if it is not accepted, it will send a mouse event. This allows applications that don't utilize tablets to use a tablet like a mouse, while also enabling those who want to use both tablets and mouses differently.
Notes for X11 Users
Qt uses the following hard-coded names to identify tablet devices from the xorg.conf file on X11 (apart from IRIX): 'stylus', 'pen', and 'eraser'. If the devices have other names, they will not be picked up Qt.
This enum defines what type of point is generating the event.
See also pointerType().
This enum defines what type of device is generating the event.
This enum was introduced or modified in Qt 4.1.
|
protected |
QtGui.QTabletEvent.QTabletEvent | ( | QTabletEvent | copy | ) |
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 parameter 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().
QtGui.QTabletEvent.QTabletEvent | ( | QEvent.Type | t, |
QPoint | pos, | ||
QPoint | globalPos, | ||
QPointF | hiResGlobalPos, | ||
int | device, | ||
int | pointerType, | ||
double | pressure, | ||
int | xTilt, | ||
int | yTilt, | ||
double | tangentialPressure, | ||
double | rotation, | ||
int | z, | ||
Qt.KeyboardModifier | keyState, | ||
long | uniqueID | ||
) |
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 parameter 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().
|
virtual |
Reimplemented from QtGui.QInputEvent.
new QTabletEvent.TabletDevice QtGui.QTabletEvent.Device | ( | ) |
Returns the type of device that generated the event.
See also TabletDevice.
new void QtGui.QTabletEvent.Dispose | ( | ) |
new QPoint QtGui.QTabletEvent.GlobalPos | ( | ) |
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().
new int QtGui.QTabletEvent.GlobalX | ( | ) |
Returns the global x position of the mouse pointer at the time of the event.
See also globalY(), globalPos(), and hiResGlobalX().
new int QtGui.QTabletEvent.GlobalY | ( | ) |
Returns the global y position of the tablet device at the time of the event.
See also globalX(), globalPos(), and hiResGlobalY().
new QPointF QtGui.QTabletEvent.HiResGlobalPos | ( | ) |
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().
new double QtGui.QTabletEvent.HiResGlobalX | ( | ) |
The high precision x position of the tablet device.
new double QtGui.QTabletEvent.HiResGlobalY | ( | ) |
The high precision y position of the tablet device.
new QTabletEvent.PointerType QtGui.QTabletEvent.pointerType | ( | ) |
Returns the type of point that generated the event.
new QPoint QtGui.QTabletEvent.Pos | ( | ) |
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().
new double QtGui.QTabletEvent.Pressure | ( | ) |
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().
new double QtGui.QTabletEvent.Rotation | ( | ) |
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.
new double QtGui.QTabletEvent.TangentialPressure | ( | ) |
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().
new long QtGui.QTabletEvent.UniqueId | ( | ) |
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.
Support of this feature is dependent on the tablet.
Values for the same device may vary from OS to OS.
Later versions of the Wacom driver for Linux will now report the ID information. If you have a tablet that supports unique ID and are not getting the information on Linux, consider upgrading your driver.
As of Qt 4.2, the unique ID is the same regardless of the orientation of the pen. Earlier versions would report a different value when using the eraser-end versus the pen-end of the stylus on some OS's.
See also pointerType().
new int QtGui.QTabletEvent.X | ( | ) |
Returns the x position of the device, relative to the widget that received the event.
See also y() and pos().
new int QtGui.QTabletEvent.xTilt | ( | ) |
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().
new int QtGui.QTabletEvent.Y | ( | ) |
Returns the y position of the device, relative to the widget that received the event.
See also x() and pos().
new int QtGui.QTabletEvent.yTilt | ( | ) |
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().
new int QtGui.QTabletEvent.Z | ( | ) |
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 not the same as pressure.
See also pressure().
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |