QTextFormat Class Reference
|
Constant | Value |
---|---|
QTextFormat::InvalidFormat | -1 |
QTextFormat::BlockFormat | 1 |
QTextFormat::CharFormat | 2 |
QTextFormat::ListFormat | 3 |
QTextFormat::TableFormat | 4 |
QTextFormat::FrameFormat | 5 |
QTextFormat::UserFormat | 100 |
Constant | Value | Description |
---|---|---|
QTextFormat::NoObject | 0 | |
QTextFormat::ImageObject | 1 | |
QTextFormat::TableObject | 2 | |
QTextFormat::TableCellObject | 3 | |
QTextFormat::UserObject | 0x1000 | The first object that can be used for application-specific purposes. |
Constant | Value | Description |
---|---|---|
QTextFormat::PageBreak_Auto | 0 | The page break is determined automatically depending on the available space on the current page |
QTextFormat::PageBreak_AlwaysBefore | 0x001 | The page is always broken before the paragraph/table |
QTextFormat::PageBreak_AlwaysAfter | 0x010 | A new page is always started after the paragraph/table |
This enum was introduced in Qt 4.2.
The PageBreakFlags type is a typedef for QFlags<PageBreakFlag>. It stores an OR combination of PageBreakFlag values.
Constant | Value |
---|---|
QTextFormat::ObjectIndex | 0x0 |
Paragraph and character properties
Constant | Value | Description |
---|---|---|
QTextFormat::CssFloat | 0x0800 | |
QTextFormat::LayoutDirection | 0x0801 | The layout direction of the text in the document (Qt::LayoutDirection). |
QTextFormat::OutlinePen | 0x810 | |
QTextFormat::ForegroundBrush | 0x821 | |
QTextFormat::BackgroundBrush | 0x820 | |
QTextFormat::BackgroundImageUrl | 0x823 |
Paragraph properties
Constant | Value | Description |
---|---|---|
QTextFormat::BlockAlignment | 0x1010 | |
QTextFormat::BlockTopMargin | 0x1030 | |
QTextFormat::BlockBottomMargin | 0x1031 | |
QTextFormat::BlockLeftMargin | 0x1032 | |
QTextFormat::BlockRightMargin | 0x1033 | |
QTextFormat::TextIndent | 0x1034 | |
QTextFormat::TabPositions | 0x1035 | Specifies the tab positions. The tab positions are structs of QTextOption::Tab which are stored in a QList (internally, in a QList<QVariant>). |
QTextFormat::BlockIndent | 0x1040 | |
QTextFormat::BlockNonBreakableLines | 0x1050 | |
QTextFormat::BlockTrailingHorizontalRulerWidth | 0x1060 |
Character properties
Constant | Value | Description |
---|---|---|
QTextFormat::FontFamily | 0x2000 | |
QTextFormat::FontPointSize | 0x2001 | |
QTextFormat::FontSizeAdjustment | 0x2002 | Specifies the change in size given to the fontsize already set using FontPointSize or FontPixelSize. |
QTextFormat::FontWeight | 0x2003 | |
QTextFormat::FontItalic | 0x2004 | |
QTextFormat::FontUnderline | 0x2005 | This property has been deprecated. Use QTextFormat::TextUnderlineStyle instead. |
QTextFormat::FontOverline | 0x2006 | |
QTextFormat::FontStrikeOut | 0x2007 | |
QTextFormat::FontFixedPitch | 0x2008 | |
QTextFormat::FontPixelSize | 0x2009 | |
QTextFormat::FontCapitalization | FirstFontProperty | Specifies the capitalization type that is to be applied to the text. |
QTextFormat::FontLetterSpacing | 0x1FE1 | Changes the default spacing between individual letters in the font. The value is specified in percentage, with 100 as the default value. |
QTextFormat::FontWordSpacing | 0x1FE2 | Changes the default spacing between individual words. A positive value increases the word spacing by the corresponding pixels; a negative value decreases the spacing. |
QTextFormat::TextUnderlineColor | 0x2010 | |
QTextFormat::TextVerticalAlignment | 0x2021 | |
QTextFormat::TextOutline | 0x2022 | |
QTextFormat::TextUnderlineStyle | 0x2023 | |
QTextFormat::TextToolTip | 0x2024 | Specifies the (optional) tool tip to be displayed for a fragment of text. |
QTextFormat::IsAnchor | 0x2030 | |
QTextFormat::AnchorHref | 0x2031 | |
QTextFormat::AnchorName | 0x2032 | |
QTextFormat::ObjectType | 0x2f00 |
List properties
Constant | Value |
---|---|
QTextFormat::ListStyle | 0x3000 |
QTextFormat::ListIndent | 0x3001 |
Table and frame properties
Constant | Value |
---|---|
QTextFormat::FrameBorder | 0x4000 |
QTextFormat::FrameBorderBrush | 0x4009 |
QTextFormat::FrameBorderStyle | 0x4010 |
QTextFormat::FrameBottomMargin | 0x4006 |
QTextFormat::FrameHeight | 0x4004 |
QTextFormat::FrameLeftMargin | 0x4007 |
QTextFormat::FrameMargin | 0x4001 |
QTextFormat::FramePadding | 0x4002 |
QTextFormat::FrameRightMargin | 0x4008 |
QTextFormat::FrameTopMargin | 0x4005 |
QTextFormat::FrameWidth | 0x4003 |
QTextFormat::TableCellSpacing | 0x4102 |
QTextFormat::TableCellPadding | 0x4103 |
QTextFormat::TableColumns | 0x4100 |
QTextFormat::TableColumnWidthConstraints | 0x4101 |
QTextFormat::TableHeaderRowCount | 0x4104 |
Table cell properties
Constant | Value |
---|---|
QTextFormat::TableCellRowSpan | 0x4810 |
QTextFormat::TableCellColumnSpan | 0x4811 |
QTextFormat::TableCellLeftPadding | 0x4814 |
QTextFormat::TableCellRightPadding | 0x4815 |
QTextFormat::TableCellTopPadding | 0x4812 |
QTextFormat::TableCellBottomPadding | 0x4813 |
Image properties
Constant | Value |
---|---|
QTextFormat::ImageName | 0x5000 |
QTextFormat::ImageWidth | 0x5010 |
QTextFormat::ImageHeight | 0x5011 |
Selection properties
Constant | Value | Description |
---|---|---|
QTextFormat::FullWidthSelection | 0x06000 | When set on the characterFormat of a selection, the whole width of the text will be shown selected |
Page break properties
Constant | Value |
---|---|
QTextFormat::PageBreakPolicy | 0x7000 |
QTextFormat::UserProperty | 0x100000 |
Creates a new text format with an InvalidFormat.
See also FormatType.
Creates a new text format of the given type.
See also FormatType.
Creates a new text format with the same attributes as the other text format.
Destroys this text format.
Returns the brush used to paint the document's background.
See also setBackground(), clearBackground(), and foreground().
Returns the value of the property specified by propertyId. If the property isn't of QTextFormat::Bool type, false is returned instead.
See also setProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns the value of the property given by propertyId; if the property isn't of QVariant::Brush type, Qt::NoBrush is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Clears the brush used to paint the document's background. The default brush will be used.
See also background(), setBackground(), and clearForeground().
Clears the brush used to paint the document's foreground. The default brush will be used.
See also foreground(), setForeground(), and clearBackground().
Clears the value of the property given by propertyId
Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type, an invalid color is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns the value of the property specified by propertyId. If the property isn't of QVariant::Double type, 0 is returned instead.
See also setProperty(), boolProperty(), intProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
See also setForeground(), clearForeground(), and background().
Returns true if the text format has a property with the given propertyId; otherwise returns false.
See also properties() and Property.
Returns the value of the property specified by propertyId. If the property is not of QTextFormat::Integer type, 0 is returned instead.
See also setProperty(), boolProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns true if this text format is a BlockFormat; otherwise returns false.
Returns true if this text format is a CharFormat; otherwise returns false.
Returns true if this text format is a FrameFormat; otherwise returns false.
Returns true if this text format is an image format; otherwise returns false.
Returns true if this text format is a ListFormat; otherwise returns false.
Returns true if this text format is a TableCellFormat; otherwise returns false.
This function was introduced in Qt 4.4.
Returns true if this text format is a TableFormat; otherwise returns false.
Returns true if the format is valid (i.e. is not InvalidFormat); otherwise returns false.
Returns the document's layout direction.
See also setLayoutDirection().
Returns the value of the property given by propertyId.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthVectorProperty(), and Property.
Returns the value of the property given by propertyId. If the property isn't of QTextFormat::LengthVector type, an empty length vector is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), and Property.
Merges the other format with this format; where there are conflicts the other format takes precedence.
Returns the index of the format object, or -1 if the format object is invalid.
See also setObjectIndex().
Returns the text format's object type. See ObjectTypes.
See also setObjectType().
Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type, Qt::NoPen is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns a map with all properties of this text format.
Returns the property specified by the given propertyId.
See also setProperty().
Returns the number of properties stored in the format.
This function was introduced in Qt 4.3.
Sets the brush use to paint the document's background to the brush specified.
See also background(), clearBackground(), and setForeground().
Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.
See also foreground(), clearForeground(), and setBackground().
Sets the document's layout direction to the specified direction.
See also layoutDirection().
Sets the format object's object index.
See also objectIndex().
Sets the text format's object type. See ObjectTypes.
See also objectType().
Sets the property specified by the propertyId to the given value.
See also property().
This is an overloaded member function, provided for convenience.
Sets the value of the property given by propertyId to value.
See also lengthVectorProperty() and Property.
Returns the value of the property given by propertyId; if the property isn't of QVariant::String type, an empty string is returned instead.
See also setProperty(), boolProperty(), intProperty(), doubleProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.
Returns this format as a block format.
Returns this format as a character format.
Returns this format as a frame format.
Returns this format as an image format.
Returns this format as a list format.
Returns this format as a table cell format.
This function was introduced in Qt 4.4.
Returns this format as a table format.
Returns the type of this format.
See also FormatType.
Returns the text format as a QVariant
Returns true if this text format is different from the other text format.
Assigns the other text format to this text format, and returns a reference to this text format.
Returns true if this text format is the same as the other text format.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com