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

io.qt.gui.QTextLength Maven / Gradle / Ivy

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

import io.qt.*;


/**
 * 

Encapsulates the different types of length used in a QTextDocument

*

Java wrapper for Qt class QTextLength

*/ public class QTextLength extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QTextLength::Type

*/ public enum Type implements QtEnumerator { /** *

Representing QTextLength::VariableLength

*/ VariableLength(0), /** *

Representing QTextLength::FixedLength

*/ FixedLength(1), /** *

Representing QTextLength::PercentageLength

*/ PercentageLength(2); static { QtJambi_LibraryUtilities.initialize(); } private Type(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 Type resolve(int value) { switch (value) { case 0: return VariableLength; case 1: return FixedLength; case 2: return PercentageLength; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QTextLength::QTextLength()

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

See QTextLength::QTextLength(QTextLength)

*/ public QTextLength(io.qt.gui.@NonNull QTextLength other){ super((QPrivateConstructor)null); initialize_native(this, other); } private native static void initialize_native(QTextLength instance, io.qt.gui.QTextLength other); /** *

See QTextLength::QTextLength(QTextLength::Type,qreal)

*/ public QTextLength(io.qt.gui.QTextLength.@NonNull Type type, double value){ super((QPrivateConstructor)null); initialize_native(this, type, value); } private native static void initialize_native(QTextLength instance, io.qt.gui.QTextLength.Type type, double value); /** *

See operator<<(QDataStream&,QTextLength)

*/ @QtUninvokable public void writeTo(io.qt.core.@StrictNonNull 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)); } @QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QTextLength::operator==(QTextLength)const

*/ @QtUninvokable public final boolean equals(io.qt.gui.@NonNull QTextLength other){ return equals_native_cref_QTextLength_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native boolean equals_native_cref_QTextLength_constfct(long __this__nativeId, long other); /** *

See operator>>(QDataStream&,QTextLength&)

*/ @QtUninvokable public void readFrom(io.qt.core.@StrictNonNull 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)); } @QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QTextLength::rawValue()const

*/ @QtUninvokable public final double rawValue(){ return rawValue_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native double rawValue_native_constfct(long __this__nativeId); /** *

See QTextLength::type()const

*/ @QtUninvokable public final io.qt.gui.QTextLength.@NonNull Type type(){ return io.qt.gui.QTextLength.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int type_native_constfct(long __this__nativeId); /** *

See QTextLength::value(qreal)const

*/ @QtUninvokable public final double value(double maximumLength){ return value_native_qreal_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), maximumLength); } @QtUninvokable private native double value_native_qreal_constfct(long __this__nativeId, double maximumLength); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QTextLength(QPrivateConstructor p) { super(p); } /** *

See QTextLength::operator==(QTextLength)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.gui.QTextLength) { return equals((io.qt.gui.QTextLength) other); } return false; } /** * Returns the objects's hash code computed by qHash(QTextLength). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** *

See operator<<(QDebug,QTextLength)

*/ @QtUninvokable @Override public @NonNull String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private static native String toString_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QTextLength::QTextLength(QTextLength)

*/ @QtUninvokable @Override public QTextLength clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QTextLength clone_native(long __this_nativeId); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy