Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Atributos protegidos
Referencia de la Clase QTabletEvent

The QTabletEvent class contains parameters that describe a Tablet event. Más...

#include <qevent.h>

Diagrama de herencias de QTabletEvent
QEvent QEvent Qt Qt Qt Qt

Lista de todos los miembros.

Tipos públicos

enum  TabletDevice {
  NoDevice = -1, Puck, Stylus, Eraser,
  NoDevice = -1, Puck, Stylus, Eraser
}
enum  TabletDevice {
  NoDevice = -1, Puck, Stylus, Eraser,
  NoDevice = -1, Puck, Stylus, Eraser
}

Métodos públicos

 QTabletEvent (Type t, const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair< int, int > &uId)
 QTabletEvent (const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair< int, int > &uId)
int pressure () const
int xTilt () const
int yTilt () const
const QPointpos () const
const QPointglobalPos () const
int x () const
int y () const
int globalX () const
int globalY () const
TabletDevice device () const
int isAccepted () const
void accept ()
void ignore ()
QPair< int, intuniqueId ()
 QTabletEvent (Type t, const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair< int, int > &uId)
 QTabletEvent (const QPoint &pos, const QPoint &globalPos, int device, int pressure, int xTilt, int yTilt, const QPair< int, int > &uId)
int pressure () const
int xTilt () const
int yTilt () const
const QPointpos () const
const QPointglobalPos () const
int x () const
int y () const
int globalX () const
int globalY () const
TabletDevice device () const
int isAccepted () const
void accept ()
void ignore ()
QPair< int, intuniqueId ()

Atributos protegidos

QPoint mPos
QPoint mGPos
int mDev
int mPress
int mXT
int mYT
int mType
int mPhy
bool mbAcc

Descripción detallada

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 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 all three types of tablet events. Qt will first send a tabletEvent and 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.


Documentación de las enumeraciones miembro de la clase

This enum defines what type of device is generating the event.

NoDevice No device, or an unknown device. Puck A Puck (a device that is similar to a flat mouse with a transparent circle with cross-hairs). Stylus A Stylus (the narrow end of the pen). Eraser An Eraser (the broad end of the pen). Menu A menu button was pressed (currently unimplemented).

Valores de enumeraciones:
NoDevice 
Puck 
Stylus 
Eraser 
NoDevice 
Puck 
Stylus 
Eraser 
Valores de enumeraciones:
NoDevice 
Puck 
Stylus 
Eraser 
NoDevice 
Puck 
Stylus 
Eraser 

Documentación del constructor y destructor

QTabletEvent::QTabletEvent ( Type  t,
const QPoint pos,
const QPoint globalPos,
int  device,
int  pressure,
int  xTilt,
int  yTilt,
const QPair< int, int > &  uId 
)

Construct a tablet event of type t. The position of when the event occurred is given int pos and globalPos. device contains the device type, pressure contains the pressure exerted on the device, xTilt and yTilt contain device's degree 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.

Ver también:
pos(), globalPos(), device(), pressure(), xTilt(), yTilt()
QTabletEvent::QTabletEvent ( const QPoint pos,
const QPoint globalPos,
int  device,
int  pressure,
int  xTilt,
int  yTilt,
const QPair< int, int > &  uId 
) [inline]

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.

Ver también:
pos(), globalPos(), device(), pressure(), xTilt(), yTilt()
QTabletEvent::QTabletEvent ( Type  t,
const QPoint pos,
const QPoint globalPos,
int  device,
int  pressure,
int  xTilt,
int  yTilt,
const QPair< int, int > &  uId 
)
QTabletEvent::QTabletEvent ( const QPoint pos,
const QPoint globalPos,
int  device,
int  pressure,
int  xTilt,
int  yTilt,
const QPair< int, int > &  uId 
) [inline]

Documentación de las funciones miembro

void QTabletEvent::accept ( ) [inline]

Sets the accept flag of the tablet event object.

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.

Ver también:
ignore()
void QTabletEvent::accept ( ) [inline]
TabletDevices QTabletEvent::device ( ) const [inline]

Returns the type of device that generated the event. Useful if you want one end of the pen to do something different than the other.

Ver también:
TabletDevice
TabletDevice QTabletEvent::device ( ) const [inline]
const QPoint & QTabletEvent::globalPos ( ) const [inline]

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().

Ver también:
globalX(), globalY()
const QPoint& QTabletEvent::globalPos ( ) const [inline]
int QTabletEvent::globalX ( ) const [inline]

Returns the global x-position of the mouse pointer at the time of the event.

Ver también:
globalY(), globalPos()
int QTabletEvent::globalX ( ) const [inline]
int QTabletEvent::globalY ( ) const [inline]

Returns the global y-position of the mouse pointer at the time of the event.

Ver también:
globalX(), globalPos()
int QTabletEvent::globalY ( ) const [inline]
void QTabletEvent::ignore ( ) [inline]

Clears the accept flag parameter of the tablet event object.

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.

Ver también:
accept()
void QTabletEvent::ignore ( ) [inline]
bool QTabletEvent::isAccepted ( ) const [inline]

Returns TRUE if the receiver of the event handles the tablet event; otherwise returns FALSE.

int QTabletEvent::isAccepted ( ) const [inline]
const QPoint& QTabletEvent::pos ( ) const [inline]
const QPoint & QTabletEvent::pos ( ) const [inline]

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.

Ver también:
x(), y(), globalPos()
int QTabletEvent::pressure ( ) const [inline]

Returns the pressure that is exerted on the device. This number is a value from 0 (no pressure) to 255 (maximum pressure). The pressure is always scaled to be within this range no matter how many pressure levels the underlying hardware supports.

int QTabletEvent::pressure ( ) const [inline]
QPair< int, int > QTabletEvent::uniqueId ( ) [inline]

Returns a unique ID for the current device. It is possible to generate a unique ID for any Wacom© device. This makes it possible to differentiate between 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. Each combination of these values is unique. Note: for different platforms, the first value is different due to different driver implementations.

QPair<int,int> QTabletEvent::uniqueId ( ) [inline]
int QTabletEvent::x ( ) const [inline]
int QTabletEvent::x ( ) const [inline]

Returns the x-position of the device, relative to the widget that received the event.

Ver también:
y(), pos()
int QTabletEvent::xTilt ( ) const [inline]

Returns the difference from the perpendicular in the X Axis. Positive values are towards the tablet's physical right. The angle is in the range -60 to +60 degrees.

Ver también:
yTilt()
int QTabletEvent::xTilt ( ) const [inline]
int QTabletEvent::y ( ) const [inline]

Returns the y-position of the device, relative to the widget that received the event.

Ver también:
x(), pos()
int QTabletEvent::y ( ) const [inline]
int QTabletEvent::yTilt ( ) const [inline]
int QTabletEvent::yTilt ( ) const [inline]

Returns the difference from the perpendicular in the Y Axis. Positive values are towards the bottom of the tablet. The angle is within the range -60 to +60 degrees.

Ver también:
xTilt()

Documentación de los datos miembro

int QTabletEvent::mDev [protected]
int QTabletEvent::mPhy [protected]
int QTabletEvent::mType [protected]
int QTabletEvent::mXT [protected]
int QTabletEvent::mYT [protected]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'