Qt 4.6: QSwipeGesture Class Reference

|  | Home · All Classes · Overviews |

# QSwipeGesture Class Reference
[QtGui module]

The QSwipeGesture class represents a swipe gesture, providing additional information related to swiping. More...

     #include <QSwipeGesture>

Inherits QGesture.

This class was introduced in Qt 4.6.

- List of all members, including inherited members

## Public Types

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

## Properties

- horizontalDirection : const SwipeDirection
- swipeAngle : const qreal
- verticalDirection : const SwipeDirection

- 2 properties inherited from QGesture
- 1 property inherited from QObject

## Public Functions

| QSwipeGesture ( QWidget * gestureTarget, QObject * parent = 0 )
SwipeDirection | horizontalDirection () const
qreal | swipeAngle () const
SwipeDirection | verticalDirection () const

- 6 public functions inherited from QGesture
- 29 public functions inherited from QObject

### Additional Inherited Members

- 1 public slot inherited from QObject
- 4 signals inherited from QGesture
- 1 signal inherited from QObject
- 5 static public members inherited from QObject
- 2 protected functions inherited from QGesture
- 7 protected functions inherited from QObject

## Detailed Description

The QSwipeGesture class represents a swipe gesture, providing additional information related to swiping.

## Member Type Documentation

### enum QSwipeGesture::SwipeDirection

This enum specifies the direction of the swipe gesture.

Constant | Value
--- | ---
`QSwipeGesture::NoDirection` | `0`
`QSwipeGesture::Left` | `1`
`QSwipeGesture::Right` | `2`
`QSwipeGesture::Up` | `3`
`QSwipeGesture::Down` | `4`

## Property Documentation

### horizontalDirection : const SwipeDirection

Holds the direction for the horizontal component of the swipe gesture, SwipeDirection::Left or SwipeDirection::Right. SwipeDirection::NoDirection if there is no horizontal component to the swipe gesture.

Access functions:

SwipeDirection | horizontalDirection () const

### swipeAngle : const qreal

Holds the angle of the swipe gesture, 0..360.

Access functions:

qreal | swipeAngle () const

### verticalDirection : const SwipeDirection

Holds the direction for the vertical component of the swipe gesture, SwipeDirection::Down or SwipeDirection::Up. SwipeDirection::NoDirection if there is no vertical component to the swipe gesture.

Access functions:

SwipeDirection | verticalDirection () const

## Member Function Documentation

### QSwipeGesture::QSwipeGesture ( QWidget * gestureTarget, QObject * parent = 0 )

Creates a new Swipe gesture handler object and marks it as a child of parent. The swipe 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.