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

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

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

import io.qt.*;


/**
 * 

Description of general rich text properties

*

Java wrapper for Qt class QTextOption

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

Java wrapper for Qt enum QTextOption::Flag

* * @see Flags */ public enum Flag implements QtFlagEnumerator { /** *

Representing QTextOption::ShowTabsAndSpaces

*/ ShowTabsAndSpaces(1), /** *

Representing QTextOption::ShowLineAndParagraphSeparators

*/ ShowLineAndParagraphSeparators(2), /** *

Representing QTextOption::AddSpaceForLineAndParagraphSeparators

*/ AddSpaceForLineAndParagraphSeparators(4), /** *

Representing QTextOption::SuppressColors

*/ SuppressColors(8), /** *

Representing QTextOption::ShowDocumentTerminator

*/ ShowDocumentTerminator(16), /** *

Representing QTextOption::IncludeTrailingSpaces

*/ IncludeTrailingSpaces(-2147483648); static { QtJambi_LibraryUtilities.initialize(); } private Flag(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull Flags asFlags() { return new Flags(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull Flags combined(@NonNull Flag e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull Flags cleared(@NonNull Flag e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link Flags} from the entries. * @param values entries * @return new flag */ public static @NonNull Flags flags(@Nullable Flag @NonNull... values) { return new Flags(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Flag resolve(int value) { switch (value) { case 1: return ShowTabsAndSpaces; case 2: return ShowLineAndParagraphSeparators; case 4: return AddSpaceForLineAndParagraphSeparators; case 8: return SuppressColors; case 16: return ShowDocumentTerminator; case -2147483648: return IncludeTrailingSpaces; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link Flag} */ public static final class Flags extends QFlags implements Comparable { private static final long serialVersionUID = 0x92d9bce6c929c1c6L; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new Flags where the flags in args are set. * @param args enum entries */ public Flags(@Nullable Flag @NonNull... args){ super(args); } /** * Creates a new Flags with given value. * @param value */ public Flags(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new Flags */ @Override public final @NonNull Flags combined(@StrictNonNull Flag e){ return new Flags(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull Flags setFlag(@Nullable Flag e){ return setFlag(e, true); } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final @NonNull Flags setFlag(@Nullable Flag e, boolean on){ if (on) { setValue(value() | e.value()); }else { setValue(value() & ~e.value()); } return this; } /** * Returns an array of flag objects represented by this Flags. * @return array of enum entries */ @Override public final @NonNull Flag @NonNull[] flags(){ return super.flags(Flag.values()); } /** * {@inheritDoc} */ @Override public final @NonNull Flags clone(){ return new Flags(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull Flags other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QTextOption::TabType

*/ public enum TabType implements QtEnumerator { /** *

Representing QTextOption::LeftTab

*/ LeftTab(0), /** *

Representing QTextOption::RightTab

*/ RightTab(1), /** *

Representing QTextOption::CenterTab

*/ CenterTab(2), /** *

Representing QTextOption::DelimiterTab

*/ DelimiterTab(3); static { QtJambi_LibraryUtilities.initialize(); } private TabType(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 TabType resolve(int value) { switch (value) { case 0: return LeftTab; case 1: return RightTab; case 2: return CenterTab; case 3: return DelimiterTab; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QTextOption::WrapMode

*/ public enum WrapMode implements QtEnumerator { /** *

Representing QTextOption::NoWrap

*/ NoWrap(0), /** *

Representing QTextOption::WordWrap

*/ WordWrap(1), /** *

Representing QTextOption::ManualWrap

*/ ManualWrap(2), /** *

Representing QTextOption::WrapAnywhere

*/ WrapAnywhere(3), /** *

Representing QTextOption::WrapAtWordBoundaryOrAnywhere

*/ WrapAtWordBoundaryOrAnywhere(4); static { QtJambi_LibraryUtilities.initialize(); } private WrapMode(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 WrapMode resolve(int value) { switch (value) { case 0: return NoWrap; case 1: return WordWrap; case 2: return ManualWrap; case 3: return WrapAnywhere; case 4: return WrapAtWordBoundaryOrAnywhere; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt class QTextOption::Tab

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

See QTextOption::Tab::Tab()

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

See QTextOption::Tab::Tab(QTextOption::Tab)

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

See QTextOption::Tab::Tab(qreal,QTextOption::TabType,QChar)

*/ public Tab(double pos, io.qt.gui.QTextOption.@NonNull TabType tabType, char delim){ super((QPrivateConstructor)null); initialize_native(this, pos, tabType, delim); } private native static void initialize_native(Tab instance, double pos, io.qt.gui.QTextOption.TabType tabType, char delim); /** *

See QTextOption::Tab::operator==(QTextOption::Tab)const

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

See QTextOption::Tab::delimiter

*/ @QtUninvokable public final void setDelimiter(char delimiter){ setDelimiter_native_cref_QChar(QtJambi_LibraryUtilities.internal.nativeId(this), delimiter); } @QtUninvokable private native void setDelimiter_native_cref_QChar(long __this__nativeId, char delimiter); /** *

See QTextOption::Tab::delimiter

*/ @QtUninvokable public final char delimiter(){ return delimiter_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native char delimiter_native(long __this__nativeId); /** *

See QTextOption::Tab::position

*/ @QtUninvokable public final void setPosition(double position){ setPosition_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), position); } @QtUninvokable private native void setPosition_native_qreal(long __this__nativeId, double position); /** *

See QTextOption::Tab::position

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

See QTextOption::Tab::type

*/ @QtUninvokable public final void setType(io.qt.gui.QTextOption.@NonNull TabType type){ setType_native_cref_QTextOption_TabType(QtJambi_LibraryUtilities.internal.nativeId(this), type.value()); } @QtUninvokable private native void setType_native_cref_QTextOption_TabType(long __this__nativeId, int type); /** *

See QTextOption::Tab::type

*/ @QtUninvokable public final io.qt.gui.QTextOption.@NonNull TabType type(){ return io.qt.gui.QTextOption.TabType.resolve(type_native(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int type_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected Tab(QPrivateConstructor p) { super(p); } /** *

See QTextOption::Tab::operator==(QTextOption::Tab)const

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

Creates and returns a copy of this object.

See QTextOption::Tab::Tab(QTextOption::Tab)

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

Overloaded constructor for {@link #Tab(double, io.qt.gui.QTextOption.TabType, char)} * with delim = '\0'.

*/ public Tab(double pos, io.qt.gui.QTextOption.@NonNull TabType tabType) { this(pos, tabType, '\0'); } /** * @hidden *

Kotlin property getter. In Java use {@link #delimiter()} instead.

*/ @QtUninvokable public final char getDelimiter() { return delimiter(); } /** * @hidden *

Kotlin property getter. In Java use {@link #position()} instead.

*/ @QtUninvokable public final double getPosition() { return position(); } /** * @hidden *

Kotlin property getter. In Java use {@link #type()} instead.

*/ @QtUninvokable public final io.qt.gui.QTextOption.@NonNull TabType getType() { return type(); } } /** *

See QTextOption::QTextOption()

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

See QTextOption::QTextOption(QTextOption)

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

See QTextOption::QTextOption(Qt::Alignment)

*/ public QTextOption(io.qt.core.Qt.@NonNull Alignment alignment){ super((QPrivateConstructor)null); initialize_native(this, alignment); } private native static void initialize_native(QTextOption instance, io.qt.core.Qt.Alignment alignment); /** *

See QTextOption::alignment()const

*/ @QtUninvokable public final io.qt.core.Qt.@NonNull Alignment alignment(){ return new io.qt.core.Qt.Alignment(alignment_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int alignment_native_constfct(long __this__nativeId); /** *

See QTextOption::flags()const

*/ @QtUninvokable public final io.qt.gui.QTextOption.@NonNull Flags flags(){ return new io.qt.gui.QTextOption.Flags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int flags_native_constfct(long __this__nativeId); /** *

See QTextOption::operator=(QTextOption)

*/ @QtUninvokable public final void assign(io.qt.gui.@NonNull QTextOption o){ assign_native_cref_QTextOption(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o)); } @QtUninvokable private native void assign_native_cref_QTextOption(long __this__nativeId, long o); /** *

See QTextOption::setAlignment(Qt::Alignment)

*/ @QtUninvokable public final void setAlignment(io.qt.core.Qt.@NonNull Alignment alignment){ setAlignment_native_Qt_Alignment(QtJambi_LibraryUtilities.internal.nativeId(this), alignment.value()); } @QtUninvokable private native void setAlignment_native_Qt_Alignment(long __this__nativeId, int alignment); /** *

See QTextOption::setFlags(QTextOption::Flags)

*/ @QtUninvokable public final void setFlags(io.qt.gui.QTextOption.@NonNull Flags flags){ setFlags_native_QTextOption_Flags(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value()); } @QtUninvokable private native void setFlags_native_QTextOption_Flags(long __this__nativeId, int flags); /** *

See QTextOption::setTabArray(QList<qreal>)

*/ @QtUninvokable public final void setTabArray(java.util.@NonNull Collection tabStops){ setTabArray_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), tabStops); } @QtUninvokable private native void setTabArray_native_cref_QList(long __this__nativeId, java.util.Collection tabStops); /** *

See QTextOption::setTabStopDistance(qreal)

*/ @QtUninvokable public final void setTabStopDistance(double tabStopDistance){ setTabStopDistance_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), tabStopDistance); } @QtUninvokable private native void setTabStopDistance_native_qreal(long __this__nativeId, double tabStopDistance); /** *

See QTextOption::setTabs(QList<QTextOption::Tab>)

*/ @QtUninvokable public final void setTabs(java.util.@NonNull Collection tabStops){ setTabs_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), tabStops); } @QtUninvokable private native void setTabs_native_cref_QList(long __this__nativeId, java.util.Collection tabStops); /** *

See QTextOption::setTextDirection(Qt::LayoutDirection)

*/ @QtUninvokable public final void setTextDirection(io.qt.core.Qt.@NonNull LayoutDirection aDirection){ setTextDirection_native_Qt_LayoutDirection(QtJambi_LibraryUtilities.internal.nativeId(this), aDirection.value()); } @QtUninvokable private native void setTextDirection_native_Qt_LayoutDirection(long __this__nativeId, int aDirection); /** *

See QTextOption::setUseDesignMetrics(bool)

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

See QTextOption::setWrapMode(QTextOption::WrapMode)

*/ @QtUninvokable public final void setWrapMode(io.qt.gui.QTextOption.@NonNull WrapMode wrap){ setWrapMode_native_QTextOption_WrapMode(QtJambi_LibraryUtilities.internal.nativeId(this), wrap.value()); } @QtUninvokable private native void setWrapMode_native_QTextOption_WrapMode(long __this__nativeId, int wrap); /** *

See QTextOption::tabArray()const

*/ @QtUninvokable public final io.qt.core.@NonNull QList tabArray(){ return tabArray_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList tabArray_native_constfct(long __this__nativeId); /** *

See QTextOption::tabStopDistance()const

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

See QTextOption::tabs()const

*/ @QtUninvokable public final io.qt.core.@NonNull QList tabs(){ return tabs_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList tabs_native_constfct(long __this__nativeId); /** *

See QTextOption::textDirection()const

*/ @QtUninvokable public final io.qt.core.Qt.@NonNull LayoutDirection textDirection(){ return io.qt.core.Qt.LayoutDirection.resolve(textDirection_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int textDirection_native_constfct(long __this__nativeId); /** *

See QTextOption::useDesignMetrics()const

*/ @QtUninvokable public final boolean useDesignMetrics(){ return useDesignMetrics_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean useDesignMetrics_native_constfct(long __this__nativeId); /** *

See QTextOption::wrapMode()const

*/ @QtUninvokable public final io.qt.gui.QTextOption.@NonNull WrapMode wrapMode(){ return io.qt.gui.QTextOption.WrapMode.resolve(wrapMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int wrapMode_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QTextOption(QPrivateConstructor p) { super(p); } /** * Checks for equality by checking object's hash code. */ @Override @QtUninvokable public boolean equals(Object other) { if(other instanceof io.qt.gui.QTextOption) return hashCode()==other.hashCode(); else return super.equals(other); } /** * Returns the objects's hash code computed by qHash(QTextOption). */ @QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native static int hashCode_native(long __this_nativeId); /** *

Creates and returns a copy of this object.

See QTextOption::QTextOption(QTextOption)

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

Overloaded constructor for {@link #QTextOption(io.qt.core.Qt.Alignment)}.

*/ public QTextOption(io.qt.core.Qt.@NonNull AlignmentFlag @NonNull... alignment) { this(new io.qt.core.Qt.Alignment(alignment)); } /** *

Overloaded function for {@link #assign(io.qt.gui.QTextOption)}.

*/ @QtUninvokable public final void assign(io.qt.core.Qt.@NonNull Alignment o) { assign(new io.qt.gui.QTextOption(o)); } /** *

Overloaded function for {@link #setAlignment(io.qt.core.Qt.Alignment)}.

*/ @QtUninvokable public final void setAlignment(io.qt.core.Qt.@NonNull AlignmentFlag @NonNull... alignment) { setAlignment(new io.qt.core.Qt.Alignment(alignment)); } /** *

Overloaded function for {@link #setFlags(io.qt.gui.QTextOption.Flags)}.

*/ @QtUninvokable public final void setFlags(io.qt.gui.QTextOption.@NonNull Flag @NonNull... flags) { setFlags(new io.qt.gui.QTextOption.Flags(flags)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy