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.


Public Types

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

Properties


Public Functions

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

Additional Inherited Members


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.

ConstantValue
QSwipeGesture::NoDirection0
QSwipeGesture::Left1
QSwipeGesture::Right2
QSwipeGesture::Up3
QSwipeGesture::Down4


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.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt 4.6.0-tp1