io.qt.gui.QTextBlockFormat Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Formatting information for blocks of text in a QTextDocument
* Java wrapper for Qt class QTextBlockFormat
*/
public class QTextBlockFormat extends io.qt.gui.QTextFormat
implements java.lang.Cloneable
{
/**
* Java wrapper for Qt enum QTextBlockFormat::LineHeightTypes
*/
public enum LineHeightTypes implements QtEnumerator {
/**
* Representing QTextBlockFormat:: SingleHeight
*/
SingleHeight(0),
/**
* Representing QTextBlockFormat:: ProportionalHeight
*/
ProportionalHeight(1),
/**
* Representing QTextBlockFormat:: FixedHeight
*/
FixedHeight(2),
/**
* Representing QTextBlockFormat:: MinimumHeight
*/
MinimumHeight(3),
/**
* Representing QTextBlockFormat:: LineDistanceHeight
*/
LineDistanceHeight(4);
static {
QtJambi_LibraryUtilities.initialize();
}
private LineHeightTypes(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 LineHeightTypes resolve(int value) {
switch (value) {
case 0: return SingleHeight;
case 1: return ProportionalHeight;
case 2: return FixedHeight;
case 3: return MinimumHeight;
case 4: return LineDistanceHeight;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QTextBlockFormat::MarkerType
*/
public enum MarkerType implements QtEnumerator {
/**
* Representing QTextBlockFormat:: MarkerType:: NoMarker
*/
NoMarker(0),
/**
* Representing QTextBlockFormat:: MarkerType:: Unchecked
*/
Unchecked(1),
/**
* Representing QTextBlockFormat:: MarkerType:: Checked
*/
Checked(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private MarkerType(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 MarkerType resolve(int value) {
switch (value) {
case 0: return NoMarker;
case 1: return Unchecked;
case 2: return Checked;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QTextBlockFormat:: QTextBlockFormat()
*/
public QTextBlockFormat(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextBlockFormat instance);
/**
* See QTextBlockFormat:: QTextBlockFormat(QTextBlockFormat)
*/
public QTextBlockFormat(io.qt.gui.@NonNull QTextBlockFormat other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QTextBlockFormat instance, io.qt.gui.QTextBlockFormat other);
/**
* See QTextBlockFormat:: QTextBlockFormat(QTextFormat)
*/
protected QTextBlockFormat(io.qt.gui.@NonNull QTextFormat fmt){
super((QPrivateConstructor)null);
initialize_native(this, fmt);
}
private native static void initialize_native(QTextBlockFormat instance, io.qt.gui.QTextFormat fmt);
/**
* See QTextBlockFormat:: 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 QTextBlockFormat:: bottomMargin()const
*/
@QtUninvokable
public final double bottomMargin(){
return bottomMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double bottomMargin_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: headingLevel()const
*/
@QtUninvokable
public final int headingLevel(){
return headingLevel_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int headingLevel_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: indent()const
*/
@QtUninvokable
public final int indent(){
return indent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int indent_native_constfct(long __this__nativeId);
/**
* See QTextFormat:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: leftMargin()const
*/
@QtUninvokable
public final double leftMargin(){
return leftMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double leftMargin_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: lineHeight()const
*/
@QtUninvokable
public final double lineHeight(){
return lineHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double lineHeight_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: lineHeight(qreal, qreal)const
*/
@QtUninvokable
public final double lineHeight(double scriptLineHeight, double scaling){
return lineHeight_native_qreal_qreal_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), scriptLineHeight, scaling);
}
@QtUninvokable
private native double lineHeight_native_qreal_qreal_constfct(long __this__nativeId, double scriptLineHeight, double scaling);
/**
* See QTextBlockFormat:: lineHeightType()const
*/
@QtUninvokable
public final int lineHeightType(){
return lineHeightType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int lineHeightType_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: marker()const
*/
@QtUninvokable
public final io.qt.gui.QTextBlockFormat.@NonNull MarkerType marker(){
return io.qt.gui.QTextBlockFormat.MarkerType.resolve(marker_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int marker_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: nonBreakableLines()const
*/
@QtUninvokable
public final boolean nonBreakableLines(){
return nonBreakableLines_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean nonBreakableLines_native_constfct(long __this__nativeId);
/**
* See operator<<(QDataStream&, QTextBlockFormat)
*/
@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 operator>>(QDataStream&, QTextBlockFormat&)
*/
@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 QTextBlockFormat:: pageBreakPolicy()const
*/
@QtUninvokable
public final io.qt.gui.QTextFormat.@NonNull PageBreakFlags pageBreakPolicy(){
return new io.qt.gui.QTextFormat.PageBreakFlags(pageBreakPolicy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int pageBreakPolicy_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: rightMargin()const
*/
@QtUninvokable
public final double rightMargin(){
return rightMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double rightMargin_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: 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 QTextBlockFormat:: setBottomMargin(qreal)
*/
@QtUninvokable
public final void setBottomMargin(double margin){
setBottomMargin_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@QtUninvokable
private native void setBottomMargin_native_qreal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat:: setHeadingLevel(int)
*/
@QtUninvokable
public final void setHeadingLevel(int alevel){
setHeadingLevel_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), alevel);
}
@QtUninvokable
private native void setHeadingLevel_native_int(long __this__nativeId, int alevel);
/**
* See QTextBlockFormat:: setIndent(int)
*/
@QtUninvokable
public final void setIndent(int indent){
setIndent_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), indent);
}
@QtUninvokable
private native void setIndent_native_int(long __this__nativeId, int indent);
/**
* See QTextBlockFormat:: setLeftMargin(qreal)
*/
@QtUninvokable
public final void setLeftMargin(double margin){
setLeftMargin_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@QtUninvokable
private native void setLeftMargin_native_qreal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat:: setLineHeight(qreal, int)
*/
@QtUninvokable
public final void setLineHeight(double height, int heightType){
setLineHeight_native_qreal_int(QtJambi_LibraryUtilities.internal.nativeId(this), height, heightType);
}
@QtUninvokable
private native void setLineHeight_native_qreal_int(long __this__nativeId, double height, int heightType);
/**
* See QTextBlockFormat:: setMarker(QTextBlockFormat::MarkerType)
*/
@QtUninvokable
public final void setMarker(io.qt.gui.QTextBlockFormat.@NonNull MarkerType marker){
setMarker_native_QTextBlockFormat_MarkerType(QtJambi_LibraryUtilities.internal.nativeId(this), marker.value());
}
@QtUninvokable
private native void setMarker_native_QTextBlockFormat_MarkerType(long __this__nativeId, int marker);
/**
* See QTextBlockFormat:: setNonBreakableLines(bool)
*/
@QtUninvokable
public final void setNonBreakableLines(boolean b){
setNonBreakableLines_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b);
}
@QtUninvokable
private native void setNonBreakableLines_native_bool(long __this__nativeId, boolean b);
/**
* See QTextBlockFormat:: setPageBreakPolicy(QTextFormat::PageBreakFlags)
*/
@QtUninvokable
public final void setPageBreakPolicy(io.qt.gui.QTextFormat.@NonNull PageBreakFlags flags){
setPageBreakPolicy_native_QTextFormat_PageBreakFlags(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@QtUninvokable
private native void setPageBreakPolicy_native_QTextFormat_PageBreakFlags(long __this__nativeId, int flags);
/**
* See QTextBlockFormat:: setRightMargin(qreal)
*/
@QtUninvokable
public final void setRightMargin(double margin){
setRightMargin_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@QtUninvokable
private native void setRightMargin_native_qreal(long __this__nativeId, double margin);
/**
* See QTextBlockFormat:: setTabPositions(QList<QTextOption::Tab>)
*/
@QtUninvokable
public final void setTabPositions(java.util.@NonNull Collection extends io.qt.gui.QTextOption.@NonNull Tab> tabs){
setTabPositions_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), tabs);
}
@QtUninvokable
private native void setTabPositions_native_cref_QList(long __this__nativeId, java.util.Collection extends io.qt.gui.QTextOption.Tab> tabs);
/**
* See QTextBlockFormat:: setTextIndent(qreal)
*/
@QtUninvokable
public final void setTextIndent(double aindent){
setTextIndent_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), aindent);
}
@QtUninvokable
private native void setTextIndent_native_qreal(long __this__nativeId, double aindent);
/**
* See QTextBlockFormat:: setTopMargin(qreal)
*/
@QtUninvokable
public final void setTopMargin(double margin){
setTopMargin_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), margin);
}
@QtUninvokable
private native void setTopMargin_native_qreal(long __this__nativeId, double margin);
/**
* See swap(QTextBlockFormat&, QTextBlockFormat&)
*/
@QtUninvokable
public final void swap(io.qt.gui.@StrictNonNull QTextBlockFormat value2){
java.util.Objects.requireNonNull(value2, "Argument 'value2': null not expected.");
swap_native_ref_QTextBlockFormat(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(value2));
}
@QtUninvokable
private native void swap_native_ref_QTextBlockFormat(long __this__nativeId, long value2);
/**
* See QTextBlockFormat:: tabPositions()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList tabPositions(){
return tabPositions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList tabPositions_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: textIndent()const
*/
@QtUninvokable
public final double textIndent(){
return textIndent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double textIndent_native_constfct(long __this__nativeId);
/**
* See QTextBlockFormat:: topMargin()const
*/
@QtUninvokable
public final double topMargin(){
return topMargin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double topMargin_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QTextBlockFormat(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QTextBlockFormat:: QTextBlockFormat(QTextBlockFormat)
*/
@QtUninvokable
@Override
public QTextBlockFormat clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QTextBlockFormat clone_native(long __this_nativeId);
/**
* 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 #setPageBreakPolicy(io.qt.gui.QTextFormat.PageBreakFlags)}.
*/
@QtUninvokable
public final void setPageBreakPolicy(io.qt.gui.QTextFormat.@NonNull PageBreakFlag @NonNull... flags) {
setPageBreakPolicy(new io.qt.gui.QTextFormat.PageBreakFlags(flags));
}
}