KTwoFingerSwipeRecognizer

Search for usage in LXR

KTwoFingerSwipeRecognizer Class Reference
Inheritance diagram for KTwoFingerSwipeRecognizer:

Public Member Functions

 KTwoFingerSwipeRecognizer ()
 
 ~KTwoFingerSwipeRecognizer () override
 
QGesturecreate (QObject *target) override
 
int maxSwipeTime () const
 
int minSswipeDistance () const
 
Result recognize (QGesture *gesture, QObject *watched, QEvent *event) override
 
void setMaxSwipeTime (int i)
 
void setSwipeDistance (int i)
 
- Public Member Functions inherited from QGestureRecognizer
virtual void reset (QGesture *gesture)
 

Additional Inherited Members

- Public Types inherited from QGestureRecognizer
typedef  Result
 
enum  ResultFlag
 
- Static Public Member Functions inherited from QGestureRecognizer
Qt::GestureType registerRecognizer (QGestureRecognizer *recognizer)
 
void unregisterRecognizer (Qt::GestureType type)
 
- Public Attributes inherited from QGestureRecognizer
 CancelGesture
 
 ConsumeEventHint
 
 FinishGesture
 
 Ignore
 
 MayBeGesture
 
 ResultHint_Mask
 
 ResultState_Mask
 
 TriggerGesture
 

Detailed Description

The recognizer for a two finger swipe gesture.

Provides the recognizer for a two finger swipe gesture. To adjust the maximum swipe time and the minimum swipe distance, for a valid swipe gesture:

See also
setMaxSwipeTime
setSwipeDistance
Since
5.83
Author
Steffen Hartleib steff.nosp@m.enha.nosp@m.rtlei.nosp@m.b@t-.nosp@m.onlin.nosp@m.e.de

Definition at line 115 of file ktwofingerswipe.h.

Constructor & Destructor Documentation

◆ KTwoFingerSwipeRecognizer()

KTwoFingerSwipeRecognizer::KTwoFingerSwipeRecognizer ( )

The constructor.

Definition at line 30 of file ktwofingerswipe.cpp.

◆ ~KTwoFingerSwipeRecognizer()

KTwoFingerSwipeRecognizer::~KTwoFingerSwipeRecognizer ( )
override

Destructor.

Definition at line 36 of file ktwofingerswipe.cpp.

Member Function Documentation

◆ create()

QGesture * KTwoFingerSwipeRecognizer::create ( QObject * target)
overridevirtual

Qt called this member to create a new QGesture object.

Parameters
targetThe target for the gesture.
Returns
The new QGesture object.

Reimplemented from QGestureRecognizer.

Definition at line 40 of file ktwofingerswipe.cpp.

◆ maxSwipeTime()

int KTwoFingerSwipeRecognizer::maxSwipeTime ( ) const
Returns
The maximum duration for the swipe gesture, in milliseconds.

Definition at line 115 of file ktwofingerswipe.cpp.

◆ minSswipeDistance()

int KTwoFingerSwipeRecognizer::minSswipeDistance ( ) const
Returns
The minimum distance for the swipe gesture.

Definition at line 129 of file ktwofingerswipe.cpp.

◆ recognize()

QGestureRecognizer::Result KTwoFingerSwipeRecognizer::recognize ( QGesture * gesture,
QObject * watched,
QEvent * event )
overridevirtual

Handles the given event for the watched object and update the gesture object.

Parameters
gestureThe gesture object.
watchedThe watched object.
eventThe event.
Returns
The result reflects how much of the gesture has been recognized.

Implements QGestureRecognizer.

Definition at line 46 of file ktwofingerswipe.cpp.

◆ setMaxSwipeTime()

void KTwoFingerSwipeRecognizer::setMaxSwipeTime ( int i)

Set the maximum duration of the swipe gesture.

If

Parameters
iis negative, it will be set to null.
iThe maximum duration in milliseconds.

Definition at line 120 of file ktwofingerswipe.cpp.

◆ setSwipeDistance()

void KTwoFingerSwipeRecognizer::setSwipeDistance ( int i)

Set the minimum distance of the swipe gesture.

If

Parameters
iis negative, it will be set to null.
iThe minimum distance.

Definition at line 134 of file ktwofingerswipe.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:19:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.