All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.widgets.QBoxLayout Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.widgets;

import io.qt.*;


/**
 * 

Lines up child widgets horizontally or vertically

*

Java wrapper for Qt class QBoxLayout

*/ public class QBoxLayout extends io.qt.widgets.QLayout { /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QBoxLayout.class); /** *

Java wrapper for Qt enum QBoxLayout::Direction

*/ @QtUnlistedEnum @QtRejectedEntries({"Down", "Up"}) public enum Direction implements QtEnumerator { /** *

Representing QBoxLayout::LeftToRight

*/ LeftToRight(0), /** *

Representing QBoxLayout::RightToLeft

*/ RightToLeft(1), /** *

Representing QBoxLayout::TopToBottom

*/ TopToBottom(2), /** *

Representing QBoxLayout::BottomToTop

*/ BottomToTop(3), /** *

Representing QBoxLayout::Down

*/ Down(2), /** *

Representing QBoxLayout::Up

*/ Up(3); static { QtJambi_LibraryUtilities.initialize(); } private Direction(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 Direction resolve(int value) { switch (value) { case 0: return LeftToRight; case 1: return RightToLeft; case 2: return TopToBottom; case 3: return BottomToTop; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QBoxLayout::QBoxLayout(QBoxLayout::Direction,QWidget*)

*/ public QBoxLayout(io.qt.widgets.QBoxLayout.@NonNull Direction arg__1, io.qt.widgets.@Nullable QWidget parent){ super((QPrivateConstructor)null); initialize_native(this, arg__1, parent); } private native static void initialize_native(QBoxLayout instance, io.qt.widgets.QBoxLayout.Direction arg__1, io.qt.widgets.QWidget parent); /** *

See QBoxLayout::addLayout(QLayout*,int)

*/ @QtUninvokable public final void addLayout(io.qt.widgets.@Nullable QLayout layout, int stretch){ addLayout_native_QLayout_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(layout), stretch); } @QtUninvokable private native void addLayout_native_QLayout_ptr_int(long __this__nativeId, long layout, int stretch); /** *

See QBoxLayout::addSpacerItem(QSpacerItem*)

*/ @QtUninvokable public final void addSpacerItem(io.qt.widgets.@StrictNonNull QSpacerItem spacerItem){ java.util.Objects.requireNonNull(spacerItem, "Argument 'spacerItem': null not expected."); addSpacerItem_native_QSpacerItem_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(spacerItem)); QtJambi_LibraryUtilities.internal.setCppOwnership(spacerItem); } @QtUninvokable private native void addSpacerItem_native_QSpacerItem_ptr(long __this__nativeId, long spacerItem); /** *

See QBoxLayout::addSpacing(int)

*/ @QtUninvokable public final void addSpacing(int size){ addSpacing_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), size); } @QtUninvokable private native void addSpacing_native_int(long __this__nativeId, int size); /** *

See QBoxLayout::addStretch(int)

*/ @QtUninvokable public final void addStretch(int stretch){ addStretch_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), stretch); } @QtUninvokable private native void addStretch_native_int(long __this__nativeId, int stretch); /** *

See QBoxLayout::addStrut(int)

*/ @QtUninvokable public final void addStrut(int arg__1){ addStrut_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native void addStrut_native_int(long __this__nativeId, int arg__1); /** *

See QBoxLayout::addWidget(QWidget*,int,Qt::Alignment)

*/ @QtUninvokable public final void addWidget(io.qt.widgets.@StrictNonNull QWidget arg__1, int stretch, io.qt.core.Qt.@NonNull Alignment alignment){ if(QWidgetItem.hasWidgetItemV2(arg__1)) throw new IllegalArgumentException("Widget is already a layout member."); java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); addWidget_native_QWidget_ptr_int_Qt_Alignment(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1), stretch, alignment.value()); if (arg__1.parent()==null) { QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, arg__1); } } @QtUninvokable private native void addWidget_native_QWidget_ptr_int_Qt_Alignment(long __this__nativeId, long arg__1, int stretch, int alignment); /** *

See QBoxLayout::direction()const

*/ @QtUninvokable public final io.qt.widgets.QBoxLayout.@NonNull Direction direction(){ return io.qt.widgets.QBoxLayout.Direction.resolve(direction_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int direction_native_constfct(long __this__nativeId); /** *

See QBoxLayout::insertItem(int,QLayoutItem*)

*/ @QtUninvokable public final void insertItem(int index, io.qt.widgets.@StrictNonNull QLayoutItem arg__2){ java.util.Objects.requireNonNull(arg__2, "Argument 'arg__2': null not expected."); QWidget widget = arg__2.widget(); insertItem_native_int_QLayoutItem_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), index, QtJambi_LibraryUtilities.internal.checkedNativeId(arg__2)); QtJambi_LibraryUtilities.internal.setCppOwnership(arg__2); if(widget!=null && widget.parent()==null){ QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, widget); } } @QtUninvokable private native void insertItem_native_int_QLayoutItem_ptr(long __this__nativeId, int index, long arg__2); /** *

See QBoxLayout::insertLayout(int,QLayout*,int)

*/ @QtUninvokable public final void insertLayout(int index, io.qt.widgets.@Nullable QLayout layout, int stretch){ insertLayout_native_int_QLayout_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), index, QtJambi_LibraryUtilities.internal.checkedNativeId(layout), stretch); } @QtUninvokable private native void insertLayout_native_int_QLayout_ptr_int(long __this__nativeId, int index, long layout, int stretch); /** *

See QBoxLayout::insertSpacerItem(int,QSpacerItem*)

*/ @QtUninvokable public final void insertSpacerItem(int index, io.qt.widgets.@StrictNonNull QSpacerItem spacerItem){ java.util.Objects.requireNonNull(spacerItem, "Argument 'spacerItem': null not expected."); insertSpacerItem_native_int_QSpacerItem_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), index, QtJambi_LibraryUtilities.internal.checkedNativeId(spacerItem)); QtJambi_LibraryUtilities.internal.setCppOwnership(spacerItem); } @QtUninvokable private native void insertSpacerItem_native_int_QSpacerItem_ptr(long __this__nativeId, int index, long spacerItem); /** *

See QBoxLayout::insertSpacing(int,int)

*/ @QtUninvokable public final void insertSpacing(int index, int size){ insertSpacing_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), index, size); } @QtUninvokable private native void insertSpacing_native_int_int(long __this__nativeId, int index, int size); /** *

See QBoxLayout::insertStretch(int,int)

*/ @QtUninvokable public final void insertStretch(int index, int stretch){ insertStretch_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), index, stretch); } @QtUninvokable private native void insertStretch_native_int_int(long __this__nativeId, int index, int stretch); /** *

See QBoxLayout::insertWidget(int,QWidget*,int,Qt::Alignment)

*/ @QtUninvokable public final void insertWidget(int index, io.qt.widgets.@Nullable QWidget widget, int stretch, io.qt.core.Qt.@NonNull Alignment alignment){ if(QWidgetItem.hasWidgetItemV2(widget)) throw new IllegalArgumentException("Widget is already a layout member."); insertWidget_native_int_QWidget_ptr_int_Qt_Alignment(QtJambi_LibraryUtilities.internal.nativeId(this), index, QtJambi_LibraryUtilities.internal.checkedNativeId(widget), stretch, alignment.value()); if (widget != null && widget.parent()==null) { QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, widget); } } @QtUninvokable private native void insertWidget_native_int_QWidget_ptr_int_Qt_Alignment(long __this__nativeId, int index, long widget, int stretch, int alignment); /** *

See QBoxLayout::setDirection(QBoxLayout::Direction)

*/ @QtUninvokable public final void setDirection(io.qt.widgets.QBoxLayout.@NonNull Direction arg__1){ setDirection_native_QBoxLayout_Direction(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1.value()); } @QtUninvokable private native void setDirection_native_QBoxLayout_Direction(long __this__nativeId, int arg__1); /** *

See QBoxLayout::setSpacing(int)

*/ @QtUninvokable public final void setSpacing(int spacing){ setSpacing_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), spacing); } @QtUninvokable private native void setSpacing_native_int(long __this__nativeId, int spacing); /** *

See QBoxLayout::setStretch(int,int)

*/ @QtUninvokable public final void setStretch(int index, int stretch){ setStretch_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), index, stretch); } @QtUninvokable private native void setStretch_native_int_int(long __this__nativeId, int index, int stretch); /** *

See QBoxLayout::setStretchFactor(QLayout*,int)

*/ @QtUninvokable public final boolean setStretchFactor(io.qt.widgets.@Nullable QLayout l, int stretch){ return setStretchFactor_native_QLayout_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(l), stretch); } @QtUninvokable private native boolean setStretchFactor_native_QLayout_ptr_int(long __this__nativeId, long l, int stretch); /** *

See QBoxLayout::setStretchFactor(QWidget*,int)

*/ @QtUninvokable public final boolean setStretchFactor(io.qt.widgets.@Nullable QWidget w, int stretch){ return setStretchFactor_native_QWidget_ptr_int(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(w), stretch); } @QtUninvokable private native boolean setStretchFactor_native_QWidget_ptr_int(long __this__nativeId, long w, int stretch); /** *

See QBoxLayout::spacing()const

*/ @QtUninvokable public final int spacing(){ return spacing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int spacing_native_constfct(long __this__nativeId); /** *

See QBoxLayout::stretch(int)const

*/ @QtUninvokable public final int stretch(int index){ return stretch_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), index); } @QtUninvokable private native int stretch_native_int_constfct(long __this__nativeId, int index); /** *

See QLayout::addItem(QLayoutItem*)

*/ @QtUninvokable @Override public void addItem(io.qt.widgets.@StrictNonNull QLayoutItem arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); QWidget widget = arg__1.widget(); addItem_native_QLayoutItem_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); QtJambi_LibraryUtilities.internal.setCppOwnership(arg__1); if(widget!=null && widget.parent()==null){ QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, widget); } } @QtUninvokable private native void addItem_native_QLayoutItem_ptr(long __this__nativeId, long arg__1); /** *

See QLayout::count()const

*/ @QtUninvokable @Override public int count(){ return count_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int count_native_constfct(long __this__nativeId); /** *

See QLayoutItem::expandingDirections()const

*/ @QtUninvokable @Override public io.qt.core.Qt.@NonNull Orientations expandingDirections(){ return new io.qt.core.Qt.Orientations(expandingDirections_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } private native static int expandingDirections_native_constfct(long __this__nativeId); /** *

See QLayoutItem::hasHeightForWidth()const

*/ @QtUninvokable @Override public boolean hasHeightForWidth(){ return hasHeightForWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native static boolean hasHeightForWidth_native_constfct(long __this__nativeId); /** *

See QLayoutItem::heightForWidth(int)const

*/ @QtUninvokable @Override public int heightForWidth(int arg__1){ return heightForWidth_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } private native static int heightForWidth_native_int_constfct(long __this__nativeId, int arg__1); /** *

See QLayoutItem::invalidate()

*/ @QtUninvokable @Override public void invalidate(){ invalidate_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native static void invalidate_native(long __this__nativeId); /** *

See QLayout::itemAt(int)const

*/ @QtUninvokable @Override public io.qt.widgets.@Nullable QLayoutItem itemAt(int arg__1){ return itemAt_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native io.qt.widgets.QLayoutItem itemAt_native_int_constfct(long __this__nativeId, int arg__1); /** *

See QLayoutItem::maximumSize()const

*/ @QtUninvokable @Override public io.qt.core.@NonNull QSize maximumSize(){ return maximumSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native static io.qt.core.QSize maximumSize_native_constfct(long __this__nativeId); /** *

See QLayoutItem::minimumHeightForWidth(int)const

*/ @QtUninvokable @Override public int minimumHeightForWidth(int arg__1){ return minimumHeightForWidth_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } private native static int minimumHeightForWidth_native_int_constfct(long __this__nativeId, int arg__1); /** *

See QLayoutItem::minimumSize()const

*/ @QtUninvokable @Override public io.qt.core.@NonNull QSize minimumSize(){ return minimumSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native static io.qt.core.QSize minimumSize_native_constfct(long __this__nativeId); /** *

See QLayoutItem::setGeometry(QRect)

*/ @QtUninvokable @Override public void setGeometry(io.qt.core.@NonNull QRect arg__1){ setGeometry_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } private native static void setGeometry_native_cref_QRect(long __this__nativeId, long arg__1); /** *

See QLayoutItem::sizeHint()const

*/ @QtUninvokable @Override public io.qt.core.@NonNull QSize sizeHint(){ return sizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native static io.qt.core.QSize sizeHint_native_constfct(long __this__nativeId); /** *

See QLayout::takeAt(int)

*/ @QtUninvokable @Override public io.qt.widgets.@Nullable QLayoutItem takeAt(int arg__1){ io.qt.widgets.@Nullable QLayoutItem __qt_return_value = takeAt_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); if(__qt_return_value != null){ QtJambi_LibraryUtilities.internal.setDefaultOwnership(__qt_return_value); } if(__qt_return_value != null){ QtJambi_LibraryUtilities.internal.setDefaultOwnership(__qt_return_value); } return __qt_return_value; } @QtUninvokable private native io.qt.widgets.QLayoutItem takeAt_native_int(long __this__nativeId, int arg__1); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QBoxLayout(QPrivateConstructor p) { super(p); } @QtUninvokable void add_widget(QWidget widget){ addWidget(widget, 0); } /** *

Overloaded constructor for {@link #QBoxLayout(io.qt.widgets.QBoxLayout.Direction, io.qt.widgets.QWidget)} * with parent = null.

*/ public QBoxLayout(io.qt.widgets.QBoxLayout.@NonNull Direction arg__1) { this(arg__1, (io.qt.widgets.QWidget)null); } /** *

Overloaded function for {@link #addLayout(io.qt.widgets.QLayout, int)} * with stretch = 0.

*/ @QtUninvokable public final void addLayout(io.qt.widgets.@Nullable QLayout layout) { addLayout(layout, (int)0); } /** *

Overloaded function for {@link #addStretch(int)} * with stretch = 0.

*/ @QtUninvokable public final void addStretch() { addStretch((int)0); } /** *

Overloaded function for {@link #addWidget(io.qt.widgets.QWidget, int, io.qt.core.Qt.Alignment)} * with alignment = new io.qt.core.Qt.Alignment(0).

*/ @QtUninvokable public final void addWidget(io.qt.widgets.@StrictNonNull QWidget arg__1, int stretch) { addWidget(arg__1, stretch, new io.qt.core.Qt.Alignment(0)); } /** *

Overloaded function for {@link #addWidget(io.qt.widgets.QWidget, int, io.qt.core.Qt.Alignment)}.

*/ @QtUninvokable public final void addWidget(io.qt.widgets.@StrictNonNull QWidget arg__1, int stretch, io.qt.core.Qt.@NonNull AlignmentFlag @NonNull... alignment) { addWidget(arg__1, stretch, new io.qt.core.Qt.Alignment(alignment)); } /** *

Overloaded function for {@link #insertLayout(int, io.qt.widgets.QLayout, int)} * with stretch = 0.

*/ @QtUninvokable public final void insertLayout(int index, io.qt.widgets.@Nullable QLayout layout) { insertLayout(index, layout, (int)0); } /** *

Overloaded function for {@link #insertStretch(int, int)} * with stretch = 0.

*/ @QtUninvokable public final void insertStretch(int index) { insertStretch(index, (int)0); } /** *

Overloaded function for {@link #insertWidget(int, io.qt.widgets.QWidget, int, io.qt.core.Qt.Alignment)} * with alignment = new io.qt.core.Qt.Alignment(0).

*/ @QtUninvokable public final void insertWidget(int index, io.qt.widgets.@Nullable QWidget widget, int stretch) { insertWidget(index, widget, stretch, new io.qt.core.Qt.Alignment(0)); } /** *

Overloaded function for {@link #insertWidget(int, io.qt.widgets.QWidget, int, io.qt.core.Qt.Alignment)}

*

with:

    *
  • stretch = 0
  • *
  • alignment = new io.qt.core.Qt.Alignment(0)
  • *
*/ @QtUninvokable public final void insertWidget(int index, io.qt.widgets.@Nullable QWidget widget) { insertWidget(index, widget, (int)0, new io.qt.core.Qt.Alignment(0)); } /** *

Overloaded function for {@link #insertWidget(int, io.qt.widgets.QWidget, int, io.qt.core.Qt.Alignment)}.

*/ @QtUninvokable public final void insertWidget(int index, io.qt.widgets.@Nullable QWidget widget, int stretch, io.qt.core.Qt.@NonNull AlignmentFlag @NonNull... alignment) { insertWidget(index, widget, stretch, new io.qt.core.Qt.Alignment(alignment)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy