Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QTextCharFormat class provides formatting information for characters in a QTextDocument. More...
#include <QTextCharFormat>
Inherits QTextFormat.
Inherited by QTextImageFormat.
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
The format's font can be set with setFont(), or piecemeal using setFontFamily(), setFontPointSize(), setFontWeight() (for bold), setFontItalic(), setFontUnderline(), setFontOverline(), setFontStrikeOut(), and setFontFixedPitch(). The color is set with setColor(), and the anchor (for hyperlinks) with setAnchor(), setAnchorHref(), setAnchorName(). The characters can be marked as non-deletable with setNonDeletable().
If the characters are in a table the cell and row spanning characteristics can be set with setTableCellRowSpan() and setTableCellColumnSpan().
Constructs a new QTextCharFormat.
Returns the text format's hypertext link, or an empty string if none has been set.
Returns the text format's hypertext link's name, or an empty string if none has been set.
Returns the text format's font color.
See also setColor().
Returns the font for this character format.
Returns the text format's font family.
See also font().
Returns true if the text format's font is fixed pitch; otherwise returns false.
See also font().
Returns true if the text format's font is italic; otherwise returns false.
See also font().
Returns true if the text format's font is overlined; otherwise returns false.
See also font().
Returns the text format's font size.
See also font().
Returns true if the text format's font is struck out; otherwise returns false.
See also font().
Returns true if the text format's font is underlined; otherwise returns false.
See also font().
Returns the text format's font weight.
See also font().
Returns true if the text is formatted as an anchor; otherwise returns false.
See also setAnchor(), setAnchorHref(), and setAnchorName().
Returns true if this character format is valid; otherwise returns false.
If anchor is true, sets the text format signify an anchor; otherwise removes anchor formatting. (Anchors are hyperlinks, often shown underlined and in a different color from plain text.)
This is independent of whether or not the format has an anchor. Use setAnchorHref(), and optionally setAnchorName() to create a hypertext link.
See also isAnchor().
Sets the anchor's hypertext link to be value. (This is typically a URL like http://www.trolltech.com/index.html.)
The anchor will be displayed using value as its display text; if you want to display different text call setAnchorName().
To format the text as a hypertext link use setAnchor().
Sets the text format's hypertext link's name to name. For the link to work a hyperlink must be set with setAnchorHref(); use setAnchor() to apply a hyperlink format.
Sets the text format's font color to color.
See also color().
Sets the character format's font to font.
Sets the text format's font family to family.
See also setFont().
Sets the text format's font to be fixed pitch if fixedPitch is true; otherwise to non-fixed pitch.
See also setFont().
Sets the text format's font to be italic if italic is true; otherwise to non-italic.
See also setFont().
Sets the text format's font to be overlined if overline is true; otherwise to non-overlined.
See also setFont().
Sets the text format's font size to size.
See also setFont().
Sets the text format's font to be struck out if strikeOut is true; otherwise to non-struck out.
See also setFont().
Sets the text format's font to be underlined if underline is true; otherwise to non-underlined.
See also setFont().
Sets the text format's font weight to weight.
See also setFont().
If this character format is applied to characters in a table cell, the cell will span tableCellColumnSpan columns.
If this character format is applied to characters in a table cell, the cell will span tableCellRowSpan rows.
If this character format is applied to characters in a table cell, returns the number of columns spanned which may be 1. Otherwise returns 1.
If this character format is applied to characters in a table cell, returns the number of rows spanned which may be 1. Otherwise returns 1.
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp1 |