Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QTextFrameFormat Class

TheQTextFrameFormat class provides formatting information for frames in aQTextDocument.More...

Header:#include <QTextFrameFormat>
Inherits:QTextFormat
Inherited By:

QTextTableFormat

Note: All functions in this class arereentrant.

Public Types

enumBorderStyle { BorderStyle_None, BorderStyle_Dotted, BorderStyle_Dashed, BorderStyle_Solid, ..., BorderStyle_Outset }
enumPosition { InFlow, FloatLeft, FloatRight }

Public Functions

QTextFrameFormat()
qrealborder() const
QBrushborderBrush() const
BorderStyleborderStyle() const
qrealbottomMargin() const
QTextLengthheight() const
boolisValid() const
qrealleftMargin() const
qrealmargin() const
qrealpadding() const
PageBreakFlagspageBreakPolicy() const
Positionposition() const
qrealrightMargin() const
voidsetBorder(qreal width)
voidsetBorderBrush(const QBrush & brush)
voidsetBorderStyle(BorderStyle style)
voidsetBottomMargin(qreal margin)
voidsetHeight(const QTextLength & height)
voidsetHeight(qreal height)
voidsetLeftMargin(qreal margin)
voidsetMargin(qreal margin)
voidsetPadding(qreal width)
voidsetPageBreakPolicy(PageBreakFlags policy)
voidsetPosition(Position policy)
voidsetRightMargin(qreal margin)
voidsetTopMargin(qreal margin)
voidsetWidth(const QTextLength & width)
voidsetWidth(qreal width)
qrealtopMargin() const
QTextLengthwidth() const

Detailed Description

TheQTextFrameFormat class provides formatting information for frames in aQTextDocument.

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 thewidth() andheight() of the frame on the screen. Each frame can have aborder() that surrounds its contents with a rectangular box. The border is surrounded by amargin() around the frame, and the contents of the frame are kept separate from the border by the frame'spadding(). This scheme is similar to the box model used by Cascading Style Sheets for HTML pages.

Theposition() of a frame is set usingsetPosition() and determines how it is located relative to the surrounding text.

The validity of aQTextFrameFormat object can be determined with theisValid() function.

See alsoQTextFrame andQTextBlockFormat.

Member Type Documentation

enum QTextFrameFormat::BorderStyle

This enum describes different border styles for the text frame.

ConstantValue
QTextFrameFormat::BorderStyle_None0
QTextFrameFormat::BorderStyle_Dotted1
QTextFrameFormat::BorderStyle_Dashed2
QTextFrameFormat::BorderStyle_Solid3
QTextFrameFormat::BorderStyle_Double4
QTextFrameFormat::BorderStyle_DotDash5
QTextFrameFormat::BorderStyle_DotDotDash6
QTextFrameFormat::BorderStyle_Groove7
QTextFrameFormat::BorderStyle_Ridge8
QTextFrameFormat::BorderStyle_Inset9
QTextFrameFormat::BorderStyle_Outset10

This enum was introduced or modified in Qt 4.3.

See alsoborderStyle() andFrameBorderStyle.

enum QTextFrameFormat::Position

This enum describes how a frame is located relative to the surrounding text.

ConstantValue
QTextFrameFormat::InFlow0
QTextFrameFormat::FloatLeft1
QTextFrameFormat::FloatRight2

See alsoposition() andCssFloat.

Member Function Documentation

QTextFrameFormat::QTextFrameFormat()

Constructs a text frame format object with the default properties.

qreal QTextFrameFormat::border() const

Returns the width of the border in pixels.

See alsosetBorder().

QBrush QTextFrameFormat::borderBrush() const

Returns the brush used for the frame's border.

This function was introduced in Qt 4.3.

See alsosetBorderBrush().

BorderStyle QTextFrameFormat::borderStyle() const

Returns the style of the frame's border.

This function was introduced in Qt 4.3.

See alsosetBorderStyle().

qreal QTextFrameFormat::bottomMargin() const

Returns the width of the frame's bottom margin in pixels.

This function was introduced in Qt 4.3.

See alsosetBottomMargin().

QTextLength QTextFrameFormat::height() const

Returns the height of the frame's border rectangle.

See alsosetHeight().

bool QTextFrameFormat::isValid() const

Returns true if the format description is valid; otherwise returns false.

qreal QTextFrameFormat::leftMargin() const

Returns the width of the frame's left margin in pixels.

This function was introduced in Qt 4.3.

See alsosetLeftMargin().

qreal QTextFrameFormat::margin() const

Returns the width of the frame's external margin in pixels.

See alsosetMargin().

qreal QTextFrameFormat::padding() const

Returns the width of the frame's internal padding in pixels.

See alsosetPadding().

PageBreakFlags QTextFrameFormat::pageBreakPolicy() const

Returns the currently set page break policy for the frame/table. The default isQTextFormat::PageBreak_Auto.

This function was introduced in Qt 4.2.

See alsosetPageBreakPolicy().

Position QTextFrameFormat::position() const

Returns the positioning policy for frames with this frame format.

See alsosetPosition().

qreal QTextFrameFormat::rightMargin() const

Returns the width of the frame's right margin in pixels.

This function was introduced in Qt 4.3.

See alsosetRightMargin().

void QTextFrameFormat::setBorder(qreal width)

Sets thewidth (in pixels) of the frame's border.

See alsoborder().

void QTextFrameFormat::setBorderBrush(constQBrush & brush)

Sets thebrush used for the frame's border.

This function was introduced in Qt 4.3.

See alsoborderBrush().

void QTextFrameFormat::setBorderStyle(BorderStyle style)

Sets thestyle of the frame's border.

This function was introduced in Qt 4.3.

See alsoborderStyle().

void QTextFrameFormat::setBottomMargin(qreal margin)

Sets the frame's bottommargin in pixels.

This function was introduced in Qt 4.3.

See alsobottomMargin().

void QTextFrameFormat::setHeight(constQTextLength & height)

Sets the frame'sheight.

See alsoheight().

void QTextFrameFormat::setHeight(qreal height)

This is an overloaded function.

Sets the frame'sheight.

void QTextFrameFormat::setLeftMargin(qreal margin)

Sets the frame's leftmargin in pixels.

This function was introduced in Qt 4.3.

See alsoleftMargin().

void QTextFrameFormat::setMargin(qreal margin)

Sets the frame'smargin 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 alsomargin().

void QTextFrameFormat::setPadding(qreal width)

Sets thewidth of the frame's internal padding in pixels.

See alsopadding().

void QTextFrameFormat::setPageBreakPolicy(PageBreakFlags policy)

Sets the page break policy for the frame/table topolicy.

This function was introduced in Qt 4.2.

See alsopageBreakPolicy().

void QTextFrameFormat::setPosition(Position policy)

Sets thepolicy for positioning frames with this frame format.

See alsoposition().

void QTextFrameFormat::setRightMargin(qreal margin)

Sets the frame's rightmargin in pixels.

This function was introduced in Qt 4.3.

See alsorightMargin().

void QTextFrameFormat::setTopMargin(qreal margin)

Sets the frame's topmargin in pixels.

This function was introduced in Qt 4.3.

See alsotopMargin().

void QTextFrameFormat::setWidth(constQTextLength & width)

Sets the frame's border rectangle'swidth.

See alsowidth() andQTextLength.

void QTextFrameFormat::setWidth(qreal width)

This is an overloaded function.

Convenience method that sets the width of the frame's border rectangle's width to the specified fixedwidth.

qreal QTextFrameFormat::topMargin() const

Returns the width of the frame's top margin in pixels.

This function was introduced in Qt 4.3.

See alsosetTopMargin().

QTextLength QTextFrameFormat::width() const

Returns the width of the frame's border rectangle.

See alsosetWidth() andQTextLength.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp