Qt:Документация 4.3.2/qtextframeformat
Материал из Wiki.crossplatform.ru
![]() | Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
[править] QTextFrameFormat Class Reference
[модуль QtGui ]
The QTextFrameFormat class provides formatting information for frames in a QTextDocument. Далее...
#include <QTextFrameFormat>
Inherits QTextFormat.
Inherited by QTextTableFormat.
[править] Открытые типы
- enum BorderStyle { BorderStyle_None, BorderStyle_Dotted, BorderStyle_Dashed, BorderStyle_Solid, ..., BorderStyle_Outset }
- enum Position { InFlow, FloatLeft, FloatRight }
[править] Открытые функции
- QTextFrameFormat ()
- qreal border () const
- QBrush borderBrush () const
- BorderStyle borderStyle () const
- qreal bottomMargin () const
- QTextLength height () const
- bool isValid () const
- qreal leftMargin () const
- qreal margin () const
- qreal padding () const
- PageBreakFlags pageBreakPolicy () const
- Position position () const
- qreal rightMargin () const
- void setBorder ( qreal width )
- void setBorderBrush ( const QBrush & brush )
- void setBorderStyle ( BorderStyle style )
- void setBottomMargin ( qreal margin )
- void setHeight ( const QTextLength & height )
- void setHeight ( qreal height )
- void setLeftMargin ( qreal margin )
- void setMargin ( qreal margin )
- void setPadding ( qreal width )
- void setPageBreakPolicy ( PageBreakFlags policy )
- void setPosition ( Position policy )
- void setRightMargin ( qreal margin )
- void setTopMargin ( qreal margin )
- void setWidth ( const QTextLength & width )
- void setWidth ( qreal width )
- qreal topMargin () const
- QTextLength width () const
- 47 public functions inherited from QTextFormat
[править] Подробное описание
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.
[править] Описание типов
[править] enum QTextFrameFormat::BorderStyle
Константа | Значение |
---|---|
QTextFrameFormat::BorderStyle_None | 0 |
QTextFrameFormat::BorderStyle_Dotted | 1 |
QTextFrameFormat::BorderStyle_Dashed | 2 |
QTextFrameFormat::BorderStyle_Solid | 3 |
QTextFrameFormat::BorderStyle_Double | 4 |
QTextFrameFormat::BorderStyle_DotDash | 5 |
QTextFrameFormat::BorderStyle_DotDotDash | 6 |
QTextFrameFormat::BorderStyle_Groove | 7 |
QTextFrameFormat::BorderStyle_Ridge | 8 |
QTextFrameFormat::BorderStyle_Inset | 9 |
QTextFrameFormat::BorderStyle_Outset | 10 |
Данное перечисление было введено в Qt 4.3.
[править] enum QTextFrameFormat::Position
Константа | Значение |
---|---|
QTextFrameFormat::InFlow | 0 |
QTextFrameFormat::FloatLeft | 1 |
QTextFrameFormat::FloatRight | 2 |
[править] Описание функций-членов
[править] 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 also setBorder().
[править] QBrush QTextFrameFormat::borderBrush () const
Returns the brush used for the frame's border.
Эта функция была введена в Qt 4.3.
See also setBorderBrush().
[править] BorderStyle QTextFrameFormat::borderStyle () const
Returns the style of the frame's border.
Эта функция была введена в Qt 4.3.
See also setBorderStyle().
[править] qreal QTextFrameFormat::bottomMargin () const
Returns the width of the frame's bottom margin in pixels.
Эта функция была введена в Qt 4.3.
See also setBottomMargin().
[править] QTextLength QTextFrameFormat::height () const
Returns the height of the frame's border rectangle.
See also setHeight().
[править] 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.
Эта функция была введена в Qt 4.3.
See also setLeftMargin().
[править] qreal QTextFrameFormat::margin () const
Returns the width of the frame's external margin in pixels.
See also setMargin().
[править] qreal QTextFrameFormat::padding () const
Returns the width of the frame's internal padding in pixels.
See also setPadding().
[править] PageBreakFlags QTextFrameFormat::pageBreakPolicy () const
Returns the currently set page break policy for the frame/table. The default is QTextFormat::PageBreak_Auto.
Эта функция была введена в Qt 4.2.
See also setPageBreakPolicy().
[править] Position QTextFrameFormat::position () const
Returns the positioning policy for frames with this frame format.
See also setPosition().
[править] qreal QTextFrameFormat::rightMargin () const
Returns the width of the frame's right margin in pixels.
Эта функция была введена в Qt 4.3.
See also setRightMargin().
[править] void QTextFrameFormat::setBorder ( qreal width )
Sets the width (in pixels) of the frame's border.
See also border().
[править] void QTextFrameFormat::setBorderBrush ( const QBrush & brush )
Sets the brush used for the frame's border.
Эта функция была введена в Qt 4.3.
See also borderBrush().
[править] void QTextFrameFormat::setBorderStyle ( BorderStyle style )
Sets the style of the frame's border.
Эта функция была введена в Qt 4.3.
See also borderStyle().
[править] void QTextFrameFormat::setBottomMargin ( qreal margin )
Sets the frame's bottom margin in pixels.
Эта функция была введена в Qt 4.3.
See also bottomMargin().
[править] void QTextFrameFormat::setHeight ( const QTextLength & height )
Sets the frame's height.
See also height().
[править] void QTextFrameFormat::setHeight ( qreal height )
Эта перегруженная функция предоставлена для удобства.
Sets the frame's height.
[править] void QTextFrameFormat::setLeftMargin ( qreal margin )
Sets the frame's left margin in pixels.
Эта функция была введена в Qt 4.3.
See also leftMargin().
[править] void QTextFrameFormat::setMargin ( 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().
[править] void QTextFrameFormat::setPadding ( qreal width )
Sets the width of the frame's internal padding in pixels.
See also padding().
[править] void QTextFrameFormat::setPageBreakPolicy ( PageBreakFlags policy )
Sets the page break policy for the frame/table to policy.
Эта функция была введена в Qt 4.2.
See also pageBreakPolicy().
[править] void QTextFrameFormat::setPosition ( Position policy )
Sets the policy for positioning frames with this frame format.
See also position().
[править] void QTextFrameFormat::setRightMargin ( qreal margin )
Sets the frame's right margin in pixels.
Эта функция была введена в Qt 4.3.
See also rightMargin().
[править] void QTextFrameFormat::setTopMargin ( qreal margin )
Sets the frame's top margin in pixels.
Эта функция была введена в Qt 4.3.
See also topMargin().
[править] void QTextFrameFormat::setWidth ( const QTextLength & width )
Sets the frame's border rectangle's width.
See also width() and QTextLength.
[править] void QTextFrameFormat::setWidth ( qreal width )
Эта перегруженная функция предоставлена для удобства.
Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width.
[править] qreal QTextFrameFormat::topMargin () const
Returns the width of the frame's top margin in pixels.
Эта функция была введена в Qt 4.3.
See also setTopMargin().
[править] QTextLength QTextFrameFormat::width () const
Returns the width of the frame's border rectangle.
See also setWidth() and QTextLength.
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|