Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

TouchPoint Class

(QTouchEvent::TouchPoint)

TheTouchPoint class provides information about a touch point in aQTouchEvent.More...

Header:#include <TouchPoint>
Since: Qt 4.6

Public Functions

intid() const
boolisPrimary() const
QPointFlastNormalizedPos() const
QPointFlastPos() const
QPointFlastScenePos() const
QPointFlastScreenPos() const
QPointFnormalizedPos() const
QPointFpos() const
qrealpressure() const
QRectFrect() const
QPointFscenePos() const
QRectFsceneRect() const
QPointFscreenPos() const
QRectFscreenRect() const
QPointFstartNormalizedPos() const
QPointFstartPos() const
QPointFstartScenePos() const
QPointFstartScreenPos() const
Qt::TouchPointStatestate() const

Detailed Description

TheTouchPoint class provides information about a touch point in aQTouchEvent.

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

QPointF TouchPoint::lastPos() const

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

See alsopos() andstartPos().

QPointF TouchPoint::lastScenePos() const

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

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

See alsoscenePos() andstartScenePos().

QPointF TouchPoint::lastScreenPos() const

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

See alsoscreenPos() andstartScreenPos().

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 alsostartNormalizedPos(),lastNormalizedPos(), andpos().

QPointF TouchPoint::pos() const

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

See alsostartPos(),lastPos(),screenPos(),scenePos(), andnormalizedPos().

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 orQGraphicsItem that received the event. The rect is centered around the point returned bypos().

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 inQGraphicsScene coordinates if theQTouchEvent is handled by a QGraphicsItem::touchEvent() reimplementation, and identical to the screen position for widgets.

See alsostartScenePos(),lastScenePos(), andpos().

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

QPointF TouchPoint::screenPos() const

Returns the screen position of this touch point.

See alsostartScreenPos(),lastScreenPos(), andpos().

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

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

QPointF TouchPoint::startPos() const

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

See alsopos() andlastPos().

QPointF TouchPoint::startScenePos() const

Returns the starting scene position of this touch point.

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

See alsoscenePos() andlastScenePos().

QPointF TouchPoint::startScreenPos() const

Returns the starting screen position of this touch point.

See alsoscreenPos() andlastScreenPos().

Qt::TouchPointState TouchPoint::state() const

Returns the current state of this touch point.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp