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

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

The newest version!
package io.qt.widgets;


/**
 * 

Layout attribute describing horizontal and vertical resizing policy

*

Java wrapper for Qt class QSizePolicy

*/ public class QSizePolicy extends io.qt.QtObject implements java.lang.Cloneable { 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(QSizePolicy.class); /** *

Java wrapper for Qt enum QSizePolicy::ControlType

* * @see ControlTypes */ public enum ControlType implements io.qt.QtFlagEnumerator { DefaultType(1), ButtonBox(2), CheckBox(4), ComboBox(8), Frame(16), GroupBox(32), Label(64), Line(128), LineEdit(256), PushButton(512), RadioButton(1024), Slider(2048), SpinBox(4096), TabWidget(8192), ToolButton(16384); private ControlType(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public ControlTypes asFlags() { return new ControlTypes(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public ControlTypes combined(ControlType e) { return new ControlTypes(this, e); } /** * Creates a new {@link ControlTypes} from the entries. * @param values entries * @return new flag */ public static ControlTypes flags(ControlType ... values) { return new ControlTypes(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static ControlType resolve(int value) { switch (value) { case 1: return DefaultType; case 2: return ButtonBox; case 4: return CheckBox; case 8: return ComboBox; case 16: return Frame; case 32: return GroupBox; case 64: return Label; case 128: return Line; case 256: return LineEdit; case 512: return PushButton; case 1024: return RadioButton; case 2048: return Slider; case 4096: return SpinBox; case 8192: return TabWidget; case 16384: return ToolButton; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link ControlType} */ public static final class ControlTypes extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0x7b593f4c4a646573L; /** * Creates a new ControlTypes where the flags in args are set. * @param args enum entries */ public ControlTypes(ControlType ... args){ super(args); } /** * Creates a new ControlTypes with given value. * @param value */ public ControlTypes(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new ControlTypes */ @Override public final ControlTypes combined(ControlType e){ return new ControlTypes(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final ControlTypes setFlag(ControlType e){ super.setFlag(e); return this; } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final ControlTypes setFlag(ControlType e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this ControlTypes. * @return array of enum entries */ @Override public final ControlType[] flags(){ return super.flags(ControlType.values()); } /** * {@inheritDoc} */ @Override public final ControlTypes clone(){ return new ControlTypes(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(ControlTypes other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QSizePolicy::Policy

*/ public enum Policy implements io.qt.QtEnumerator { Fixed(0), Minimum(1), Maximum(4), Preferred(5), MinimumExpanding(3), Expanding(7), Ignored(13); private Policy(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 Policy resolve(int value) { switch (value) { case 0: return Fixed; case 1: return Minimum; case 4: return Maximum; case 5: return Preferred; case 3: return MinimumExpanding; case 7: return Expanding; case 13: return Ignored; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QSizePolicy::PolicyFlag

*/ public enum PolicyFlag implements io.qt.QtEnumerator { GrowFlag(1), ExpandFlag(2), ShrinkFlag(4), IgnoreFlag(8); private PolicyFlag(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 PolicyFlag resolve(int value) { switch (value) { case 1: return GrowFlag; case 2: return ExpandFlag; case 4: return ShrinkFlag; case 8: return IgnoreFlag; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QSizePolicy::QSizePolicy()

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

Overloaded constructor for {@link #QSizePolicy(io.qt.widgets.QSizePolicy.Policy, io.qt.widgets.QSizePolicy.Policy, io.qt.widgets.QSizePolicy.ControlType)} * with type = io.qt.widgets.QSizePolicy.ControlType.DefaultType.

*/ public QSizePolicy(io.qt.widgets.QSizePolicy.Policy horizontal, io.qt.widgets.QSizePolicy.Policy vertical) { this(horizontal, vertical, io.qt.widgets.QSizePolicy.ControlType.DefaultType); } /** *

See QSizePolicy::QSizePolicy(QSizePolicy::Policy,QSizePolicy::Policy,QSizePolicy::ControlType)

*/ public QSizePolicy(io.qt.widgets.QSizePolicy.Policy horizontal, io.qt.widgets.QSizePolicy.Policy vertical, io.qt.widgets.QSizePolicy.ControlType type){ super((QPrivateConstructor)null); initialize_native(this, horizontal, vertical, type); } private native static void initialize_native(QSizePolicy instance, io.qt.widgets.QSizePolicy.Policy horizontal, io.qt.widgets.QSizePolicy.Policy vertical, io.qt.widgets.QSizePolicy.ControlType type); /** *

See QSizePolicy::controlType()const

*/ @io.qt.QtUninvokable public final io.qt.widgets.QSizePolicy.ControlType controlType(){ return io.qt.widgets.QSizePolicy.ControlType.resolve(controlType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int controlType_native_constfct(long __this__nativeId); /** *

See QSizePolicy::expandingDirections()const

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

See QSizePolicy::hasHeightForWidth()const

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

See QSizePolicy::hasWidthForHeight()const

*/ @io.qt.QtUninvokable public final boolean hasWidthForHeight(){ return hasWidthForHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean hasWidthForHeight_native_constfct(long __this__nativeId); /** *

See QSizePolicy::horizontalPolicy()const

*/ @io.qt.QtUninvokable public final io.qt.widgets.QSizePolicy.Policy horizontalPolicy(){ return io.qt.widgets.QSizePolicy.Policy.resolve(horizontalPolicy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int horizontalPolicy_native_constfct(long __this__nativeId); /** *

See QSizePolicy::horizontalStretch()const

*/ @io.qt.QtUninvokable public final int horizontalStretch(){ return horizontalStretch_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int horizontalStretch_native_constfct(long __this__nativeId); @io.qt.QtUninvokable public void writeTo(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QSizePolicy::operator==(QSizePolicy)const

*/ @io.qt.QtUninvokable private final boolean operator_equal(io.qt.widgets.QSizePolicy s){ return operator_equal_native_cref_QSizePolicy_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(s)); } @io.qt.QtUninvokable private native boolean operator_equal_native_cref_QSizePolicy_constfct(long __this__nativeId, long s); @io.qt.QtUninvokable public void readFrom(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QSizePolicy::retainSizeWhenHidden()const

*/ @io.qt.QtUninvokable public final boolean retainSizeWhenHidden(){ return retainSizeWhenHidden_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean retainSizeWhenHidden_native_constfct(long __this__nativeId); /** *

See QSizePolicy::setControlType(QSizePolicy::ControlType)

*/ @io.qt.QtUninvokable public final void setControlType(io.qt.widgets.QSizePolicy.ControlType type){ setControlType_native_QSizePolicy_ControlType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value()); } @io.qt.QtUninvokable private native void setControlType_native_QSizePolicy_ControlType(long __this__nativeId, int type); /** *

See QSizePolicy::setHeightForWidth(bool)

*/ @io.qt.QtUninvokable public final void setHeightForWidth(boolean b){ setHeightForWidth_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b); } @io.qt.QtUninvokable private native void setHeightForWidth_native_bool(long __this__nativeId, boolean b); /** *

See QSizePolicy::setHorizontalPolicy(QSizePolicy::Policy)

*/ @io.qt.QtUninvokable public final void setHorizontalPolicy(io.qt.widgets.QSizePolicy.Policy d){ setHorizontalPolicy_native_QSizePolicy_Policy(QtJambi_LibraryUtilities.internal.nativeId(this), d.value()); } @io.qt.QtUninvokable private native void setHorizontalPolicy_native_QSizePolicy_Policy(long __this__nativeId, int d); /** *

See QSizePolicy::setHorizontalStretch(int)

*/ @io.qt.QtUninvokable public final void setHorizontalStretch(int stretchFactor){ setHorizontalStretch_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), stretchFactor); } @io.qt.QtUninvokable private native void setHorizontalStretch_native_int(long __this__nativeId, int stretchFactor); /** *

See QSizePolicy::setRetainSizeWhenHidden(bool)

*/ @io.qt.QtUninvokable public final void setRetainSizeWhenHidden(boolean retainSize){ setRetainSizeWhenHidden_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), retainSize); } @io.qt.QtUninvokable private native void setRetainSizeWhenHidden_native_bool(long __this__nativeId, boolean retainSize); /** *

See QSizePolicy::setVerticalPolicy(QSizePolicy::Policy)

*/ @io.qt.QtUninvokable public final void setVerticalPolicy(io.qt.widgets.QSizePolicy.Policy d){ setVerticalPolicy_native_QSizePolicy_Policy(QtJambi_LibraryUtilities.internal.nativeId(this), d.value()); } @io.qt.QtUninvokable private native void setVerticalPolicy_native_QSizePolicy_Policy(long __this__nativeId, int d); /** *

See QSizePolicy::setVerticalStretch(int)

*/ @io.qt.QtUninvokable public final void setVerticalStretch(int stretchFactor){ setVerticalStretch_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), stretchFactor); } @io.qt.QtUninvokable private native void setVerticalStretch_native_int(long __this__nativeId, int stretchFactor); /** *

See QSizePolicy::setWidthForHeight(bool)

*/ @io.qt.QtUninvokable public final void setWidthForHeight(boolean b){ setWidthForHeight_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b); } @io.qt.QtUninvokable private native void setWidthForHeight_native_bool(long __this__nativeId, boolean b); /** *

See QSizePolicy::transpose()

*/ @io.qt.QtUninvokable public final void transpose(){ transpose_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void transpose_native(long __this__nativeId); /** *

See QSizePolicy::transposed()const

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

See QSizePolicy::verticalPolicy()const

*/ @io.qt.QtUninvokable public final io.qt.widgets.QSizePolicy.Policy verticalPolicy(){ return io.qt.widgets.QSizePolicy.Policy.resolve(verticalPolicy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @io.qt.QtUninvokable private native int verticalPolicy_native_constfct(long __this__nativeId); /** *

See QSizePolicy::verticalStretch()const

*/ @io.qt.QtUninvokable public final int verticalStretch(){ return verticalStretch_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int verticalStretch_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QSizePolicy(QPrivateConstructor p) { super(p); } @Override @io.qt.QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.widgets.QSizePolicy) { return operator_equal((io.qt.widgets.QSizePolicy) other); } return false; } @io.qt.QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native static int hashCode_native(long __this_nativeId); @Override @io.qt.QtUninvokable public String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private static native String toString_native(long __this_nativeId); @Override public QSizePolicy clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QSizePolicy clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy