SwipeGestureHandler QML Type
The SwipeGestureHandler type provides a way to handle global swipe gestures. More...
Import Statement: | import org.kde.kwin |
Properties
- deviceType : enumeration
- direction : enumeration
- fingerCount : int
- progress : real
Signals
Detailed Description
Example usage:
SwipeGestureHandler { direction: SwipeGestureHandler.Direction.Up fingerCount: 3 onActivated: console.log("activated") }
Property Documentation
deviceType : enumeration |
This property specifies the input device that can trigger the swipe gesture.
Constant | Description |
---|---|
SwipeGestureHandler.Touchpad | The gesture is triggered by a touchpad input device. |
SwipeGestureHandler.Touchscreen | The gesture is triggered by a touchscreen input device. |
direction : enumeration |
This property specifies the direction of the swipe gesture. The default value is Direction::Invalid.
Constant | Description |
---|---|
SwipeGestureHandler.Invalid | No direction. |
SwipeGestureHandler.Down | Swipe downward. |
SwipeGestureHandler.Left | Swipe to the left. |
SwipeGestureHandler.Up | Swipe upward. |
SwipeGestureHandler.Right | Swipe to the right. |
fingerCount : int |
This property specifies the required number of fingers for swipe recognition.
progress : real |
This property specifies the progress of the swipe gesture. The progress ranges from 0.0 to 1.0.
Signal Documentation
activated() |
This signal is emitted when the swipe gesture is triggered, i.e. the progress() reaches 1.0.
Note: The corresponding handler is onActivated
.
cancelled() |
This signal is emitted when the swipe gesture is cancelled. A swipe gesture can be cancelled if the user lifts their fingers or moves the fingers in a different direction, etc.
Note: The corresponding handler is onCancelled
.