Qt 4.6: TouchPoint Class Reference

|  | Home · All Classes · Overviews |

# TouchPoint Class Reference
(QTouchEvent::TouchPoint)
[QtGui module]

The QTouchEvent::TouchPoint class provides information about a touch point in a QTouchEvent. More...

     #include <QTouchEvent>

This class was introduced in Qt 4.6.

- List of all members, including inherited members

## Public Functions

int | id () const
bool | isPrimary () const
QPointF | lastNormalizedPos () const
QPointF | lastPos () const
QPointF | lastScenePos () const
QPointF | lastScreenPos () const
QPointF | normalizedPos () const
QPointF | pos () const
qreal | pressure () const
QRectF | rect () const
QPointF | scenePos () const
QRectF | sceneRect () const
QPointF | screenPos () const
QRectF | screenRect () const
QPointF | startNormalizedPos () const
QPointF | startPos () const
QPointF | startScenePos () const
QPointF | startScreenPos () const
Qt::TouchPointState | state () const

## Detailed Description

The QTouchEvent::TouchPoint class provides information about a touch point in a QTouchEvent.

## Member Function Documentation

### int TouchPoint::id () const

Returns the id number of this touch point.

Id numbers are globally sequential, starting at zero, meaning the first touch point in the application has id 0, the second has id 1, and so on.

### bool TouchPoint::isPrimary () const

Returns true if this touch point is the primary touch point. The primary touch point is the point for which the windowing system generates mouse events.

### QPointF TouchPoint::lastNormalizedPos () const

Returns the normalized position of this touch point from the previous touch event.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also normalizedPos() and startNormalizedPos().

### QPointF TouchPoint::lastPos () const

Returns the position of this touch point from the previous touch event, relative to the widget or QGraphicsItem that received the event.

See also pos() and startPos().

### QPointF TouchPoint::lastScenePos () const

Returns the scene position of this touch point from the previous touch event.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also scenePos() and startScenePos().

### QPointF TouchPoint::lastScreenPos () const

Returns the screen position of this touch point from the previous touch event.

See also screenPos() and startScreenPos().

### QPointF TouchPoint::normalizedPos () const

Returns the normalized position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also startNormalizedPos(), lastNormalizedPos(), and pos().

### QPointF TouchPoint::pos () const

Returns the position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also startPos(), lastPos(), screenPos(), scenePos(), and normalizedPos().

### qreal TouchPoint::pressure () const

Returns the pressure of this touch point. The return value is in the range 0.0 to 1.0.

### QRectF TouchPoint::rect () const

Returns the rect for this touch point, relative to the widget or QGraphicsItem that received the event. The rect is centered around the point returned by pos().

Note: This function returns an empty rect if the device does not report touch point sizes.

### QPointF TouchPoint::scenePos () const

Returns the scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also startScenePos(), lastScenePos(), and pos().

### QRectF TouchPoint::sceneRect () const

Returns the rect for this touch point in scene coordinates.

Note: This function returns an empty rect if the device does not report touch point sizes.

See also scenePos() and rect().

### QPointF TouchPoint::screenPos () const

Returns the screen position of this touch point.

See also startScreenPos(), lastScreenPos(), and pos().

### QRectF TouchPoint::screenRect () const

Returns the rect for this touch point in screen coordinates.

Note: This function returns an empty rect if the device does not report touch point sizes.

See also screenPos() and rect().

### QPointF TouchPoint::startNormalizedPos () const

Returns the normalized starting position of this touch point.

The coordinates are normalized to the size of the touch device, i.e. (0,0) is the top-left corner and (1,1) is the bottom-right corner.

See also normalizedPos() and lastNormalizedPos().

### QPointF TouchPoint::startPos () const

Returns the starting position of this touch point, relative to the widget or QGraphicsItem that received the event.

See also pos() and lastPos().

### QPointF TouchPoint::startScenePos () const

Returns the starting scene position of this touch point.

The scene position is the position in QGraphicsScene coordinates if the QTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See also scenePos() and lastScenePos().

### QPointF TouchPoint::startScreenPos () const

Returns the starting screen position of this touch point.

See also screenPos() and lastScreenPos().

### Qt::TouchPointState TouchPoint::state () const

Returns the current state of this touch point.