QTextCharFormat Class Reference
|
Constant | Value | Description |
---|---|---|
QTextCharFormat::NoUnderline | 0 | Text is draw without any underlining decoration. |
QTextCharFormat::SingleUnderline | 1 | A line is drawn using Qt::SolidLine. |
QTextCharFormat::DashUnderline | 2 | Dashes are drawn using Qt::DashLine. |
QTextCharFormat::DotLine | 3 | Dots are drawn using Qt::DotLine; |
QTextCharFormat::DashDotLine | 4 | Dashs and dots are drawn using Qt::DashDotLine. |
QTextCharFormat::DashDotDotLine | 5 | Underlines draw drawn using Qt::DashDotDotLine. |
QTextCharFormat::WaveUnderline | 6 | The text is underlined using a wave shaped line. |
QTextCharFormat::SpellCheckUnderline | 7 | The underline is drawn depending on the QStyle::SH_SpellCeckUnderlineStyle style hint of the QApplication style. By default this is mapped to WaveUnderline, on Mac OS X it is mapped to DashDotLine. |
See also Qt::PenStyle.
This enum describes the ways that adjacent characters can be vertically aligned.
Constant | Value | Description |
---|---|---|
QTextCharFormat::AlignNormal | 0 | Adjacent characters are positioned in the standard way for text in the writing system in use. |
QTextCharFormat::AlignSuperScript | 1 | Characters are placed above the baseline for normal text. |
QTextCharFormat::AlignSubScript | 2 | Characters are placed below the baseline for normal text. |
QTextCharFormat::AlignMiddle | 3 | This is currently only implemented for inline objects. The center of the object is vertically aligned with the base line. |
QTextCharFormat::AlignBottom | 5 | The bottom edge of the object is vertically aligned with the base line. |
QTextCharFormat::AlignTop | 4 | The top edge of the object is vertically aligned with the base line. |
Constructs a new character format object.
Returns the text format's hypertext link, or an empty string if none has been set.
See also setAnchorHref().
Returns the anchor names associated with this text format, or an empty string list if none has been set. If the anchor names are set, text with this format can be the destination of a hypertext link.
This function was introduced in Qt 4.3.
See also setAnchorNames().
Returns the font for this character format.
See also setFont().
Returns the current capitalization type of the font.
This function was introduced in Qt 4.4.
See also setFontCapitalization().
Returns the text format's font family.
See also setFontFamily() and font().
Returns true if the text format's font is fixed pitch; otherwise returns false.
See also setFontFixedPitch() and font().
Returns true if the text format's font is italic; otherwise returns false.
See also setFontItalic() and font().
Returns the current letter spacing percentage.
This function was introduced in Qt 4.4.
See also setFontLetterSpacing().
Returns true if the text format's font is overlined; otherwise returns false.
See also setFontOverline() and font().
Returns the font size used to display text in this format.
See also setFontPointSize() and font().
Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false.
See also setFontStrikeOut() and font().
Returns true if the text format's font is underlined; otherwise returns false.
See also setFontUnderline() and font().
Returns the text format's font weight.
See also setFontWeight(), font(), and QFont::Weight.
Returns the current word spacing value.
This function was introduced in Qt 4.4.
See also setFontWordSpacing().
Returns true if the text is formatted as an anchor; otherwise returns false.
See also setAnchor(), setAnchorHref(), and setAnchorNames().
Returns true if this character format is valid; otherwise returns false.
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally. (Anchors are hyperlinks which are often shown underlined and in a different color from plain text.)
The way the text is rendered is independent of whether or not the format has a valid anchor defined. Use setAnchorHref(), and optionally setAnchorNames() to create a hypertext link.
See also isAnchor().
Sets the hypertext link for the text format to the given value. This is typically a URL like "http://www.trolltech.com/index.html".
The anchor will be displayed with the value as its display text; if you want to display different text call setAnchorNames().
To format the text as a hypertext link use setAnchor().
See also anchorHref().
Sets the text format's anchor names. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().
This function was introduced in Qt 4.3.
See also anchorNames().
Sets the text format's font.
See also font().
Sets the capitalization of the text that apppears in this font to capitalization.
A font's capitalization makes the text appear in the selected capitalization mode.
This function was introduced in Qt 4.4.
See also fontCapitalization().
Sets the text format's font family.
See also fontFamily() and setFont().
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used.
See also fontFixedPitch() and setFont().
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic.
See also fontItalic() and setFont().
Sets the letter spacing of this format to the given spacing, in percent. A value of 100 indicates default spacing; a value of 200 doubles the amount of space a letter takes.
This function was introduced in Qt 4.4.
See also fontLetterSpacing().
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined.
See also fontOverline() and setFont().
Sets the text format's font size.
See also fontPointSize() and setFont().
If strikeOut is true, sets the text format's font with strike-out enabled (with a horizontal line through it); otherwise it is displayed without strikeout.
See also fontStrikeOut() and setFont().
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined.
See also fontUnderline() and setFont().
Sets the text format's font weight to weight.
See also fontWeight(), setFont(), and QFont::Weight.
Sets the word spacing of this format to the given spacing, in pixels.
This function was introduced in Qt 4.4.
See also fontWordSpacing().
Sets the pen used to draw the outlines of characters to the given pen.
See also textOutline().
Sets the tool tip for a fragment of text to the given text.
This function was introduced in Qt 4.3.
See also toolTip().
Sets the underline color used for the characters with this format to the color specified.
See also underlineColor().
Sets the style of underlining the text to style.
This function was introduced in Qt 4.2.
See also underlineStyle().
Sets the vertical alignment used for the characters with this format to the alignment specified.
See also verticalAlignment().
Returns the pen used to draw the outlines of characters in this format.
See also setTextOutline().
Returns the tool tip that is displayed for a fragment of text.
This function was introduced in Qt 4.3.
See also setToolTip().
Returns the color used to underline the characters with this format.
See also setUnderlineColor().
Returns the style of underlining the text.
This function was introduced in Qt 4.2.
See also setUnderlineStyle().
Returns the vertical alignment used for characters with this format.
See also setVerticalAlignment().
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