Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument. More...
#include <QTextBlockFormat>
Inherits QTextFormat.
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument.
A document is composed of a list of blocks. Each block can contain an item of some kind, for example, a paragraph of text, a table, a list, or an image. Every block has an associated QTextBlockFormat that specifies its characteristics.
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 setAlignment(). Margins are controlled by setTopMargin(), setBottomMargin(), setLeftMargin(), setRightMargin(), and setFirstLineMargin(). Overall indentation is set with setIndent(). Line breaking is controlled with setNonBreakableLines(). The paragraph's background color is set with setBackgroundColor().
A text block can also have a list format (if is part of a list); this is accessible using listFormat().
QTextBlockFormat::LeftToRight | |
QTextBlockFormat::RightToLeft | |
QTextBlockFormat::AutoDirection |
Constructs a new QTextBlockFormat.
Returns the paragraph's alignment.
See also setAlignment().
Returns the paragraph's background color.
See also setBackgroundColor().
Returns the paragraph's bottom margin.
See also setBottomMargin() and topMargin().
Returns the text's direction.
See also setDirection().
Returns the paragraph's first line margin.
See also setFirstLineMargin().
Returns the paragraph's indent.
See also setIndent().
Returns true if this block format is valid; otherwise returns false.
Returns the paragraph's left margin.
See also setLeftMargin(), rightMargin(), and indent().
Returns true if the lines in the paragraph are non-breakable; otherwise returns false.
See also setNonBreakableLines().
Returns the paragraph's right margin.
See also setRightMargin() and leftMargin().
Sets the paragraph's alignment to alignment.
See also alignment().
Sets the paragraph's background color to color.
See also backgroundColor().
Sets the paragraph's bottom margin to margin.
See also bottomMargin(), setTopMargin(), setLeftMargin(), setRightMargin(), and setFirstLineMargin().
Sets the text's direction to dir.
See also direction().
Sets the paragraph's first line margin to margin.
See also firstLineMargin(), setLeftMargin(), setRightMargin(), setTopMargin(), and setBottomMargin().
Sets the paragraph's indent to indent. Margins are set independently of indentation, for example with, setLeftMargin() and setFirstLineMargin().
See also indent().
Sets the paragraph's left margin to margin. Indentation can be applied separately with setIndent().
See also leftMargin(), setRightMargin(), setTopMargin(), setBottomMargin(), and setFirstLineMargin().
If b is true, the lines in the paragraph are treated as non-breakable; otherwise they are breakable.
See also nonBreakableLines().
Sets the paragraph's right margin to margin.
See also rightMargin(), setLeftMargin(), setTopMargin(), setBottomMargin(), and setFirstLineMargin().
Sets the paragraph's top margin to margin.
See also topMargin(), setBottomMargin(), setLeftMargin(), setRightMargin(), and setFirstLineMargin().
Returns the paragraph's top margin.
See also setTopMargin() and bottomMargin().
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp1 |