KTwoFingerSwipeRecognizer
Public Member Functions | |
KTwoFingerSwipeRecognizer () | |
~KTwoFingerSwipeRecognizer () override | |
QGesture * | create (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
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()
|
override |
Destructor.
Definition at line 36 of file ktwofingerswipe.cpp.
Member Function Documentation
◆ create()
Qt called this member to create a new QGesture object.
- Parameters
-
target The 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()
|
overridevirtual |
Handles the given event for the watched object and update the gesture object.
- Parameters
-
gesture The gesture object. watched The watched object. event The 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
-
i is negative, it will be set to null. i The 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
-
i is negative, it will be set to null. i The minimum distance.
Definition at line 134 of file ktwofingerswipe.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.