Pages
API Documentation
On this page

KTwoFingerSwipe Class

A two finger swipe gesture. More...

  • Header: #include <KTwoFingerSwipe>
  • CMake: find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
    target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)
  • Inherits: QGesture

List of all members, including inherited members

Properties

Public Functions

Detailed Description

Provides a class for a two finger swipe gesture.

Note: The QGestureManager need a QMainwindow, to delivery the gesture.

Property Documentation

pos : QPointF

Access functions:

  • QPointF pos() const
  • void setPos(QPointF pos)

scenePos : QPointF

Access functions:

screenPos : QPointF

Access functions:

swipeAngle : qreal

Access functions:

Member Function Documentation

[explicit] KTwoFingerSwipe::KTwoFingerSwipe(QObject *parent = nullptr)

The constructor.

QPointF KTwoFingerSwipe::pos() const

Returns the start position of the gesture, relative to the widget that received the gesture.

Note: This is not necessarily the same position as in the widget that grabGesture() uses.

Note: Getter function for property pos.

See also setPos()

QPointF KTwoFingerSwipe::scenePos() const

Return the start scene position of the gesture.

Note: Getter function for property scenePos.

See also setScenePos()

QPointF KTwoFingerSwipe::screenPos() const

Returns the start screen position of the gesture.

Note: Getter function for property screenPos.

See also setScreenPos()

void KTwoFingerSwipe::setPos(QPointF pos)

Sets the position, relative to the widget.

pos The position.

Note: Setter function for property pos.

See also pos()

void KTwoFingerSwipe::setScenePos(QPointF scenePos)

Sets the scene position.

scenePos The scene position, identical to the screen position for widgets.

Note: Setter function for property scenePos.

See also scenePos()

void KTwoFingerSwipe::setScreenPos(QPointF screenPos)

Sets the screen position.

screenPos The screen position.

Note: Setter function for property screenPos.

See also screenPos()

void KTwoFingerSwipe::setSwipeAngle(qreal swipeAngle)

Sets the angle of the swipe gesture

swipeAngle The angle.

Note: Setter function for property swipeAngle.

See also swipeAngle()

qreal KTwoFingerSwipe::swipeAngle() const

Returns the angle of the swipe gesture.

Note: Getter function for property swipeAngle.

See also setSwipeAngle()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.