TouchPoint 类

( QTouchEvent::TouchPoint )

The TouchPoint 类提供的信息有关触摸点在 QTouchEvent . 更多...

头: #include <TouchPoint>
Since: Qt 4.6

公共函数

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

详细描述

The TouchPoint 类提供的信息有关触摸点在 QTouchEvent .

成员函数文档编制

int TouchPoint:: id () const

返回此触摸点的 ID 号。

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.

另请参阅 normalizedPos () 和 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.

另请参阅 pos () 和 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.

另请参阅 scenePos () 和 startScenePos ().

QPointF TouchPoint:: lastScreenPos () const

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

另请参阅 screenPos () 和 startScreenPos ().

QPointF TouchPoint:: normalizedPos () const

返回此触摸点的规范化位置。

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.

另请参阅 startNormalizedPos (), lastNormalizedPos (),和 pos ().

QPointF TouchPoint:: pos () const

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

另请参阅 startPos (), lastPos (), screenPos (), scenePos (),和 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 ().

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

QPointF TouchPoint:: scenePos () const

返回此触摸点的场景位置。

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.

另请参阅 startScenePos (), lastScenePos (),和 pos ().

QRectF TouchPoint:: sceneRect () const

Returns the rect for this touch point in scene coordinates.

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

另请参阅 scenePos () 和 rect ().

QPointF TouchPoint:: screenPos () const

Returns the screen position of this touch point.

另请参阅 startScreenPos (), lastScreenPos (),和 pos ().

QRectF TouchPoint:: screenRect () const

Returns the rect for this touch point in screen coordinates.

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

另请参阅 screenPos () 和 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.

另请参阅 normalizedPos () 和 lastNormalizedPos ().

QPointF TouchPoint:: startPos () const

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

另请参阅 pos () 和 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.

另请参阅 scenePos () 和 lastScenePos ().

QPointF TouchPoint:: startScreenPos () const

Returns the starting screen position of this touch point.

另请参阅 screenPos () 和 lastScreenPos ().

Qt::TouchPointState TouchPoint:: state () const

Returns the current state of this touch point.