The QSwipeGesture 類描述由用戶做齣的輕掃手勢。 更多...
| 頭: | #include <QSwipeGesture> |
| qmake: | QT += widgets |
| Since: | Qt 4.6 |
| 繼承: | QGesture |
| enum | SwipeDirection { NoDirection, Left, Right, Up, Down } |
| ~QSwipeGesture () | |
| SwipeDirection | horizontalDirection () const |
| void | setSwipeAngle (qreal value ) |
| qreal | swipeAngle () const |
| SwipeDirection | verticalDirection () const |
The QSwipeGesture 類描述由用戶做齣的輕掃手勢。
Qt 中手勢處理的概述和在應用程序中使用手勢的有關信息,見 Widget 和圖形視圖中的手勢 文檔。
另請參閱 QPanGesture and QPinchGesture .
此枚舉描述手勢沿水平軸和垂直軸運動的可能方嚮。
| 常量 | 值 | 描述 |
|---|---|---|
QSwipeGesture::NoDirection
|
0
|
手勢沒有關聯特定軸的運動。 |
QSwipeGesture::Left
|
1
|
手勢涉及嚮左的水平運動。 |
QSwipeGesture::Right
|
2
|
手勢涉及嚮右的水平運動。 |
QSwipeGesture::Up
|
3
|
手勢涉及嚮上的垂直運動。 |
QSwipeGesture::Down
|
4
|
手勢涉及嚮下的垂直運動。 |
此特性保持手勢的水平方嚮
若手勢擁有水平分量,水平方嚮為嚮 Left 或嚮 Right;否則,它 NoDirection .
訪問函數:
| SwipeDirection | horizontalDirection () const |
另請參閱 verticalDirection and swipeAngle .
此特性保持手勢關聯的運動角度
若手勢擁有水平 (或垂直) 分量,輕掃角度描述運動方嚮和 X 軸之間的夾角如定義使用標準小部件 坐標係 .
訪問函數:
| qreal | swipeAngle () const |
| void | setSwipeAngle (qreal value ) |
另請參閱 horizontalDirection and verticalDirection .
此特性保持手勢的垂直方嚮
若手勢擁有垂直分量,垂直方嚮為嚮 Up 或嚮 Down;否則,它 NoDirection .
訪問函數:
| SwipeDirection | verticalDirection () const |
另請參閱 horizontalDirection and swipeAngle .
析構函數。