<class name="QTextBlockFormat" doc="/** <p>The <a href="QTextBlockFormat.html#QTextBlockFormat()"><tt>QTextBlockFormat</tt></a> class provides formatting information for blocks of text in a <a href="QTextDocument.html"><tt>QTextDocument</tt></a>.</p> <p>A document is composed of a list of blocks, represented by <a href="QTextBlock.html"><tt>QTextBlock</tt></a> objects. Each block can contain an item of some kind, such as a paragraph of text, a table, a list, or an image. Every block has an associated <a href="QTextBlockFormat.html#QTextBlockFormat()"><tt>QTextBlockFormat</tt></a> that specifies its characteristics.</p> <p>To cater for left-to-right and right-to-left languages you can set a block's direction with setDirection(). Paragraph alignment is set with <a href="QTextBlockFormat.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></a>. Margins are controlled by <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a>, <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a>, <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a>, <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a>. Overall indentation is set with <a href="QTextBlockFormat.html#setIndent(int)"><tt>setIndent</tt></a>, the indentation of the first line with <a href="QTextBlockFormat.html#setTextIndent(double)"><tt>setTextIndent</tt></a>.</p> <p>Line breaking can be enabled and disabled with <a href="QTextBlockFormat.html#setNonBreakableLines(boolean)"><tt>setNonBreakableLines</tt></a>.</p> <p>The brush used to paint the paragraph's background is set with setBackground(), and other aspects of the text's appearance can be customized by using the setProperty() function with the <tt>OutlinePen</tt>, <tt>ForegroundBrush</tt>, and <tt>BackgroundBrush</tt> <tt>QTextFormat::Property</tt> values.</p> <p>If a text block is part of a list, it can also have a list format that is accessible with the listFormat() function.</p> @see <a href="QTextBlock.html"><tt>QTextBlock</tt></a> @see <a href="QTextCharFormat.html"><tt>QTextCharFormat</tt></a> */"> <method name="public QTextBlockFormat()" doc="/** <p>Constructs a new <a href="QTextBlockFormat.html#QTextBlockFormat()"><tt>QTextBlockFormat</tt></a>.</p> */"/> <method name="public final com.trolltech.qt.core.Qt.Alignment alignment()" doc="/** <p>Returns the paragraph's alignment.</p> @see <a href="QTextBlockFormat.html#setAlignment(com.trolltech.qt.core.Qt.Alignment)"><tt>setAlignment</tt></a> */"/> <method name="public final double bottomMargin()" doc="/** <p>Returns the paragraph's bottom margin.</p> @see <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a> @see <a href="QTextBlockFormat.html#topMargin()"><tt>topMargin</tt></a> */"/> <method name="public final int indent()" doc="/** <p>Returns the paragraph's indent.</p> @see <a href="QTextBlockFormat.html#setIndent(int)"><tt>setIndent</tt></a> */"/> <method name="public final boolean isValid()" doc="/** <p>Returns true if this block format is valid; otherwise returns false.</p> */"/> <method name="public final double leftMargin()" doc="/** <p>Returns the paragraph's left margin.</p> @see <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> @see <a href="QTextBlockFormat.html#rightMargin()"><tt>rightMargin</tt></a> @see <a href="QTextBlockFormat.html#indent()"><tt>indent</tt></a> */"/> <method name="public final boolean nonBreakableLines()" doc="/** <p>Returns true if the lines in the paragraph are non-breakable; otherwise returns false.</p> @see <a href="QTextBlockFormat.html#setNonBreakableLines(boolean)"><tt>setNonBreakableLines</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QTextFormat.PageBreakFlags pageBreakPolicy()" doc="/** <p>Returns the currently set page break policy for the paragraph. The default is QTextFormat::PageBreak_Auto.</p> @see <a href="QTextBlockFormat.html#setPageBreakPolicy(com.trolltech.qt.gui.QTextFormat.PageBreakFlags)"><tt>setPageBreakPolicy</tt></a> */"/> <method name="public final double rightMargin()" doc="/** <p>Returns the paragraph's right margin.</p> @see <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a> @see <a href="QTextBlockFormat.html#leftMargin()"><tt>leftMargin</tt></a> */"/> <method name="public final void setAlignment(com.trolltech.qt.core.Qt.Alignment alignment)" doc="/** <p>Sets the paragraph's <tt>alignment</tt>.</p> @see <a href="QTextBlockFormat.html#alignment()"><tt>alignment</tt></a> */"/> <method name="public final void setBottomMargin(double margin)" doc="/** <p>Sets the paragraph's bottom <tt>margin</tt>.</p> @see <a href="QTextBlockFormat.html#bottomMargin()"><tt>bottomMargin</tt></a> @see <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a> @see <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> @see <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a> */"/> <method name="public final void setIndent(int indent)" doc="/** <p>Sets the paragraph's <tt>indent</tt>. Margins are set independently of indentation with <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> and setTextIdent().</p> @see <a href="QTextBlockFormat.html#indent()"><tt>indent</tt></a> */"/> <method name="public final void setLeftMargin(double margin)" doc="/** <p>Sets the paragraph's left <tt>margin</tt>. Indentation can be applied separately with <a href="QTextBlockFormat.html#setIndent(int)"><tt>setIndent</tt></a>.</p> @see <a href="QTextBlockFormat.html#leftMargin()"><tt>leftMargin</tt></a> @see <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a> @see <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a> @see <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a> */"/> <method name="public final void setNonBreakableLines(boolean b)" doc="/** <p>If <tt>b</tt> is true, the lines in the paragraph are treated as non-breakable; otherwise they are breakable.</p> @see <a href="QTextBlockFormat.html#nonBreakableLines()"><tt>nonBreakableLines</tt></a> */"/> <method name="public final void setPageBreakPolicy(com.trolltech.qt.gui.QTextFormat.PageBreakFlags flags)" doc="/** <p>Sets the page break policy for the paragraph to <tt>flags</tt>.</p> @see <a href="QTextBlockFormat.html#pageBreakPolicy()"><tt>pageBreakPolicy</tt></a> */"/> <method name="public final void setRightMargin(double margin)" doc="/** <p>Sets the paragraph's right <tt>margin</tt>.</p> @see <a href="QTextBlockFormat.html#rightMargin()"><tt>rightMargin</tt></a> @see <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> @see <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a> @see <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a> */"/> <method name="public final void setTextIndent(double margin)" doc="/** <p>Sets the <tt>margin</tt> for the first line in the block. This allows the first line of a paragraph to be indented differently to the other lines, enhancing the readability of the text.</p> @see <a href="QTextBlockFormat.html#textIndent()"><tt>textIndent</tt></a> @see <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> @see <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a> @see <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a> @see <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a> */"/> <method name="public final void setTopMargin(double margin)" doc="/** <p>Sets the paragraph's top <tt>margin</tt>.</p> @see <a href="QTextBlockFormat.html#topMargin()"><tt>topMargin</tt></a> @see <a href="QTextBlockFormat.html#setBottomMargin(double)"><tt>setBottomMargin</tt></a> @see <a href="QTextBlockFormat.html#setLeftMargin(double)"><tt>setLeftMargin</tt></a> @see <a href="QTextBlockFormat.html#setRightMargin(double)"><tt>setRightMargin</tt></a> */"/> <method name="public final double textIndent()" doc="/** <p>Returns the paragraph's text indent.</p> @see <a href="QTextBlockFormat.html#setTextIndent(double)"><tt>setTextIndent</tt></a> */"/> <method name="public final double topMargin()" doc="/** <p>Returns the paragraph's top margin.</p> @see <a href="QTextBlockFormat.html#setTopMargin(double)"><tt>setTopMargin</tt></a> @see <a href="QTextBlockFormat.html#bottomMargin()"><tt>bottomMargin</tt></a> */"/> </class>