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

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

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


/**
 * 

Stack of widgets where only one widget is visible at a time

*

Java wrapper for Qt class QStackedLayout

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

Java wrapper for Qt enum QStackedLayout::StackingMode

*/ public enum StackingMode implements io.qt.QtEnumerator { StackOne(0), StackAll(1); private StackingMode(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 StackingMode resolve(int value) { switch (value) { case 0: return StackOne; case 1: return StackAll; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QStackedLayout::currentChanged(int)

*/ @io.qt.QtPropertyNotify(name="currentIndex") public final Signal1<@io.qt.QtPrimitiveType Integer> currentChanged = new Signal1<>(); /** *

See QStackedLayout::widgetRemoved(int)

*/ public final Signal1<@io.qt.QtPrimitiveType Integer> widgetRemoved = new Signal1<>(); /** *

See QStackedLayout::QStackedLayout()

*/ public QStackedLayout(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QStackedLayout instance); /** *

See QStackedLayout::QStackedLayout(QLayout*)

*/ public QStackedLayout(io.qt.widgets.QLayout parentLayout){ super((QPrivateConstructor)null); initialize_native(this, parentLayout); } private native static void initialize_native(QStackedLayout instance, io.qt.widgets.QLayout parentLayout); /** *

See QStackedLayout::QStackedLayout(QWidget*)

*/ public QStackedLayout(io.qt.widgets.QWidget parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QStackedLayout instance, io.qt.widgets.QWidget parent); /** *

See QStackedLayout::addWidget(QWidget*)

*/ @io.qt.QtUninvokable public final int stackWidget(io.qt.widgets.QWidget w){ if(QWidgetItem.hasWidgetItemV2(w)) throw new IllegalArgumentException("Widget is already a layout member."); java.util.Objects.requireNonNull(w, "Argument 'w': null not expected."); int __qt_return_value = stackWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(w)); if (w.parent()==null) { QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, w); } return __qt_return_value; } @io.qt.QtUninvokable private native int stackWidget_native_QWidget_ptr(long __this__nativeId, long w); /** *

See QStackedLayout::currentIndex()const

*/ @io.qt.QtPropertyReader(name="currentIndex") @io.qt.QtUninvokable public final int currentIndex(){ return currentIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int currentIndex_native_constfct(long __this__nativeId); /** *

See QStackedLayout::currentWidget()const

*/ @io.qt.QtUninvokable public final io.qt.widgets.QWidget currentWidget(){ return currentWidget_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.widgets.QWidget currentWidget_native_constfct(long __this__nativeId); /** *

See QStackedLayout::insertWidget(int,QWidget*)

*/ @io.qt.QtUninvokable public final int insertWidget(int index, io.qt.widgets.QWidget w){ if(QWidgetItem.hasWidgetItemV2(w)) throw new IllegalArgumentException("Widget is already a layout member."); java.util.Objects.requireNonNull(w, "Argument 'w': null not expected."); int __qt_return_value = insertWidget_native_int_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), index, QtJambi_LibraryUtilities.internal.checkedNativeId(w)); if (w.parent()==null) { QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, w); } return __qt_return_value; } @io.qt.QtUninvokable private native int insertWidget_native_int_QWidget_ptr(long __this__nativeId, int index, long w); /** *

See QStackedLayout::setCurrentIndex(int)

*/ @io.qt.QtPropertyWriter(name="currentIndex") public final void setCurrentIndex(int index){ setCurrentIndex_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), index); } private native void setCurrentIndex_native_int(long __this__nativeId, int index); /** *

See QStackedLayout::setCurrentWidget(QWidget*)

*/ public final void setCurrentWidget(io.qt.widgets.QWidget w){ setCurrentWidget_native_QWidget_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(w)); } private native void setCurrentWidget_native_QWidget_ptr(long __this__nativeId, long w); /** *

See QStackedLayout::setStackingMode(QStackedLayout::StackingMode)

*/ @io.qt.QtPropertyWriter(name="stackingMode") @io.qt.QtUninvokable public final void setStackingMode(io.qt.widgets.QStackedLayout.StackingMode stackingMode){ setStackingMode_native_QStackedLayout_StackingMode(QtJambi_LibraryUtilities.internal.nativeId(this), stackingMode.value()); } @io.qt.QtUninvokable private native void setStackingMode_native_QStackedLayout_StackingMode(long __this__nativeId, int stackingMode); /** *

See QStackedLayout::stackingMode()const

*/ @io.qt.QtPropertyReader(name="stackingMode") @io.qt.QtUninvokable public final io.qt.widgets.QStackedLayout.StackingMode stackingMode(){ return io.qt.widgets.QStackedLayout.StackingMode.resolve(stackingMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int stackingMode_native_constfct(long __this__nativeId); /** *

See QStackedLayout::widget(int)const

*/ @io.qt.QtUninvokable public final io.qt.widgets.QWidget widget(int arg__1){ return widget_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @io.qt.QtUninvokable private native io.qt.widgets.QWidget widget_native_int_constfct(long __this__nativeId, int arg__1); /** *

See QLayout::addItem(QLayoutItem*)

*/ @io.qt.QtUninvokable public void addItem(io.qt.widgets.QLayoutItem item){ java.util.Objects.requireNonNull(item, "Argument 'item': null not expected."); QWidget widget = item.widget(); if(widget==null){ throw new IllegalArgumentException("Only widgets can be added to QStackedLayout. Use QWidgetItem instead."); } addItem_native_QLayoutItem_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(item)); QtJambi_LibraryUtilities.internal.invalidateObject(item); if(widget!=null && widget.parent()==null){ QtJambi_LibraryUtilities.internal.addReferenceCount(this, io.qt.widgets.QLayout.class, "__rcLayoutedObjects", false, false, widget); } } @io.qt.QtUninvokable private native void addItem_native_QLayoutItem_ptr(long __this__nativeId, long item); /** *

See QLayout::count()const

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

See QLayoutItem::hasHeightForWidth()const

*/ @io.qt.QtUninvokable 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

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

See QLayout::itemAt(int)const

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

See QLayoutItem::minimumSize()const

*/ @io.qt.QtUninvokable public io.qt.core.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)

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

See QLayoutItem::sizeHint()const

*/ @io.qt.QtUninvokable public io.qt.core.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)

*/ @io.qt.QtUninvokable public io.qt.widgets.QLayoutItem takeAt(int arg__1){ io.qt.widgets.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; } @io.qt.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. */ @io.qt.NativeAccess protected QStackedLayout(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. */ @io.qt.NativeAccess protected QStackedLayout(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @io.qt.QtUninvokable private static native void initialize_native(QStackedLayout instance, QDeclarativeConstructor constructor); @io.qt.QtUninvokable void add_widget(QWidget widget){ stackWidget(widget); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy