QSwipeGesture Class
The QSwipeGesture class describes a swipe gesture made by the user. 更多...
头文件: | #include <QSwipeGesture> |
qmake: | QT += widgets |
开始支持版本: | Qt 4.6 |
基类: | QGesture |
公有类型
enum | SwipeDirection { NoDirection, Left, Right, Up, Down } |
属性
- horizontalDirection : const SwipeDirection
- swipeAngle : qreal
- verticalDirection : const SwipeDirection
公有函数
~QSwipeGesture() | |
SwipeDirection | horizontalDirection() const |
void | setSwipeAngle(qreal value) |
qreal | swipeAngle() const |
SwipeDirection | verticalDirection() const |
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QSwipeGesture class describes a swipe gesture made by the user.
For an overview of gesture handling in Qt and information on using gestures in your applications, see the Gestures in Widgets and Graphics View document.
参见 QPanGesture and QPinchGesture.
成员类型
enum QSwipeGesture::SwipeDirection
This enum describes the possible directions for the gesture's motion along the horizontal and vertical axes.
Constant | Value | Description |
---|---|---|
QSwipeGesture::NoDirection | 0 | The gesture had no motion associated with it on a particular axis. |
QSwipeGesture::Left | 1 | The gesture involved a horizontal motion to the left. |
QSwipeGesture::Right | 2 | The gesture involved a horizontal motion to the right. |
QSwipeGesture::Up | 3 | The gesture involved an upward vertical motion. |
QSwipeGesture::Down | 4 | The gesture involved a downward vertical motion. |
属性
horizontalDirection : const SwipeDirection
This property holds the horizontal direction of the gesture
If the gesture has a horizontal component, the horizontal direction is either Left or Right; otherwise, it is NoDirection.
访问函数:
SwipeDirection | horizontalDirection() const |
参见 verticalDirection and swipeAngle.
swipeAngle : qreal
This property holds the angle of the motion associated with the gesture
If the gesture has either a horizontal or vertical component, the swipe angle describes the angle between the direction of motion and the x-axis as defined using the standard widget coordinate system.
访问函数:
qreal | swipeAngle() const |
void | setSwipeAngle(qreal value) |
参见 horizontalDirection and verticalDirection.
verticalDirection : const SwipeDirection
This property holds the vertical direction of the gesture
If the gesture has a vertical component, the vertical direction is either Up or Down; otherwise, it is NoDirection.
访问函数:
SwipeDirection | verticalDirection() const |
参见 horizontalDirection and swipeAngle.