QTextFrameFormat Class Reference
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
- #include <QTextFrameFormat>
Inherits: QTextFormat.
Inherited by: QTextTableFormat.
Note: All functions in this class are reentrant.
Detailed Description
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.
Public Types
| Toggle details | enum QTextFrameFormat:: | BorderStyleBorderStyle { BorderStyle_None , BorderStyle_Dotted , BorderStyle_Dashed , BorderStyle_Solid , BorderStyle_Double , BorderStyle_DotDash , BorderStyle_DotDotDash , BorderStyle_Groove , BorderStyle_Ridge , BorderStyle_Inset , BorderStyle_Outset 10 ...} { BorderStyle_None , BorderStyle_Dotted , BorderStyle_Dashed , BorderStyle_Solid , BorderStyle_Double , BorderStyle_DotDash , BorderStyle_DotDotDash , BorderStyle_Groove , BorderStyle_Ridge , BorderStyle_Inset , BorderStyle_Outset 10 } | ||||||||||||||||||||||||
This enum describes different border styles for the text frame.
See also borderStyle() and FrameBorderStyle. | ||||||||||||||||||||||||||
Look up this member in the source code. | ||||||||||||||||||||||||||
| Toggle details | enum QTextFrameFormat:: | PositionPosition { InFlow , FloatLeft , FloatRight 2 ...} { InFlow , FloatLeft , FloatRight 2 } | ||||||||||||||||||||||||
Look up this member in the source code. | ||||||||||||||||||||||||||
Public Functions
| Toggle details | QTextFrameFormat | |
Constructs a text frame format object with the default properties. | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | borderborder () ()const |
Returns the width of the border in pixels. See also setBorder(). | ||
Look up this member in the source code. | ||
| Toggle details | QBrush QTextFrameFormat | borderBrushborderBrush () ()const |
Returns the brush used for the frame's border. See also setBorderBrush(). | ||
Look up this member in the source code. | ||
| Toggle details | BorderStyle QTextFrameFormat | borderStyleborderStyle () ()const |
Returns the style of the frame's border. See also setBorderStyle(). | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | bottomMarginbottomMargin () ()const |
Returns the width of the frame's bottom margin in pixels. See also setBottomMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | QTextLength QTextFrameFormat | heightheight () ()const |
Returns the height of the frame's border rectangle. See also setHeight(). | ||
Look up this member in the source code. | ||
| Toggle details | bool QTextFrameFormat | isValidisValid () ()const |
Returns true if the format description is valid; otherwise returns false. | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | leftMarginleftMargin () ()const |
Returns the width of the frame's left margin in pixels. See also setLeftMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | marginmargin () ()const |
Returns the width of the frame's external margin in pixels. See also setMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | paddingpadding () ()const |
Returns the width of the frame's internal padding in pixels. See also setPadding(). | ||
Look up this member in the source code. | ||
| Toggle details | PageBreakFlags QTextFrameFormat | pageBreakPolicypageBreakPolicy () ()const |
Returns the currently set page break policy for the frame/table. The default is QTextFormat::PageBreak_Auto. See also setPageBreakPolicy(). | ||
Look up this member in the source code. | ||
| Toggle details | Position QTextFrameFormat | positionposition () ()const |
Returns the positioning policy for frames with this frame format. See also setPosition(). | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | rightMarginrightMargin () ()const |
Returns the width of the frame's right margin in pixels. See also setRightMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setBordersetBorder ( qreal width ) ( qreal width ) |
Sets the width (in pixels) of the frame's border. See also border(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setBorderBrushsetBorderBrush ( const QBrush &brush ) ( const QBrush &brush ) |
Sets the brush used for the frame's border. See also borderBrush(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setBorderStylesetBorderStyle ( BorderStyle style ) ( BorderStyle style ) |
Sets the style of the frame's border. See also borderStyle(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setBottomMarginsetBottomMargin ( qreal margin ) ( qreal margin ) |
Sets the frame's bottom margin in pixels. See also bottomMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setHeightsetHeight ( const QTextLength &height ) ( const QTextLength &height ) |
Sets the frame's height. See also height(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setHeightsetHeight ( qreal height ) ( qreal height ) |
This is an overloaded function. Sets the frame's height. | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setLeftMarginsetLeftMargin ( qreal margin ) ( qreal margin ) |
Sets the frame's left margin in pixels. See also leftMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setMarginsetMargin ( qreal margin ) ( qreal margin ) |
Sets the frame's margin in pixels. This method also sets the left, right, top and bottom margins of the frame to the same value. The individual margins override the general margin. See also margin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setPaddingsetPadding ( qreal width ) ( qreal width ) |
Sets the width of the frame's internal padding in pixels. See also padding(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setPageBreakPolicysetPageBreakPolicy ( PageBreakFlags policy ) ( PageBreakFlags policy ) |
Sets the page break policy for the frame/table to policy. See also pageBreakPolicy(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setPositionsetPosition ( Position policy ) ( Position policy ) |
Sets the policy for positioning frames with this frame format. See also position(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setRightMarginsetRightMargin ( qreal margin ) ( qreal margin ) |
Sets the frame's right margin in pixels. See also rightMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setTopMarginsetTopMargin ( qreal margin ) ( qreal margin ) |
Sets the frame's top margin in pixels. See also topMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setWidthsetWidth ( const QTextLength &width ) ( const QTextLength &width ) |
Sets the frame's border rectangle's width. See also width() and QTextLength. | ||
Look up this member in the source code. | ||
| Toggle details | void QTextFrameFormat | setWidthsetWidth ( qreal width ) ( qreal width ) |
This is an overloaded function. Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width. | ||
Look up this member in the source code. | ||
| Toggle details | qreal QTextFrameFormat | topMargintopMargin () ()const |
Returns the width of the frame's top margin in pixels. See also setTopMargin(). | ||
Look up this member in the source code. | ||
| Toggle details | QTextLength QTextFrameFormat | widthwidth () ()const |
Returns the width of the frame's border rectangle. See also setWidth() and QTextLength. | ||
Look up this member in the source code. | ||


No notes