io.qt.widgets.QSwipeGesture Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Describes a swipe gesture made by the user
* Java wrapper for Qt class QSwipeGesture
*/
public class QSwipeGesture extends io.qt.widgets.QGesture
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSwipeGesture.class);
/**
* Java wrapper for Qt enum QSwipeGesture::SwipeDirection
*/
public enum SwipeDirection implements QtEnumerator {
/**
* Representing QSwipeGesture:: NoDirection
*/
NoDirection(0),
/**
* Representing QSwipeGesture:: Left
*/
Left(1),
/**
* Representing QSwipeGesture:: Right
*/
Right(2),
/**
* Representing QSwipeGesture:: Up
*/
Up(3),
/**
* Representing QSwipeGesture:: Down
*/
Down(4);
static {
QtJambi_LibraryUtilities.initialize();
}
private SwipeDirection(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull SwipeDirection resolve(int value) {
switch (value) {
case 0: return NoDirection;
case 1: return Left;
case 2: return Right;
case 3: return Up;
case 4: return Down;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QSwipeGesture:: QSwipeGesture(QObject*)
*/
public QSwipeGesture(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QSwipeGesture instance, io.qt.core.QObject parent);
/**
* See QSwipeGesture:: horizontalDirection()const
*/
@QtPropertyReader(name="horizontalDirection")
@QtPropertyStored("false")
@QtUninvokable
public final io.qt.widgets.QSwipeGesture.@NonNull SwipeDirection horizontalDirection(){
return io.qt.widgets.QSwipeGesture.SwipeDirection.resolve(horizontalDirection_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int horizontalDirection_native_constfct(long __this__nativeId);
/**
* See QSwipeGesture:: setSwipeAngle(qreal)
*/
@QtPropertyWriter(name="swipeAngle")
@QtUninvokable
public final void setSwipeAngle(double value){
setSwipeAngle_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), value);
}
@QtUninvokable
private native void setSwipeAngle_native_qreal(long __this__nativeId, double value);
/**
* See QSwipeGesture:: swipeAngle()const
*/
@QtPropertyReader(name="swipeAngle")
@QtUninvokable
public final double swipeAngle(){
return swipeAngle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double swipeAngle_native_constfct(long __this__nativeId);
/**
* See QSwipeGesture:: verticalDirection()const
*/
@QtPropertyReader(name="verticalDirection")
@QtPropertyStored("false")
@QtUninvokable
public final io.qt.widgets.QSwipeGesture.@NonNull SwipeDirection verticalDirection(){
return io.qt.widgets.QSwipeGesture.SwipeDirection.resolve(verticalDirection_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int verticalDirection_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QSwipeGesture(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QSwipeGesture(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QSwipeGesture instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QSwipeGesture(io.qt.core.QObject)}
* with parent = null
.
*/
public QSwipeGesture() {
this((io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #horizontalDirection()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.widgets.QSwipeGesture.@NonNull SwipeDirection getHorizontalDirection() {
return horizontalDirection();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #swipeAngle()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final double getSwipeAngle() {
return swipeAngle();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #verticalDirection()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.widgets.QSwipeGesture.@NonNull SwipeDirection getVerticalDirection() {
return verticalDirection();
}
}