QPinchGesture Class Reference

[ QtGui module]

The QPinchGesture class describes a pinch gesture made by the user. 更多...

继承 QGesture .

类型

方法


详细描述

The QPinchGesture class describes a pinch gesture made by the user.

A pinch gesture is a form of touch user input in which the user typically touches two points on the input device with a thumb and finger, before moving them closer together or further apart to change the scale factor, zoom, or level of detail of the user 接口。

For an overview of gesture handling in Qt and information on using gestures in your applications, see the Gestures Programming 文档。

Instead of repeatedly applying the same pinching gesture, the user may continue to touch the input device in one place, and apply a second touch to a new point, continuing the gesture. When this occurs, gesture events will continue to be delivered to the target object, containing an instance of QPinchGesture in the Qt.GestureUpdated 状态。


类型文档编制

QPinchGesture.ChangeFlag

This enum describes the changes that can occur to the properties of the gesture object.

常量 描述
QPinchGesture.ScaleFactorChanged 0x1 The scale factor held by scaleFactor 改变。
QPinchGesture.RotationAngleChanged 0x2 The rotation angle held by rotationAngle 改变。
QPinchGesture.CenterPointChanged 0x4 The center point held by centerPoint 改变。

The ChangeFlags type is a typedef for QFlags <ChangeFlag>. It stores an OR combination of ChangeFlag values.

另请参阅 changeFlags and totalChangeFlags .


方法文档编制

QPinchGesture.__init__ ( self , QObject   parent  = None)

parent argument, if not None, causes self to be owned by Qt instead of PyQt.

QPointF QPinchGesture.centerPoint ( self )

ChangeFlags QPinchGesture.changeFlags ( self )

QPointF QPinchGesture.lastCenterPoint ( self )

float QPinchGesture.lastRotationAngle ( self )

float QPinchGesture.lastScaleFactor ( self )

float QPinchGesture.rotationAngle ( self )

float QPinchGesture.scaleFactor ( self )

QPinchGesture.setCenterPoint ( self , QPointF   value )

QPinchGesture.setChangeFlags ( self , ChangeFlags   value )

QPinchGesture.setLastCenterPoint ( self , QPointF   value )

QPinchGesture.setLastRotationAngle ( self , float  value )

QPinchGesture.setLastScaleFactor ( self , float  value )

QPinchGesture.setRotationAngle ( self , float  value )

QPinchGesture.setScaleFactor ( self , float  value )

QPinchGesture.setStartCenterPoint ( self , QPointF   value )

QPinchGesture.setTotalChangeFlags ( self , ChangeFlags   value )

QPinchGesture.setTotalRotationAngle ( self , float  value )

QPinchGesture.setTotalScaleFactor ( self , float  value )

QPointF QPinchGesture.startCenterPoint ( self )

ChangeFlags QPinchGesture.totalChangeFlags ( self )

float QPinchGesture.totalRotationAngle ( self )

float QPinchGesture.totalScaleFactor ( self )