io.qt.gui.QTextDocumentFragment Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Represents a piece of formatted text from a QTextDocument
* Java wrapper for Qt class QTextDocumentFragment
*/
public class QTextDocumentFragment extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QTextDocumentFragment:: QTextDocumentFragment()
*/
public QTextDocumentFragment(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextDocumentFragment instance);
/**
* See QTextDocumentFragment:: QTextDocumentFragment(QTextCursor)
*/
public QTextDocumentFragment(io.qt.gui.@NonNull QTextCursor range){
super((QPrivateConstructor)null);
initialize_native(this, range);
}
private native static void initialize_native(QTextDocumentFragment instance, io.qt.gui.QTextCursor range);
/**
* See QTextDocumentFragment:: QTextDocumentFragment(QTextDocumentFragment)
*/
public QTextDocumentFragment(io.qt.gui.@NonNull QTextDocumentFragment rhs){
super((QPrivateConstructor)null);
initialize_native(this, rhs);
}
private native static void initialize_native(QTextDocumentFragment instance, io.qt.gui.QTextDocumentFragment rhs);
/**
* See QTextDocumentFragment:: QTextDocumentFragment(const QTextDocument*)
*/
public QTextDocumentFragment(io.qt.gui.@Nullable QTextDocument document){
super((QPrivateConstructor)null);
initialize_native(this, document);
}
private native static void initialize_native(QTextDocumentFragment instance, io.qt.gui.QTextDocument document);
/**
* See QTextDocumentFragment:: isEmpty()const
*/
@QtUninvokable
public final boolean isEmpty(){
return isEmpty_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isEmpty_native_constfct(long __this__nativeId);
/**
* See QTextDocumentFragment:: operator=(QTextDocumentFragment)
*/
@QtUninvokable
public final void assign(io.qt.gui.@NonNull QTextDocumentFragment rhs){
assign_native_cref_QTextDocumentFragment(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native void assign_native_cref_QTextDocumentFragment(long __this__nativeId, long rhs);
/**
* See QTextDocumentFragment:: toHtml()const
*/
@QtUninvokable
public final java.lang.@NonNull String toHtml(){
return toHtml_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String toHtml_native_constfct(long __this__nativeId);
/**
* See QTextDocumentFragment:: toMarkdown(QTextDocument::MarkdownFeatures)const
*/
@QtUninvokable
public final java.lang.@NonNull String toMarkdown(io.qt.gui.QTextDocument.@NonNull MarkdownFeatures features){
return toMarkdown_native_QTextDocument_MarkdownFeatures_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), features.value());
}
@QtUninvokable
private native java.lang.String toMarkdown_native_QTextDocument_MarkdownFeatures_constfct(long __this__nativeId, int features);
/**
* See QTextDocumentFragment:: toPlainText()const
*/
@QtUninvokable
public final java.lang.@NonNull String toPlainText(){
return toPlainText_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String toPlainText_native_constfct(long __this__nativeId);
/**
* See QTextDocumentFragment:: toRawText()const
*/
@QtUninvokable
public final java.lang.@NonNull String toRawText(){
return toRawText_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String toRawText_native_constfct(long __this__nativeId);
/**
* See QTextDocumentFragment:: fromHtml(QString, const QTextDocument*)
*/
public static io.qt.gui.@NonNull QTextDocumentFragment fromHtml(java.lang.@NonNull String html, io.qt.gui.@Nullable QTextDocument resourceProvider){
return fromHtml_native_cref_QString_const_QTextDocument_ptr(html, QtJambi_LibraryUtilities.internal.checkedNativeId(resourceProvider));
}
private native static io.qt.gui.QTextDocumentFragment fromHtml_native_cref_QString_const_QTextDocument_ptr(java.lang.String html, long resourceProvider);
/**
* See QTextDocumentFragment:: fromMarkdown(QString, QTextDocument::MarkdownFeatures)
*/
public static io.qt.gui.@NonNull QTextDocumentFragment fromMarkdown(java.lang.@NonNull String markdown, io.qt.gui.QTextDocument.@NonNull MarkdownFeatures features){
return fromMarkdown_native_cref_QString_QTextDocument_MarkdownFeatures(markdown, features.value());
}
private native static io.qt.gui.QTextDocumentFragment fromMarkdown_native_cref_QString_QTextDocument_MarkdownFeatures(java.lang.String markdown, int features);
/**
* See QTextDocumentFragment:: fromPlainText(QString)
*/
public native static io.qt.gui.@NonNull QTextDocumentFragment fromPlainText(java.lang.@NonNull String plainText);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QTextDocumentFragment(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QTextDocumentFragment:: QTextDocumentFragment(QTextDocumentFragment)
*/
@QtUninvokable
@Override
public QTextDocumentFragment clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QTextDocumentFragment clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #toMarkdown(io.qt.gui.QTextDocument.MarkdownFeatures)}
* with features = new io.qt.gui.QTextDocument.MarkdownFeatures(20236)
.
*/
@QtUninvokable
public final java.lang.@NonNull String toMarkdown() {
return toMarkdown(new io.qt.gui.QTextDocument.MarkdownFeatures(20236));
}
/**
* Overloaded function for {@link #toMarkdown(io.qt.gui.QTextDocument.MarkdownFeatures)}.
*/
@QtUninvokable
public final java.lang.@NonNull String toMarkdown(io.qt.gui.QTextDocument.@NonNull MarkdownFeature @NonNull... features) {
return toMarkdown(new io.qt.gui.QTextDocument.MarkdownFeatures(features));
}
/**
* Overloaded function for {@link #fromHtml(java.lang.String, io.qt.gui.QTextDocument)}
* with resourceProvider = null
.
*/
public static io.qt.gui.@NonNull QTextDocumentFragment fromHtml(java.lang.@NonNull String html) {
return fromHtml(html, (io.qt.gui.QTextDocument)null);
}
/**
* Overloaded function for {@link #fromMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)}
* with features = new io.qt.gui.QTextDocument.MarkdownFeatures(20236)
.
*/
public static io.qt.gui.@NonNull QTextDocumentFragment fromMarkdown(java.lang.@NonNull String markdown) {
return fromMarkdown(markdown, new io.qt.gui.QTextDocument.MarkdownFeatures(20236));
}
/**
* Overloaded function for {@link #fromMarkdown(java.lang.String, io.qt.gui.QTextDocument.MarkdownFeatures)}.
*/
public static io.qt.gui.@NonNull QTextDocumentFragment fromMarkdown(java.lang.@NonNull String markdown, io.qt.gui.QTextDocument.@NonNull MarkdownFeature @NonNull... features) {
return fromMarkdown(markdown, new io.qt.gui.QTextDocument.MarkdownFeatures(features));
}
}