<class name="QTextDocumentFragment" doc="/**
&lt;p&gt;The &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; class represents a piece of formatted text from a &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; is a fragment of rich text, that can be inserted into a &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt;. A document fragment can be created from a &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt;, from a &lt;a href=&quot;QTextCursor.html&quot;&gt;&lt;tt&gt;QTextCursor&lt;/tt&gt;&lt;/a&gt;'s selection, or from another document fragment. Document fragments can also be created by the static functions, &lt;a href=&quot;QTextDocumentFragment.html#fromPlainText(java.lang.String)&quot;&gt;&lt;tt&gt;fromPlainText&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QTextDocumentFragment.html#fromHtml(java.lang.String, com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;fromHtml&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The contents of a document fragment can be obtained as plain text by using the &lt;a href=&quot;QTextDocumentFragment.html#toPlainText()&quot;&gt;&lt;tt&gt;toPlainText&lt;/tt&gt;&lt;/a&gt; function, or it can be obtained as HTML with &lt;a href=&quot;QTextDocumentFragment.html#toHtml()&quot;&gt;&lt;tt&gt;toHtml&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */">
    <method name="public QTextDocumentFragment(com.trolltech.qt.gui.QTextCursor range)" doc="/**
&lt;p&gt;Creates a &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; from the &lt;tt&gt;range&lt;/tt&gt;'s selection. If the cursor doesn't have a selection, the created fragment is empty.&lt;/p&gt;

@see &lt;a href=&quot;QTextDocumentFragment.html#isEmpty()&quot;&gt;&lt;tt&gt;isEmpty&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QTextCursor::selection&lt;/tt&gt; */"/>
    <method name="public QTextDocumentFragment()" doc="/**
&lt;p&gt;Constructs an empty &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QTextDocumentFragment.html#isEmpty()&quot;&gt;&lt;tt&gt;isEmpty&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QTextDocumentFragment(com.trolltech.qt.gui.QTextDocumentFragment rhs)" doc="/**
&lt;p&gt;Copy constructor. Creates a copy of the &lt;tt&gt;rhs&lt;/tt&gt; fragment.&lt;/p&gt;
 */"/>
    <method name="public QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument document)" doc="/**
&lt;p&gt;Converts the given &lt;tt&gt;document&lt;/tt&gt; into a &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt;. Note that the &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; only stores the document contents, not meta information like the document's title.&lt;/p&gt;
 */"/>
    <method name="public final boolean isEmpty()" doc="/**
&lt;p&gt;Returns true if the fragment is empty; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.String toHtml(com.trolltech.qt.core.QByteArray encoding)" doc="/**
&lt;p&gt;Returns the contents of the document fragment as HTML, using the specified &lt;tt&gt;encoding&lt;/tt&gt; (e.g&amp;#x2e;, &amp;quot;UTF-8&amp;quot;, &amp;quot;ISO 8859-1&amp;quot;).&lt;/p&gt;

@see &lt;a href=&quot;QTextDocumentFragment.html#toPlainText()&quot;&gt;&lt;tt&gt;toPlainText&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QTextDocument::toHtml&lt;/tt&gt;
@see &lt;a href=&quot;%2E%2E/core/QTextCodec.html&quot;&gt;&lt;tt&gt;QTextCodec&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String toHtml()"/>
    <method name="public final java.lang.String toPlainText()" doc="/**
&lt;p&gt;Returns the document fragment's text as plain text (i.e&amp;#x2e; with no formatting information).&lt;/p&gt;

@see &lt;a href=&quot;QTextDocumentFragment.html#toHtml()&quot;&gt;&lt;tt&gt;toHtml&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static com.trolltech.qt.gui.QTextDocumentFragment fromHtml(java.lang.String html)" doc="/**
&lt;p&gt;Returns a &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; based on the arbitrary piece of HTML in the given &lt;tt&gt;html&lt;/tt&gt;. The formatting is preserved as much as possible; for example, &amp;quot;&amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;&amp;quot; will become a document fragment with the text &amp;quot;bold&amp;quot; with a bold character format.&lt;/p&gt;
 */"/>
    <method name="public static com.trolltech.qt.gui.QTextDocumentFragment fromHtml(java.lang.String html, com.trolltech.qt.gui.QTextDocument resourceProvider)" doc="/**
&lt;p&gt;Returns a &lt;a href=&quot;QTextDocumentFragment.html#QTextDocumentFragment(com.trolltech.qt.gui.QTextDocument)&quot;&gt;&lt;tt&gt;QTextDocumentFragment&lt;/tt&gt;&lt;/a&gt; based on the arbitrary piece of HTML in the given &lt;tt&gt;html&lt;/tt&gt;. The formatting is preserved as much as possible; for example, &amp;quot;&amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;&amp;quot; will become a document fragment with the text &amp;quot;bold&amp;quot; with a bold character format.&lt;/p&gt;
&lt;p&gt;If the provided HTML contains references to external resources such as imported style sheets, then they will be loaded through the &lt;tt&gt;resourceProvider&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public native static com.trolltech.qt.gui.QTextDocumentFragment fromPlainText(java.lang.String plainText)" doc="/**
&lt;p&gt;Returns a document fragment that contains the given &lt;tt&gt;plainText&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;When inserting such a fragment into a &lt;a href=&quot;QTextDocument.html&quot;&gt;&lt;tt&gt;QTextDocument&lt;/tt&gt;&lt;/a&gt; the current char format of the &lt;a href=&quot;QTextCursor.html&quot;&gt;&lt;tt&gt;QTextCursor&lt;/tt&gt;&lt;/a&gt; used for insertion is used as format for the text.&lt;/p&gt;
 */"/>
</class>
