<class name="QTabletEvent" doc="/** <p>The <a href="QTabletEvent.html#QTabletEvent(com.trolltech.qt.core.QEvent.Type, com.trolltech.qt.core.QPoint, com.trolltech.qt.core.QPoint, com.trolltech.qt.core.QPointF, int, int, double, int, int, double, double, int, com.trolltech.qt.core.Qt.KeyboardModifiers, long)"><tt>QTabletEvent</tt></a> class contains parameters that describe a Tablet event.</p> <p>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 <a href="QTabletEvent.html#x()"><tt>x</tt></a>, <a href="QTabletEvent.html#y()"><tt>y</tt></a>, <a href="QTabletEvent.html#pos()"><tt>pos</tt></a>, <a href="QTabletEvent.html#globalX()"><tt>globalX</tt></a>, <a href="QTabletEvent.html#globalY()"><tt>globalY</tt></a>, and <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a>. 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. <a href="QTabletEvent.html#QTabletEvent(com.trolltech.qt.core.QEvent.Type, com.trolltech.qt.core.QPoint, com.trolltech.qt.core.QPoint, com.trolltech.qt.core.QPointF, int, int, double, int, int, double, double, int, com.trolltech.qt.core.Qt.KeyboardModifiers, long)"><tt>QTabletEvent</tt></a> allows you to read the <a href="QTabletEvent.html#pressure()"><tt>pressure</tt></a>, the <a href="QTabletEvent.html#xTilt()"><tt>xTilt</tt></a>, and <a href="QTabletEvent.html#yTilt()"><tt>yTilt</tt></a>, as well as the type of device being used with <a href="QTabletEvent.html#device()"><tt>device</tt></a> (see <a href="QTabletEvent.html#TabletDevice-enum"><tt>TabletDevice</tt></a>). It can also give you the minimum and maximum values for each device's pressure and high resolution coordinates.</p> <p>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 <a href="%2E%2E/core/%2E%2E/core/QEvent.html#Type-enum"><tt>TabletEnterProximity</tt></a> and <a href="%2E%2E/core/%2E%2E/core/QEvent.html#Type-enum"><tt>TabletLeaveProximity</tt></a> events, these are only sent to <a href="QApplication.html"><tt>QApplication</tt></a> and don't check whether or not they are accepted.</p> <p>The QWidget::setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.</p> <p>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.</p> <a name="notes-for-x11-users"></a> <h3>Notes for X11 Users</h3> <p>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.</p> */"> <method name="public QTabletEvent(com.trolltech.qt.core.QEvent.Type t, com.trolltech.qt.core.QPoint pos, com.trolltech.qt.core.QPoint globalPos, com.trolltech.qt.core.QPointF hiResGlobalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, com.trolltech.qt.core.Qt.KeyboardModifiers keyState, long uniqueID)" doc="/** <p>Construct a tablet event of the given <tt>t</tt>.</p> <p>The <tt>pos</tt> parameter indicates where the event occurred in the widget; <tt>globalPos</tt> is the corresponding position in absolute coordinates. The <tt>hiResGlobalPos</tt> contains a high resolution measurement of the position.</p> <p><tt>pressure</tt> contains the pressure exerted on the <tt>device</tt>.</p> <p><tt>pointerType</tt> describes the type of pen that is being used.</p> <p><tt>xTilt</tt> and <tt>yTilt</tt> contain the device's degree of tilt from the x and y axes respectively.</p> <p><tt>keyState</tt> specifies which keyboard modifiers are pressed (e.g&#x2e;, <b>Ctrl</b>).</p> <p>The <tt>uniqueID</tt> parameter contains the unique ID for the current device.</p> <p>The <tt>z</tt> 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.</p> <p>The <tt>tangentialPressure</tt> paramater contins the tangential pressure of an air brush. If the device does not support tangential pressure, pass 0 here.</p> <p><tt>rotation</tt> contains the device's rotation in degrees. 4D mice support rotation. If the device does not support rotation, pass 0 here.</p> @see <a href="QTabletEvent.html#pos()"><tt>pos</tt></a> @see <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> @see <a href="QTabletEvent.html#device()"><tt>device</tt></a> @see <a href="QTabletEvent.html#pressure()"><tt>pressure</tt></a> @see <a href="QTabletEvent.html#xTilt()"><tt>xTilt</tt></a> @see <a href="QTabletEvent.html#yTilt()"><tt>yTilt</tt></a> @see <a href="QTabletEvent.html#uniqueId()"><tt>uniqueId</tt></a> @see <a href="QTabletEvent.html#rotation()"><tt>rotation</tt></a> @see <a href="QTabletEvent.html#tangentialPressure()"><tt>tangentialPressure</tt></a> @see <a href="QTabletEvent.html#z()"><tt>z</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QTabletEvent.TabletDevice device()" doc="/** <p>Returns the type of device that generated the event.</p> @see <a href="QTabletEvent.html#TabletDevice-enum"><tt>TabletDevice</tt></a> */"/> <method name="public final com.trolltech.qt.core.QPoint globalPos()" doc="/** <p>Returns the global position of the device <i>at the time of the event</i>. This is important on asynchronous windows systems like X11; whenever you move your widgets around in response to mouse events, <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> can differ significantly from the current position QCursor::pos().</p> @see <a href="QTabletEvent.html#globalX()"><tt>globalX</tt></a> @see <a href="QTabletEvent.html#globalY()"><tt>globalY</tt></a> @see <a href="QTabletEvent.html#hiResGlobalPos()"><tt>hiResGlobalPos</tt></a> */"/> <method name="public final int globalX()" doc="/** <p>Returns the global x position of the mouse pointer at the time of the event.</p> @see <a href="QTabletEvent.html#globalY()"><tt>globalY</tt></a> @see <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> @see <a href="QTabletEvent.html#hiResGlobalX()"><tt>hiResGlobalX</tt></a> */"/> <method name="public final int globalY()" doc="/** <p>Returns the global y position of the tablet device at the time of the event.</p> @see <a href="QTabletEvent.html#globalX()"><tt>globalX</tt></a> @see <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> @see <a href="QTabletEvent.html#hiResGlobalY()"><tt>hiResGlobalY</tt></a> */"/> <method name="public final com.trolltech.qt.core.QPointF hiResGlobalPos()" doc="/** <p>The high precision coordinates delivered from the tablet expressed. Sub pixeling information is in the fractional part of the <a href="%2E%2E/core/QPointF.html"><tt>QPointF</tt></a>.</p> @see <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> @see <a href="QTabletEvent.html#hiResGlobalX()"><tt>hiResGlobalX</tt></a> @see <a href="QTabletEvent.html#hiResGlobalY()"><tt>hiResGlobalY</tt></a> */"/> <method name="public final double hiResGlobalX()" doc="/** <p>The high precision x position of the tablet device.</p> */"/> <method name="public final double hiResGlobalY()" doc="/** <p>The high precision y position of the tablet device.</p> */"/> <method name="public final com.trolltech.qt.gui.QTabletEvent.PointerType pointerType()" doc="/** <p>Returns the type of point that generated the event.</p> */"/> <method name="public final com.trolltech.qt.core.QPoint pos()" doc="/** <p>Returns the position of the device, relative to the widget that received the event.</p> <p>If you move widgets around in response to mouse events, use <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> instead of this function.</p> @see <a href="QTabletEvent.html#x()"><tt>x</tt></a> @see <a href="QTabletEvent.html#y()"><tt>y</tt></a> @see <a href="QTabletEvent.html#globalPos()"><tt>globalPos</tt></a> */"/> <method name="public final double pressure()" doc="/** <p>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.</p> @see <a href="QTabletEvent.html#tangentialPressure()"><tt>tangentialPressure</tt></a> */"/> <method name="public final double rotation()" doc="/** <p>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&#x2e;</p> */"/> <method name="public final double tangentialPressure()" doc="/** <p>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&#x2e; 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&#x2e;</p> @see <a href="QTabletEvent.html#pressure()"><tt>pressure</tt></a> */"/> <method name="public final long uniqueId()" doc="/** <p>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.</p> <p>Support of this feature is dependent on the tablet.</p> <p>Values for the same device may vary from OS to OS.</p> <p>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.</p> <p>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.</p> @see <a href="QTabletEvent.html#pointerType()"><tt>pointerType</tt></a> */"/> <method name="public final int x()" doc="/** <p>Returns the x position of the device, relative to the widget that received the event.</p> @see <a href="QTabletEvent.html#y()"><tt>y</tt></a> @see <a href="QTabletEvent.html#pos()"><tt>pos</tt></a> */"/> <method name="public final int xTilt()" doc="/** <p>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.</p> <p align="center"><img src="%2E%2E/images/qtabletevent-tilt.png" /></p> @see <a href="QTabletEvent.html#yTilt()"><tt>yTilt</tt></a> */"/> <method name="public final int y()" doc="/** <p>Returns the y position of the device, relative to the widget that received the event.</p> @see <a href="QTabletEvent.html#x()"><tt>x</tt></a> @see <a href="QTabletEvent.html#pos()"><tt>pos</tt></a> */"/> <method name="public final int yTilt()" doc="/** <p>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.</p> @see <a href="QTabletEvent.html#xTilt()"><tt>xTilt</tt></a> */"/> <method name="public final int z()" doc="/** <p>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 <b>not</b> the same as pressure.</p> @see <a href="QTabletEvent.html#pressure()"><tt>pressure</tt></a> */"/> <enum name="TabletDevice" doc="/** <p>This enum defines what type of device is generating the event.</p> */"> <enum-value name="NoDevice" doc="/** <p>No device, or an unknown device.</p> */"/> <enum-value name="Puck" doc="/** <p>A Puck (a device that is similar to a flat mouse with a transparent circle with cross-hairs).</p> */"/> <enum-value name="Stylus" doc="/** <p>A Stylus.</p> */"/> <enum-value name="Airbrush" doc="/** <p>An airbrush</p> */"/> <enum-value name="FourDMouse" doc="/** <p>A 4D Mouse.</p> */"/> <enum-value name="XFreeEraser" doc="/** Internal. */"/> <enum-value name="RotationStylus" doc="/** <p>A special stylus that also knows about rotation (a 6D stylus).</p> */"/> </enum> <enum name="PointerType" doc="/** <p>This enum defines what type of point is generating the event.</p> @see <a href="QTabletEvent.html#pointerType()"><tt>pointerType</tt></a> */"> <enum-value name="UnknownPointer" doc="/** <p>An unknown device.</p> */"/> <enum-value name="Pen" doc="/** <p>Tip end of a stylus-like device (the narrow end of the pen).</p> */"/> <enum-value name="Cursor" doc="/** <p>Any puck-like device.</p> */"/> <enum-value name="Eraser" doc="/** <p>Eraser end of a stylus-like device (the broad end of the pen).</p> */"/> </enum> <method name="protected final int mYT()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMYT(int)"><tt>setMYT</tt></a> */"/> <method name="protected final void setMYT(int mYT)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mYT()"><tt>mYT</tt></a> */"/> <method name="protected final com.trolltech.qt.core.QPoint mGPos()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMGPos(com.trolltech.qt.core.QPoint)"><tt>setMGPos</tt></a> */"/> <method name="protected final void setMGPos(com.trolltech.qt.core.QPoint mGPos)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mGPos()"><tt>mGPos</tt></a> */"/> <method name="protected final int mXT()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMXT(int)"><tt>setMXT</tt></a> */"/> <method name="protected final void setMXT(int mXT)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mXT()"><tt>mXT</tt></a> */"/> <method name="protected final long mUnique()"/> <method name="protected final void setMUnique(long mUnique)"/> <method name="protected final double mTangential()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMTangential(double)"><tt>setMTangential</tt></a> */"/> <method name="protected final void setMTangential(double mTangential)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mTangential()"><tt>mTangential</tt></a> */"/> <method name="protected final int mPointerType()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMPointerType(int)"><tt>setMPointerType</tt></a> */"/> <method name="protected final void setMPointerType(int mPointerType)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mPointerType()"><tt>mPointerType</tt></a> */"/> <method name="protected final com.trolltech.qt.core.QPointF mHiResGlobalPos()"/> <method name="protected final void setMHiResGlobalPos(com.trolltech.qt.core.QPointF mHiResGlobalPos)"/> <method name="protected final com.trolltech.qt.core.QPoint mPos()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMPos(com.trolltech.qt.core.QPoint)"><tt>setMPos</tt></a> */"/> <method name="protected final void setMPos(com.trolltech.qt.core.QPoint mPos)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mPos()"><tt>mPos</tt></a> */"/> <method name="protected final double mPress()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMPress(double)"><tt>setMPress</tt></a> */"/> <method name="protected final void setMPress(double mPress)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mPress()"><tt>mPress</tt></a> */"/> <method name="protected final int mDev()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMDev(int)"><tt>setMDev</tt></a> */"/> <method name="protected final void setMDev(int mDev)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mDev()"><tt>mDev</tt></a> */"/> <method name="protected final double mRot()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMRot(double)"><tt>setMRot</tt></a> */"/> <method name="protected final void setMRot(double mRot)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mRot()"><tt>mRot</tt></a> */"/> <method name="protected final int mZ()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#setMZ(int)"><tt>setMZ</tt></a> */"/> <method name="protected final void setMZ(int mZ)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QTabletEvent.html#mZ()"><tt>mZ</tt></a> */"/> </class>