QSwipeGesture 類

The QSwipeGesture 類描述由用戶做齣的輕掃手勢。 更多...

頭: #include <QSwipeGesture>
Since: Qt 4.6
繼承: QGesture

公共類型

enum SwipeDirection { NoDirection, Left, Right, Up, Down }

特性

公共函數

SwipeDirection horizontalDirection () const
void setSwipeAngle (qreal value )
qreal swipeAngle () const
SwipeDirection verticalDirection () const

額外繼承成員

詳細描述

The QSwipeGesture 類描述由用戶做齣的輕掃手勢。

Qt 中手勢處理的概述和在應用程序中使用手勢的有關信息,見 Gestures Programming 文檔。

另請參閱 QPanGesture and QPinchGesture .

成員類型文檔編製

enum QSwipeGesture:: SwipeDirection

此枚舉描述手勢沿水平軸和垂直軸運動的可能方嚮。

常量 描述
QSwipeGesture::NoDirection 0 手勢沒有關聯特定軸的運動。
QSwipeGesture::Left 1 手勢涉及嚮左的水平運動。
QSwipeGesture::Right 2 手勢涉及嚮右的水平運動。
QSwipeGesture::Up 3 手勢涉及嚮上的垂直運動。
QSwipeGesture::Down 4 手勢涉及嚮下的垂直運動。

特性文檔編製

horizontalDirection : const SwipeDirection

This property holds the horizontal direction of the gesture.

若手勢擁有水平分量,水平方嚮為嚮 Left 或嚮 Right;否則,它 NoDirection .

訪問函數:

SwipeDirection horizontalDirection () const

另請參閱 verticalDirection and swipeAngle .

swipeAngle : qreal

This property holds the angle of the motion associated with the gesture.

若手勢擁有水平 (或垂直) 分量,輕掃角度描述運動方嚮和 X 軸之間的夾角如定義使用標準小部件 坐標係 .

訪問函數:

qreal swipeAngle () const
void setSwipeAngle (qreal value )

另請參閱 horizontalDirection and verticalDirection .

verticalDirection : const SwipeDirection

This property holds the vertical direction of the gesture.

若手勢擁有垂直分量,垂直方嚮為嚮 Up 或嚮 Down;否則,它 NoDirection .

訪問函數:

SwipeDirection verticalDirection () const

另請參閱 horizontalDirection and swipeAngle .