![]() |
Home · All Classes · Overviews |
The QPinchGesture class represents a Pinch gesture, providing additional information related to zooming and/or rotation. More...
#include <QPinchGesture>
Inherits QGesture.
This class was introduced in Qt 4.6.
| enum | WhatChange { ScaleFactorChanged, RotationAngleChanged, CenterPointChanged } |
| flags | WhatChanged |
|
|
| QPinchGesture ( QWidget * gestureTarget, QObject * parent = 0 ) | |
| QPointF | centerPoint () const |
| QPointF | lastCenterPoint () const |
| qreal | lastRotationAngle () const |
| qreal | lastScaleFactor () const |
| qreal | rotationAngle () const |
| qreal | scaleFactor () const |
| QPointF | startCenterPoint () const |
| qreal | totalRotationAngle () const |
| qreal | totalScaleFactor () const |
| WhatChanged | whatChanged () const |
The QPinchGesture class represents a Pinch gesture, providing additional information related to zooming and/or rotation.
The WhatChanged type is a typedef for QFlags<WhatChange>. It stores an OR combination of WhatChange values.
Specifies a center point of the gesture. The point can be used as a center point that the object is rotated around.
Access functions:
| QPointF | centerPoint () const |
Specifies a previous center point of the gesture.
Access functions:
| QPointF | lastCenterPoint () const |
Specifies a previous rotation angle of the gesture.
The angle is specified in degrees.
Access functions:
| qreal | lastRotationAngle () const |
Specifies a previous scale factor of the pinch gesture.
Access functions:
| qreal | lastScaleFactor () const |
Specifies a rotation angle of the gesture.
If the gesture consists of several pinch sequences (i.e. zoom and rotate sequences), then this property specifies the rotation angle in the current sequence. When pinching changes the scale factor only, the value of this property is 0.
The angle is specified in degrees.
Access functions:
| qreal | rotationAngle () const |
Specifies a scale factor of the pinch gesture.
If the gesture consists of several pinch sequences (i.e. zoom and rotate sequences), then this property specifies the scale factor in the current sequence. When pinching changes the rotation angle only, the value of this property is 1.
Access functions:
| qreal | scaleFactor () const |
Specifies an initial center point of the gesture. Difference between the startCenterPoint and the centerPoint is the distance at which pinching fingers has shifted.
Access functions:
| QPointF | startCenterPoint () const |
Specifies a total rotation angle of the gesture since the gesture started.
The angle is specified in degrees.
Access functions:
| qreal | totalRotationAngle () const |
Specifies a total scale factor of the pinch gesture since the gesture started.
Access functions:
| qreal | totalScaleFactor () const |
Specifies which values were changed in the gesture.
Access functions:
| WhatChanged | whatChanged () const |
Creates a new Pinch gesture handler object and marks it as a child of parent. The pan gesture handler watches gestureTarget for its events.
On some platform like Windows it's necessary to provide a non-null widget as parent to get native gesture support.
| Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.6.0-tp1 |