Qt 4.8
|
The QTextCharFormat class provides formatting information for characters in a QTextDocument. More...
#include <qtextformat.h>
Public Functions | |
QString | anchorHref () const |
Returns the text format's hypertext link, or an empty string if none has been set. More... | |
QString | anchorName () const |
This function is deprecated. More... | |
QStringList | anchorNames () const |
Returns the anchor names associated with this text format, or an empty string list if none has been set. More... | |
QFont | font () const |
Returns the font for this character format. More... | |
QFont::Capitalization | fontCapitalization () const |
Returns the current capitalization type of the font. More... | |
QString | fontFamily () const |
Returns the text format's font family. More... | |
bool | fontFixedPitch () const |
Returns true if the text format's font is fixed pitch; otherwise returns false. More... | |
QFont::HintingPreference | fontHintingPreference () const |
Returns the hinting preference set for this text format. More... | |
bool | fontItalic () const |
Returns true if the text format's font is italic; otherwise returns false. More... | |
bool | fontKerning () const |
Returns true if the font kerning is enabled. More... | |
qreal | fontLetterSpacing () const |
Returns the current letter spacing percentage. More... | |
bool | fontOverline () const |
Returns true if the text format's font is overlined; otherwise returns false. More... | |
qreal | fontPointSize () const |
Returns the font size used to display text in this format. More... | |
bool | fontStrikeOut () const |
Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false. More... | |
QFont::StyleHint | fontStyleHint () const |
Returns the font style hint. More... | |
QFont::StyleStrategy | fontStyleStrategy () const |
Returns the current font style strategy. More... | |
bool | fontUnderline () const |
Returns true if the text format's font is underlined; otherwise returns false. More... | |
int | fontWeight () const |
Returns the text format's font weight. More... | |
qreal | fontWordSpacing () const |
Returns the current word spacing value. More... | |
bool | isAnchor () const |
Returns true if the text is formatted as an anchor; otherwise returns false. More... | |
bool | isValid () const |
Returns true if this character format is valid; otherwise returns false. More... | |
QTextCharFormat () | |
Constructs a new character format object. More... | |
void | setAnchor (bool anchor) |
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally. More... | |
void | setAnchorHref (const QString &value) |
Sets the hypertext link for the text format to the given value. More... | |
void | setAnchorName (const QString &name) |
This function is deprecated. More... | |
void | setAnchorNames (const QStringList &names) |
Sets the text format's anchor names. More... | |
void | setFont (const QFont &font) |
Sets the text format's font. More... | |
void | setFontCapitalization (QFont::Capitalization capitalization) |
Sets the capitalization of the text that apppears in this font to capitalization. More... | |
void | setFontFamily (const QString &family) |
Sets the text format's font family. More... | |
void | setFontFixedPitch (bool fixedPitch) |
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used. More... | |
void | setFontHintingPreference (QFont::HintingPreference hintingPreference) |
Sets the hinting preference of the text format's font to be hintingPreference. More... | |
void | setFontItalic (bool italic) |
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic. More... | |
void | setFontKerning (bool enable) |
Enables kerning for this font if enable is true; otherwise disables it. More... | |
void | setFontLetterSpacing (qreal spacing) |
Sets the letter spacing of this format to the given spacing, in percent. More... | |
void | setFontOverline (bool overline) |
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined. More... | |
void | setFontPointSize (qreal size) |
Sets the text format's font size. More... | |
void | setFontStrikeOut (bool strikeOut) |
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. More... | |
void | setFontStyleHint (QFont::StyleHint hint, QFont::StyleStrategy strategy=QFont::PreferDefault) |
Sets the font style hint and strategy. More... | |
void | setFontStyleStrategy (QFont::StyleStrategy strategy) |
Sets the font style strategy. More... | |
void | setFontUnderline (bool underline) |
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined. More... | |
void | setFontWeight (int weight) |
Sets the text format's font weight to weight. More... | |
void | setFontWordSpacing (qreal spacing) |
Sets the word spacing of this format to the given spacing, in pixels. More... | |
void | setTableCellColumnSpan (int tableCellColumnSpan) |
If this character format is applied to characters in a table cell, the cell will span tableCellColumnSpan columns. More... | |
void | setTableCellRowSpan (int tableCellRowSpan) |
If this character format is applied to characters in a table cell, the cell will span tableCellRowSpan rows. More... | |
void | setTextOutline (const QPen &pen) |
Sets the pen used to draw the outlines of characters to the given pen. More... | |
void | setToolTip (const QString &tip) |
Sets the tool tip for a fragment of text to the given text. More... | |
void | setUnderlineColor (const QColor &color) |
Sets the underline color used for the characters with this format to the color specified. More... | |
void | setUnderlineStyle (UnderlineStyle style) |
Sets the style of underlining the text to style. More... | |
void | setVerticalAlignment (VerticalAlignment alignment) |
Sets the vertical alignment used for the characters with this format to the alignment specified. More... | |
int | tableCellColumnSpan () const |
If this character format is applied to characters in a table cell, this function returns the number of columns spanned by the text (this may be 1); otherwise it returns 1. More... | |
int | tableCellRowSpan () const |
If this character format is applied to characters in a table cell, this function returns the number of rows spanned by the text (this may be 1); otherwise it returns 1. More... | |
QPen | textOutline () const |
Returns the pen used to draw the outlines of characters in this format. More... | |
QString | toolTip () const |
Returns the tool tip that is displayed for a fragment of text. More... | |
QColor | underlineColor () const |
Returns the color used to underline the characters with this format. More... | |
UnderlineStyle | underlineStyle () const |
Returns the style of underlining the text. More... | |
VerticalAlignment | verticalAlignment () const |
Returns the vertical alignment used for characters with this format. More... | |
Public Functions inherited from QTextFormat | |
QBrush | background () const |
Returns the brush used to paint the document's background. More... | |
bool | boolProperty (int propertyId) const |
Returns the value of the property specified by propertyId. More... | |
QBrush | brushProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Brush type, Qt::NoBrush is returned instead. More... | |
void | clearBackground () |
Clears the brush used to paint the document's background. More... | |
void | clearForeground () |
Clears the brush used to paint the document's foreground. More... | |
void | clearProperty (int propertyId) |
Clears the value of the property given by propertyId. More... | |
QColor | colorProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type, an invalid color is returned instead. More... | |
qreal | doubleProperty (int propertyId) const |
Returns the value of the property specified by propertyId. More... | |
QBrush | foreground () const |
Returns the brush used to render foreground details, such as text, frame outlines, and table borders. More... | |
bool | hasProperty (int propertyId) const |
Returns true if the text format has a property with the given propertyId; otherwise returns false. More... | |
int | intProperty (int propertyId) const |
Returns the value of the property specified by propertyId. More... | |
bool | isBlockFormat () const |
Returns true if this text format is a BlockFormat ; otherwise returns false. More... | |
bool | isCharFormat () const |
Returns true if this text format is a CharFormat ; otherwise returns false. More... | |
bool | isFrameFormat () const |
Returns true if this text format is a FrameFormat ; otherwise returns false. More... | |
bool | isImageFormat () const |
Returns true if this text format is an image format; otherwise returns false. More... | |
bool | isListFormat () const |
Returns true if this text format is a ListFormat ; otherwise returns false. More... | |
bool | isTableCellFormat () const |
Returns true if this text format is a TableCellFormat ; otherwise returns false. More... | |
bool | isTableFormat () const |
Returns true if this text format is a TableFormat ; otherwise returns false. More... | |
bool | isValid () const |
Returns true if the format is valid (i. More... | |
Qt::LayoutDirection | layoutDirection () const |
Returns the document's layout direction. More... | |
QTextLength | lengthProperty (int propertyId) const |
Returns the value of the property given by propertyId. More... | |
QVector< QTextLength > | lengthVectorProperty (int propertyId) const |
Returns the value of the property given by propertyId. More... | |
void | merge (const QTextFormat &other) |
Merges the other format with this format; where there are conflicts the other format takes precedence. More... | |
int | objectIndex () const |
Returns the index of the format object, or -1 if the format object is invalid. More... | |
int | objectType () const |
Returns the text format's object type. More... | |
operator QVariant () const | |
Returns the text format as a QVariant. More... | |
bool | operator!= (const QTextFormat &rhs) const |
Returns true if this text format is different from the other text format. More... | |
QTextFormat & | operator= (const QTextFormat &rhs) |
Assigns the other text format to this text format, and returns a reference to this text format. More... | |
bool | operator== (const QTextFormat &rhs) const |
Returns true if this text format is the same as the other text format. More... | |
QPen | penProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type, Qt::NoPen is returned instead. More... | |
QMap< int, QVariant > | properties () const |
Returns a map with all properties of this text format. More... | |
QVariant | property (int propertyId) const |
Returns the property specified by the given propertyId. More... | |
int | propertyCount () const |
Returns the number of properties stored in the format. More... | |
QTextFormat () | |
Creates a new text format with an InvalidFormat . More... | |
QTextFormat (int type) | |
Creates a new text format of the given type. More... | |
QTextFormat (const QTextFormat &rhs) | |
Creates a new text format with the same attributes as the other text format. More... | |
void | setBackground (const QBrush &brush) |
Sets the brush use to paint the document's background to the brush specified. More... | |
void | setForeground (const QBrush &brush) |
Sets the foreground brush to the specified brush. More... | |
void | setLayoutDirection (Qt::LayoutDirection direction) |
Sets the document's layout direction to the specified direction. More... | |
void | setObjectIndex (int object) |
Sets the format object's object index. More... | |
void | setObjectType (int type) |
Sets the text format's object type to type. More... | |
void | setProperty (int propertyId, const QVariant &value) |
Sets the property specified by the propertyId to the given value. More... | |
void | setProperty (int propertyId, const QVector< QTextLength > &lengths) |
Sets the value of the property given by propertyId to value. More... | |
QString | stringProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QVariant::String type, an empty string is returned instead. More... | |
QTextBlockFormat | toBlockFormat () const |
Returns this format as a block format. More... | |
QTextCharFormat | toCharFormat () const |
Returns this format as a character format. More... | |
QTextFrameFormat | toFrameFormat () const |
Returns this format as a frame format. More... | |
QTextImageFormat | toImageFormat () const |
Returns this format as an image format. More... | |
QTextListFormat | toListFormat () const |
Returns this format as a list format. More... | |
QTextTableCellFormat | toTableCellFormat () const |
Returns this format as a table cell format. More... | |
QTextTableFormat | toTableFormat () const |
Returns this format as a table format. More... | |
int | type () const |
Returns the type of this format. More... | |
~QTextFormat () | |
Destroys this text format. More... | |
Protected Functions | |
QTextCharFormat (const QTextFormat &fmt) | |
Creates a new character format with the same attributes as the given text format. More... | |
Friends | |
class | QTextFormat |
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
The character format of text in a document specifies the visual properties of the text, as well as information about its role in a hypertext document.
The font used can be set by supplying a font to the setFont() function, and each aspect of its appearance can be adjusted to give the desired effect. setFontFamily() and setFontPointSize() define the font's family (e.g. Times) and printed size; setFontWeight() and setFontItalic() provide control over the style of the font. setFontUnderline(), setFontOverline(), setFontStrikeOut(), and setFontFixedPitch() provide additional effects for text.
The color is set with setForeground(). If the text is intended to be used as an anchor (for hyperlinks), this can be enabled with setAnchor(). The setAnchorHref() and setAnchorNames() functions are used to specify the information about the hyperlink's destination and the anchor's name.
Definition at line 372 of file qtextformat.h.
This enum describes the different ways drawing underlined text.
Enumerator | |
---|---|
NoUnderline | |
SingleUnderline | |
DashUnderline | |
DotLine | |
DashDotLine | |
DashDotDotLine | |
WaveUnderline | |
SpellCheckUnderline |
Definition at line 384 of file qtextformat.h.
This enum describes the ways that adjacent characters can be vertically aligned.
Enumerator | |
---|---|
AlignNormal | |
AlignSuperScript | |
AlignSubScript | |
AlignMiddle | |
AlignTop | |
AlignBottom | |
AlignBaseline |
Definition at line 375 of file qtextformat.h.
QTextCharFormat::QTextCharFormat | ( | ) |
Constructs a new character format object.
Definition at line 1416 of file qtextformat.cpp.
Referenced by tableCellColumnSpan().
|
explicitprotected |
Creates a new character format with the same attributes as the given text format.
Definition at line 1428 of file qtextformat.cpp.
|
inline |
Returns the text format's hypertext link, or an empty string if none has been set.
Definition at line 506 of file qtextformat.h.
Referenced by QTextControlPrivate::activateLinkUnderCursor(), QAbstractTextDocumentLayout::anchorAt(), QPlainTextEdit::anchorAt(), QPdfEnginePrivate::drawTextItem(), QTextHtmlExporter::emitFragment(), QTextControl::findNextPrevAnchor(), QTextBrowser::keyPressEvent(), QPlainTextEdit::keyPressEvent(), and QTextEdit::keyPressEvent().
QString QTextCharFormat::anchorName | ( | ) | const |
This function is deprecated.
Use anchorNames() instead.
Returns the anchor name associated with this text format, or an empty string if none has been set. If the anchor name is set, text with this format can be the destination of a hypertext link.
Definition at line 1964 of file qtextformat.cpp.
Referenced by QTextHtmlExporter::emitFragment(), QTextHtmlImporter::import(), and setAnchorName().
QStringList QTextCharFormat::anchorNames | ( | ) | const |
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.
Definition at line 1985 of file qtextformat.cpp.
Referenced by QTextControl::anchorPosition(), and setAnchorNames().
QFont QTextCharFormat::font | ( | ) | const |
Returns the font for this character format.
Definition at line 2124 of file qtextformat.cpp.
Referenced by QTextEditPrivate::_q_currentCharFormatChanged(), QAccessibleTextWidget::attributes(), QCalendarModel::data(), QTextDocumentLayoutPrivate::drawListItem(), QTextEngine::font(), QTextEngine::fontEngine(), isValid(), QPlainTextDocumentLayout::layoutBlock(), QTextDocumentLayoutPrivate::layoutBlock(), QTextDocumentLayout::resizeInlineObject(), and QScriptLine::setDefaultHeight().
|
inline |
Returns the current capitalization type of the font.
Definition at line 421 of file qtextformat.h.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the text format's font family.
Definition at line 403 of file qtextformat.h.
Referenced by QAccessibleTextWidget::attributes(), QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::toHtml(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns true if the text format's font is fixed pitch; otherwise returns false.
Definition at line 453 of file qtextformat.h.
|
inline |
Returns the hinting preference set for this text format.
Definition at line 470 of file qtextformat.h.
|
inline |
Returns true if the text format's font is italic; otherwise returns false.
Definition at line 417 of file qtextformat.h.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::toHtml(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns true if the font kerning is enabled.
Definition at line 477 of file qtextformat.h.
|
inline |
Returns the current letter spacing percentage.
Definition at line 425 of file qtextformat.h.
Referenced by QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns true if the text format's font is overlined; otherwise returns false.
Definition at line 438 of file qtextformat.h.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), and QTextItemInt::initWithScriptItem().
|
inline |
Returns the font size used to display text in this format.
Definition at line 408 of file qtextformat.h.
Referenced by QAccessibleTextWidget::attributes(), QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::toHtml(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false.
Definition at line 443 of file qtextformat.h.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), QTextItemInt::initWithScriptItem(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the font style hint.
Definition at line 460 of file qtextformat.h.
|
inline |
Returns the current font style strategy.
Definition at line 462 of file qtextformat.h.
bool QTextCharFormat::fontUnderline | ( | ) | const |
Returns true if the text format's font is underlined; otherwise returns false.
Definition at line 1566 of file qtextformat.cpp.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), setFontUnderline(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the text format's font weight.
Definition at line 413 of file qtextformat.h.
Referenced by QAccessibleTextWidget::attributes(), QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::toHtml(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the current word spacing value.
Definition at line 429 of file qtextformat.h.
Referenced by QTextHtmlExporter::emitCharFormatStyle(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns true if the text is formatted as an anchor; otherwise returns false.
Definition at line 501 of file qtextformat.h.
Referenced by QTextControlPrivate::anchorForCursor(), QTextControl::anchorPosition(), QPdfEnginePrivate::drawTextItem(), QTextHtmlExporter::emitFragment(), QTextControl::findNextPrevAnchor(), and QTextHtmlImporter::import().
|
inline |
Returns true if this character format is valid; otherwise returns false.
Definition at line 397 of file qtextformat.h.
Referenced by QTextCursor::charFormat(), QTextDocumentLayout::drawInlineObject(), QAbstractTextDocumentLayout::drawInlineObject(), QTextControlPrivate::inputMethodEvent(), QTextCursor::insertText(), QTextDocumentLayout::positionInlineObject(), QLineControl::processInputMethodEvent(), QTextDocumentLayout::resizeInlineObject(), QAbstractTextDocumentLayout::resizeInlineObject(), and QTextDocumentPrivate::setCharFormat().
|
inline |
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.
Definition at line 499 of file qtextformat.h.
Referenced by QTextHtmlImporter::appendBlock(), QTextHtmlImporter::appendNodeText(), QTextHtmlParser::applyAttributes(), and QTextHtmlParserNode::initializeProperties().
|
inline |
Sets the hypertext link for the text format to the given value.
This is typically a URL like "http://example.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().
Definition at line 504 of file qtextformat.h.
Referenced by QTextHtmlParser::applyAttributes().
|
inline |
This function is deprecated.
Use setAnchorNames() instead.
Sets the text format's anchor name. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().
Definition at line 509 of file qtextformat.h.
Referenced by QTextHtmlParser::applyAttributes().
|
inline |
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().
Definition at line 513 of file qtextformat.h.
Referenced by QTextHtmlImporter::appendBlock(), QTextHtmlImporter::appendNodeText(), and setAnchorName().
void QTextCharFormat::setFont | ( | const QFont & | font | ) |
Sets the text format's font.
Definition at line 2093 of file qtextformat.cpp.
Referenced by QSvgText::draw(), QCalendarModel::formatForCell(), isValid(), QTextHtmlExporter::QTextHtmlExporter(), QTextEdit::setCurrentFont(), and QSyntaxHighlighter::setFormat().
|
inline |
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.
Definition at line 419 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), and setFont().
|
inline |
Sets the text format's font family.
Definition at line 401 of file qtextformat.h.
Referenced by QTextHtmlParser::applyAttributes(), QTextHtmlParserNode::applyCssDeclarations(), QTextHtmlParserNode::initializeProperties(), setFont(), and QTextEdit::setFontFamily().
|
inline |
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used.
Definition at line 451 of file qtextformat.h.
Referenced by QTextHtmlParserNode::initializeProperties(), and setFont().
|
inline |
Sets the hinting preference of the text format's font to be hintingPreference.
Definition at line 465 of file qtextformat.h.
|
inline |
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic.
Definition at line 415 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), QTextHtmlParserNode::initializeProperties(), QDeclarativeStyledTextPrivate::parseTag(), QScriptSyntaxHighlighter::QScriptSyntaxHighlighter(), setFont(), and QTextEdit::setFontItalic().
|
inline |
Enables kerning for this font if enable is true; otherwise disables it.
When kerning is enabled, glyph metrics do not add up anymore, even for Latin text. In other words, the assumption that width('a') + width('b') is equal to width("ab") is not neccesairly true.
Definition at line 475 of file qtextformat.h.
Referenced by setFont().
|
inline |
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.
Definition at line 423 of file qtextformat.h.
Referenced by setFont().
|
inline |
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined.
Definition at line 436 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), and setFont().
|
inline |
Sets the text format's font size.
Definition at line 406 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), QDeclarativeStyledTextPrivate::parseFontAttributes(), setFont(), and QTextEdit::setFontPointSize().
|
inline |
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.
Definition at line 441 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), QTextHtmlParserNode::initializeProperties(), and setFont().
|
inline |
Sets the font style hint and strategy.
Qt does not support style hints on X11 since this information is not provided by the window system.
Definition at line 456 of file qtextformat.h.
Referenced by setFont().
|
inline |
Sets the font style strategy.
Definition at line 458 of file qtextformat.h.
Referenced by setFont().
|
inline |
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined.
Definition at line 432 of file qtextformat.h.
Referenced by QMacInputContext::globalEventProcessor(), QTextControlPrivate::inputMethodEvent(), QLabel::paintEvent(), QLineControl::processInputMethodEvent(), qt_mac_compose_format(), QBBInputContext::setComposingText(), and QTextEdit::setFontUnderline().
|
inline |
Sets the text format's font weight to weight.
Definition at line 411 of file qtextformat.h.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), QTextHtmlParserNode::initializeProperties(), QDeclarativeStyledTextPrivate::parseTag(), setFont(), and QTextEdit::setFontWeight().
|
inline |
Sets the word spacing of this format to the given spacing, in pixels.
Definition at line 427 of file qtextformat.h.
Referenced by setFont().
|
inline |
If this character format is applied to characters in a table cell, the cell will span tableCellColumnSpan columns.
Definition at line 537 of file qtextformat.h.
Referenced by QTextCopyHelper::copy(), QTextTable::insertColumns(), QTextTable::mergeCells(), QTextTableCell::setFormat(), QTextTable::splitCell(), and tableCellRowSpan().
|
inline |
If this character format is applied to characters in a table cell, the cell will span tableCellRowSpan rows.
Definition at line 529 of file qtextformat.h.
Referenced by QTextCopyHelper::copy(), QTextTable::insertColumns(), QTextTable::insertRows(), QTextTable::mergeCells(), setAnchorNames(), QTextTableCell::setFormat(), and QTextTable::splitCell().
|
inline |
Sets the pen used to draw the outlines of characters to the given pen.
Definition at line 489 of file qtextformat.h.
Referenced by QSvgText::draw(), and QGraphicsSimpleTextItem::paint().
|
inline |
Sets the tool tip for a fragment of text to the given text.
Definition at line 494 of file qtextformat.h.
Referenced by QTextHtmlParser::applyAttributes().
|
inline |
Sets the underline color used for the characters with this format to the color specified.
Definition at line 446 of file qtextformat.h.
Referenced by QMacInputContext::globalEventProcessor().
void QTextCharFormat::setUnderlineStyle | ( | UnderlineStyle | style | ) |
Sets the style of underlining the text to style.
Definition at line 1592 of file qtextformat.cpp.
Referenced by QTextHtmlParserNode::applyCssDeclarations(), fontKerning(), QTextHtmlParserNode::initializeProperties(), QTextControlPrivate::inputMethodEvent(), QLineControl::processInputMethodEvent(), setFont(), and QInputContext::standardFormat().
|
inline |
Sets the vertical alignment used for the characters with this format to the alignment specified.
Definition at line 484 of file qtextformat.h.
Referenced by QTextHtmlParser::applyAttributes(), QTextHtmlParserNode::applyCssDeclarations(), QTextHtmlExporter::emitTable(), and QTextHtmlParserNode::initializeProperties().
|
inline |
If this character format is applied to characters in a table cell, this function returns the number of columns spanned by the text (this may be 1); otherwise it returns 1.
Definition at line 521 of file qtextformat.h.
Referenced by QTextTableCell::columnSpan(), QTextTable::mergeCells(), QTextTable::removeColumns(), QTextTableCell::setFormat(), QTextTable::splitCell(), tableCellRowSpan(), and QTextTablePrivate::update().
|
inline |
If this character format is applied to characters in a table cell, this function returns the number of rows spanned by the text (this may be 1); otherwise it returns 1.
Definition at line 518 of file qtextformat.h.
Referenced by QTextTable::mergeCells(), QTextTable::removeRows(), QTextTableCell::rowSpan(), setAnchorNames(), QTextTableCell::setFormat(), QTextTable::splitCell(), and QTextTablePrivate::update().
|
inline |
Returns the pen used to draw the outlines of characters in this format.
Definition at line 491 of file qtextformat.h.
Referenced by QTextLine::draw().
|
inline |
Returns the tool tip that is displayed for a fragment of text.
Definition at line 496 of file qtextformat.h.
Referenced by QCalendarModel::data().
|
inline |
Returns the color used to underline the characters with this format.
Definition at line 448 of file qtextformat.h.
Referenced by drawTextItemDecoration(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the style of underlining the text.
Definition at line 481 of file qtextformat.h.
Referenced by fontUnderline(), QTextItemInt::initWithScriptItem(), and QTextOdfWriter::writeCharacterFormat().
|
inline |
Returns the vertical alignment used for characters with this format.
Definition at line 486 of file qtextformat.h.
Referenced by QAccessibleTextWidget::attributes(), QTextLine::draw(), QTextHtmlExporter::emitCharFormatStyle(), QTextHtmlExporter::emitFragment(), QTextHtmlExporter::emitTable(), QTextEngine::font(), QTextEngine::fontEngine(), QTextDocumentLayoutPrivate::layoutTable(), QTextDocumentLayout::resizeInlineObject(), QTextOdfWriter::writeCharacterFormat(), and QTextOdfWriter::writeTableCellFormat().
|
friend |
Definition at line 526 of file qtextformat.h.