SwipeGestureHandler QML Type

The SwipeGestureHandler type provides a way to handle global swipe gestures. More...

Import Statement: import org.kde.kwin

Properties

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.

ConstantDescription
SwipeGestureHandler.TouchpadThe gesture is triggered by a touchpad input device.
SwipeGestureHandler.TouchscreenThe 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.

ConstantDescription
SwipeGestureHandler.InvalidNo direction.
SwipeGestureHandler.DownSwipe downward.
SwipeGestureHandler.LeftSwipe to the left.
SwipeGestureHandler.UpSwipe upward.
SwipeGestureHandler.RightSwipe 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.