Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QTextFrameFormat class provides formatting information for frames in a QTextDocument. More...
#include <QTextFrameFormat>
Inherits QTextFormat.
Inherited by QTextTableFormat.
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
A text frame groups together one or more blocks of text, providing a layer of structure larger than the paragraph. The format of a frame specifies how it is rendered and positioned on the screen. It does not directly specify the behavior of the text formatting within, but provides constraints on the layout of its children.
The frame format defines the width() and height() of the frame on the screen. Each frame can have a border() that surrounds its contents with a rectangular box. The border is surrounded by a margin() around the frame, and the contents of the frame are kept separate from the border by the frame's padding(). This scheme is similar to the box model used by Cascading Style Sheets for HTML pages.
The position() of a frame is set using setPosition() and determines how it is located relative to the surrounding text.
The validity of a QTextFrameFormat object can be determined with the isValid() function.
See also QTextFrame and QTextBlockFormat.
Constant | Value |
---|---|
QTextFrameFormat::InFlow | 0 |
QTextFrameFormat::FloatLeft | 1 |
QTextFrameFormat::FloatRight | 2 |
Constructs a text frame format object with the default properties.
Returns the width of the border in pixels.
See also setBorder().
Returns the height of the frame's border rectangle.
See also setHeight().
Returns true if the format description is valid; otherwise returns false.
Returns the width of the frame's external margin in pixels.
See also setMargin().
Returns the width of the frame's internal padding in pixels.
See also setPadding().
Returns the currently set page break policy for the frame/table. The default is QTextFormat::PageBreak_Auto.
This function was introduced in Qt 4.2.
See also setPageBreakPolicy().
Returns the positioning policy for frames with this frame format.
See also setPosition().
Sets the width (in pixels) of the frame's border.
See also border().
Sets the frame's height.
See also height().
This is an overloaded member function, provided for convenience.
Sets the frame's height.
Sets the frame's margin in pixels.
See also margin().
Sets the width of the frame's internal padding in pixels.
See also padding().
Sets the page break policy for the frame/table to policy.
This function was introduced in Qt 4.2.
See also pageBreakPolicy().
Sets the policy for positioning frames with this frame format.
See also position().
Sets the frame's border rectangle's width.
See also width() and QTextLength.
This is an overloaded member function, provided for convenience.
Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width.
Returns the width of the frame's border rectangle.
See also setWidth() and QTextLength.
Copyright © 2007 Trolltech | Trademarks | Qt 4.2.3 |