io.qt.widgets.QScroller Maven / Gradle / Ivy
package io.qt.widgets;
/**
* Enables kinetic scrolling for any scrolling widget or graphics item
* Java wrapper for Qt class QScroller
*/
public final class QScroller extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QScroller.class);
/**
* Java wrapper for Qt enum QScroller::Input
*/
@io.qt.QtUnlistedEnum
public enum Input implements io.qt.QtEnumerator {
InputPress(1),
InputMove(2),
InputRelease(3);
private Input(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static Input resolve(int value) {
switch (value) {
case 1: return InputPress;
case 2: return InputMove;
case 3: return InputRelease;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QScroller::ScrollerGestureType
*/
@io.qt.QtUnlistedEnum
public enum ScrollerGestureType implements io.qt.QtEnumerator {
TouchGesture(0),
LeftMouseButtonGesture(1),
RightMouseButtonGesture(2),
MiddleMouseButtonGesture(3);
private ScrollerGestureType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static ScrollerGestureType resolve(int value) {
switch (value) {
case 0: return TouchGesture;
case 1: return LeftMouseButtonGesture;
case 2: return RightMouseButtonGesture;
case 3: return MiddleMouseButtonGesture;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QScroller::State
*/
public enum State implements io.qt.QtEnumerator {
Inactive(0),
Pressed(1),
Dragging(2),
Scrolling(3);
private State(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static State resolve(int value) {
switch (value) {
case 0: return Inactive;
case 1: return Pressed;
case 2: return Dragging;
case 3: return Scrolling;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QScroller::scrollerPropertiesChanged(QScrollerProperties)
*/
@io.qt.QtPropertyNotify(name="scrollerProperties")
public final Signal1 scrollerPropertiesChanged = new Signal1<>();
/**
* See QScroller::stateChanged(QScroller::State)
*/
@io.qt.QtPropertyNotify(name="state")
public final Signal1 stateChanged = new Signal1<>();
/**
* See QScroller::ensureVisible(QRectF,qreal,qreal)
*/
public final void ensureVisible(io.qt.core.QRectF rect, double xmargin, double ymargin){
ensureVisible_native_cref_QRectF_qtjambireal_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rect), xmargin, ymargin);
}
private native void ensureVisible_native_cref_QRectF_qtjambireal_qtjambireal(long __this__nativeId, long rect, double xmargin, double ymargin);
/**
* See QScroller::ensureVisible(QRectF,qreal,qreal,int)
*/
public final void ensureVisible(io.qt.core.QRectF rect, double xmargin, double ymargin, int scrollTime){
ensureVisible_native_cref_QRectF_qtjambireal_qtjambireal_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rect), xmargin, ymargin, scrollTime);
}
private native void ensureVisible_native_cref_QRectF_qtjambireal_qtjambireal_int(long __this__nativeId, long rect, double xmargin, double ymargin, int scrollTime);
/**
* See QScroller::finalPosition()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QPointF finalPosition(){
return finalPosition_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QPointF finalPosition_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #handleInput(io.qt.widgets.QScroller.Input, io.qt.core.QPointF, long)}
* with timestamp = 0
.
*/
@io.qt.QtUninvokable
public final boolean handleInput(io.qt.widgets.QScroller.Input input, io.qt.core.QPointF position) {
return handleInput(input, position, (long)0);
}
/**
* See QScroller::handleInput(QScroller::Input,QPointF,qint64)
*/
@io.qt.QtUninvokable
public final boolean handleInput(io.qt.widgets.QScroller.Input input, io.qt.core.QPointF position, long timestamp){
return handleInput_native_QScroller_Input_cref_QPointF_long_long(QtJambi_LibraryUtilities.internal.nativeId(this), input.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(position), timestamp);
}
@io.qt.QtUninvokable
private native boolean handleInput_native_QScroller_Input_cref_QPointF_long_long(long __this__nativeId, int input, long position, long timestamp);
/**
* See QScroller::pixelPerMeter()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QPointF pixelPerMeter(){
return pixelPerMeter_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QPointF pixelPerMeter_native_constfct(long __this__nativeId);
/**
* See QScroller::resendPrepareEvent()
*/
public final void resendPrepareEvent(){
resendPrepareEvent_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void resendPrepareEvent_native(long __this__nativeId);
/**
* See QScroller::scrollTo(QPointF)
*/
public final void scrollTo(io.qt.core.QPointF pos){
scrollTo_native_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pos));
}
private native void scrollTo_native_cref_QPointF(long __this__nativeId, long pos);
/**
* See QScroller::scrollTo(QPointF,int)
*/
public final void scrollTo(io.qt.core.QPointF pos, int scrollTime){
scrollTo_native_cref_QPointF_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(pos), scrollTime);
}
private native void scrollTo_native_cref_QPointF_int(long __this__nativeId, long pos, int scrollTime);
/**
* See QScroller::scrollerProperties()const
*/
@io.qt.QtPropertyReader(name="scrollerProperties")
@io.qt.QtUninvokable
public final io.qt.widgets.QScrollerProperties scrollerProperties(){
return scrollerProperties_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.widgets.QScrollerProperties scrollerProperties_native_constfct(long __this__nativeId);
/**
* See QScroller::setScrollerProperties(QScrollerProperties)
*/
@io.qt.QtPropertyWriter(name="scrollerProperties")
public final void setScrollerProperties(io.qt.widgets.QScrollerProperties prop){
setScrollerProperties_native_cref_QScrollerProperties(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(prop));
}
private native void setScrollerProperties_native_cref_QScrollerProperties(long __this__nativeId, long prop);
/**
* See QScroller::setSnapPositionsX(QList<qreal>)
*/
@io.qt.QtUninvokable
public final void setSnapPositionsX(java.util.Collection positions){
setSnapPositionsX_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), positions);
}
@io.qt.QtUninvokable
private native void setSnapPositionsX_native_cref_QList(long __this__nativeId, java.util.Collection positions);
/**
* See QScroller::setSnapPositionsX(qreal,qreal)
*/
@io.qt.QtUninvokable
public final void setSnapPositionsX(double first, double interval){
setSnapPositionsX_native_qtjambireal_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), first, interval);
}
@io.qt.QtUninvokable
private native void setSnapPositionsX_native_qtjambireal_qtjambireal(long __this__nativeId, double first, double interval);
/**
* See QScroller::setSnapPositionsY(QList<qreal>)
*/
@io.qt.QtUninvokable
public final void setSnapPositionsY(java.util.Collection positions){
setSnapPositionsY_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), positions);
}
@io.qt.QtUninvokable
private native void setSnapPositionsY_native_cref_QList(long __this__nativeId, java.util.Collection positions);
/**
* See QScroller::setSnapPositionsY(qreal,qreal)
*/
@io.qt.QtUninvokable
public final void setSnapPositionsY(double first, double interval){
setSnapPositionsY_native_qtjambireal_qtjambireal(QtJambi_LibraryUtilities.internal.nativeId(this), first, interval);
}
@io.qt.QtUninvokable
private native void setSnapPositionsY_native_qtjambireal_qtjambireal(long __this__nativeId, double first, double interval);
/**
*
*/
@io.qt.QtPropertyReader(name="state")
@io.qt.QtUninvokable
public final io.qt.widgets.QScroller.State state(){
return io.qt.widgets.QScroller.State.resolve(state_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int state_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final void stop(){
stop_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void stop_native(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.core.QObject target(){
return target_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QObject target_native_constfct(long __this__nativeId);
/**
* See QScroller::velocity()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QPointF velocity(){
return velocity_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QPointF velocity_native_constfct(long __this__nativeId);
/**
* See QScroller::activeScrollers()
*/
public native static io.qt.core.QList activeScrollers();
/**
* Overloaded function for {@link #grabGesture(io.qt.core.QObject, io.qt.widgets.QScroller.ScrollerGestureType)}
* with gestureType = io.qt.widgets.QScroller.ScrollerGestureType.TouchGesture
.
*/
public static io.qt.core.Qt.GestureType grabGesture(io.qt.core.QObject target) {
return grabGesture(target, io.qt.widgets.QScroller.ScrollerGestureType.TouchGesture);
}
/**
* See QScroller::grabGesture(QObject*,QScroller::ScrollerGestureType)
*/
public static io.qt.core.Qt.GestureType grabGesture(io.qt.core.QObject target, io.qt.widgets.QScroller.ScrollerGestureType gestureType){
return io.qt.core.Qt.GestureType.resolve(grabGesture_native_QObject_ptr_QScroller_ScrollerGestureType(QtJambi_LibraryUtilities.internal.checkedNativeId(target), gestureType.value()));
}
private native static int grabGesture_native_QObject_ptr_QScroller_ScrollerGestureType(long target, int gestureType);
/**
* See QScroller::grabbedGesture(QObject*)
*/
public static io.qt.core.Qt.GestureType grabbedGesture(io.qt.core.QObject target){
return io.qt.core.Qt.GestureType.resolve(grabbedGesture_native_QObject_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(target)));
}
private native static int grabbedGesture_native_QObject_ptr(long target);
/**
* See QScroller::hasScroller(QObject*)
*/
public static boolean hasScroller(io.qt.core.QObject target){
return hasScroller_native_QObject_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(target));
}
private native static boolean hasScroller_native_QObject_ptr(long target);
/**
* See QScroller::scroller(QObject*)
*/
public static io.qt.widgets.QScroller scroller(io.qt.core.QObject target){
return scroller_native_QObject_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(target));
}
private native static io.qt.widgets.QScroller scroller_native_QObject_ptr(long target);
/**
* See QScroller::ungrabGesture(QObject*)
*/
public static void ungrabGesture(io.qt.core.QObject target){
ungrabGesture_native_QObject_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(target));
}
private native static void ungrabGesture_native_QObject_ptr(long target);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QScroller(QPrivateConstructor p) { super(p); }
}