io.qt.widgets.QSlider Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.widgets;
import io.qt.*;
/**
* Vertical or horizontal slider
* Java wrapper for Qt class QSlider
*/
public class QSlider extends io.qt.widgets.QAbstractSlider
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QSlider.class);
/**
* Java wrapper for Qt enum QSlider::TickPosition
*/
@QtRejectedEntries({"TicksLeft", "TicksRight"})
public enum TickPosition implements QtEnumerator {
/**
* Representing QSlider:: NoTicks
*/
NoTicks(0),
/**
* Representing QSlider:: TicksAbove
*/
TicksAbove(1),
/**
* Representing QSlider:: TicksLeft
*/
TicksLeft(1),
/**
* Representing QSlider:: TicksBelow
*/
TicksBelow(2),
/**
* Representing QSlider:: TicksRight
*/
TicksRight(2),
/**
* Representing QSlider:: TicksBothSides
*/
TicksBothSides(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private TickPosition(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 @NonNull TickPosition resolve(int value) {
switch (value) {
case 0: return NoTicks;
case 1: return TicksAbove;
case 2: return TicksBelow;
case 3: return TicksBothSides;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QSlider:: QSlider(QWidget*)
*/
public QSlider(io.qt.widgets.@Nullable QWidget parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QSlider instance, io.qt.widgets.QWidget parent);
/**
* See QSlider:: QSlider(Qt::Orientation, QWidget*)
*/
public QSlider(io.qt.core.Qt.@NonNull Orientation orientation, io.qt.widgets.@Nullable QWidget parent){
super((QPrivateConstructor)null);
initialize_native(this, orientation, parent);
}
private native static void initialize_native(QSlider instance, io.qt.core.Qt.Orientation orientation, io.qt.widgets.QWidget parent);
/**
* See QSlider:: setTickInterval(int)
*/
@QtPropertyWriter(name="tickInterval")
@QtUninvokable
public final void setTickInterval(int ti){
setTickInterval_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), ti);
}
@QtUninvokable
private native void setTickInterval_native_int(long __this__nativeId, int ti);
/**
* See QSlider:: setTickPosition(QSlider::TickPosition)
*/
@QtPropertyWriter(name="tickPosition")
@QtUninvokable
public final void setTickPosition(io.qt.widgets.QSlider.@NonNull TickPosition position){
setTickPosition_native_QSlider_TickPosition(QtJambi_LibraryUtilities.internal.nativeId(this), position.value());
}
@QtUninvokable
private native void setTickPosition_native_QSlider_TickPosition(long __this__nativeId, int position);
/**
* See QSlider:: tickInterval()const
*/
@QtPropertyReader(name="tickInterval")
@QtUninvokable
public final int tickInterval(){
return tickInterval_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int tickInterval_native_constfct(long __this__nativeId);
/**
* See QSlider:: tickPosition()const
*/
@QtPropertyReader(name="tickPosition")
@QtUninvokable
public final io.qt.widgets.QSlider.@NonNull TickPosition tickPosition(){
return io.qt.widgets.QSlider.TickPosition.resolve(tickPosition_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int tickPosition_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public boolean event(io.qt.core.@Nullable QEvent event){
return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(event));
}
@QtUninvokable
private native boolean event_native_QEvent_ptr(long __this__nativeId, long event);
/**
* See QSlider:: initStyleOption(QStyleOptionSlider*)const
*/
@QtUninvokable
protected void initStyleOption(io.qt.widgets.@Nullable QStyleOptionSlider option){
initStyleOption_native_QStyleOptionSlider_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option));
}
@QtUninvokable
private native void initStyleOption_native_QStyleOptionSlider_ptr_constfct(long __this__nativeId, long option);
/**
* See QWidget:: minimumSizeHint()const
*/
@QtUninvokable
@Override
public io.qt.core.@NonNull QSize minimumSizeHint(){
return minimumSizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize minimumSizeHint_native_constfct(long __this__nativeId);
/**
* See QWidget:: mouseMoveEvent(QMouseEvent*)
*/
@QtUninvokable
@Override
protected void mouseMoveEvent(io.qt.gui.@Nullable QMouseEvent ev){
mouseMoveEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ev));
}
@QtUninvokable
private native void mouseMoveEvent_native_QMouseEvent_ptr(long __this__nativeId, long ev);
/**
* See QWidget:: mousePressEvent(QMouseEvent*)
*/
@QtUninvokable
@Override
protected void mousePressEvent(io.qt.gui.@Nullable QMouseEvent ev){
mousePressEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ev));
}
@QtUninvokable
private native void mousePressEvent_native_QMouseEvent_ptr(long __this__nativeId, long ev);
/**
* See QWidget:: mouseReleaseEvent(QMouseEvent*)
*/
@QtUninvokable
@Override
protected void mouseReleaseEvent(io.qt.gui.@Nullable QMouseEvent ev){
mouseReleaseEvent_native_QMouseEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ev));
}
@QtUninvokable
private native void mouseReleaseEvent_native_QMouseEvent_ptr(long __this__nativeId, long ev);
/**
* See QWidget:: paintEvent(QPaintEvent*)
*/
@QtUninvokable
@Override
protected void paintEvent(io.qt.gui.@Nullable QPaintEvent ev){
paintEvent_native_QPaintEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ev));
}
@QtUninvokable
private native void paintEvent_native_QPaintEvent_ptr(long __this__nativeId, long ev);
/**
*
*/
@QtUninvokable
@Override
public io.qt.core.@NonNull QSize sizeHint(){
return sizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize sizeHint_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QSlider(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QSlider(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QSlider instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QSlider(io.qt.widgets.QWidget)}
* with parent = null
.
*/
public QSlider() {
this((io.qt.widgets.QWidget)null);
}
/**
* Overloaded constructor for {@link #QSlider(io.qt.core.Qt.Orientation, io.qt.widgets.QWidget)}
* with parent = null
.
*/
public QSlider(io.qt.core.Qt.@NonNull Orientation orientation) {
this(orientation, (io.qt.widgets.QWidget)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #tickInterval()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final int getTickInterval() {
return tickInterval();
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #tickPosition()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.widgets.QSlider.@NonNull TickPosition getTickPosition() {
return tickPosition();
}
}