![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\reentrant More...
#include <qtextformat.h>
Public Member Functions | |
QTextTableCellFormat () | |
bool | isValid () const |
void | setTopPadding (qreal padding) |
qreal | topPadding () const |
void | setBottomPadding (qreal padding) |
qreal | bottomPadding () const |
void | setLeftPadding (qreal padding) |
qreal | leftPadding () const |
void | setRightPadding (qreal padding) |
qreal | rightPadding () const |
void | setPadding (qreal padding) |
void | setTopBorder (qreal width) |
qreal | topBorder () const |
void | setBottomBorder (qreal width) |
qreal | bottomBorder () const |
void | setLeftBorder (qreal width) |
qreal | leftBorder () const |
void | setRightBorder (qreal width) |
qreal | rightBorder () const |
void | setBorder (qreal width) |
void | setTopBorderStyle (QTextFrameFormat::BorderStyle style) |
QTextFrameFormat::BorderStyle | topBorderStyle () const |
void | setBottomBorderStyle (QTextFrameFormat::BorderStyle style) |
QTextFrameFormat::BorderStyle | bottomBorderStyle () const |
void | setLeftBorderStyle (QTextFrameFormat::BorderStyle style) |
QTextFrameFormat::BorderStyle | leftBorderStyle () const |
void | setRightBorderStyle (QTextFrameFormat::BorderStyle style) |
QTextFrameFormat::BorderStyle | rightBorderStyle () const |
void | setBorderStyle (QTextFrameFormat::BorderStyle style) |
void | setTopBorderBrush (const QBrush &brush) |
QBrush | topBorderBrush () const |
void | setBottomBorderBrush (const QBrush &brush) |
QBrush | bottomBorderBrush () const |
void | setLeftBorderBrush (const QBrush &brush) |
QBrush | leftBorderBrush () const |
void | setRightBorderBrush (const QBrush &brush) |
QBrush | rightBorderBrush () const |
void | setBorderBrush (const QBrush &brush) |
![]() | |
QTextCharFormat () | |
Constructs a new character format object. | |
bool | isValid () const |
Returns true if this character format is valid; otherwise returns false. | |
void | setFont (const QFont &font, FontPropertiesInheritanceBehavior behavior=FontPropertiesAll) |
QFont | font () const |
Returns the font for this character format. | |
void | setFontFamilies (const QStringList &families) |
QStringList | fontFamilies () const |
void | setFontStyleName (const QString &styleName) |
QStringList | fontStyleName () const |
void | setFontPointSize (qreal size) |
Sets the text format's font size. | |
qreal | fontPointSize () const |
Returns the font size used to display text in this format. | |
void | setFontWeight (int weight) |
Sets the text format's font weight to weight. | |
int | fontWeight () const |
Returns the text format's font weight. | |
void | setFontItalic (bool italic) |
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic. | |
bool | fontItalic () const |
Returns true if the text format's font is italic; otherwise returns false . | |
void | setFontCapitalization (QFont::Capitalization capitalization) |
QFont::Capitalization | fontCapitalization () const |
void | setFontLetterSpacingType (QFont::SpacingType letterSpacingType) |
QFont::SpacingType | fontLetterSpacingType () const |
void | setFontLetterSpacing (qreal spacing) |
qreal | fontLetterSpacing () const |
void | setFontWordSpacing (qreal spacing) |
qreal | fontWordSpacing () const |
void | setFontUnderline (bool underline) |
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined. | |
bool | fontUnderline () const |
Returns true if the text format's font is underlined; otherwise returns false . | |
void | setFontOverline (bool overline) |
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined. | |
bool | fontOverline () const |
Returns true if the text format's font is overlined; otherwise returns false . | |
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. | |
bool | fontStrikeOut () const |
Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false . | |
void | setUnderlineColor (const QColor &color) |
Sets the color used to draw underlines, overlines and strikeouts on the characters with this format to the color specified. | |
QColor | underlineColor () const |
Returns the color used to draw underlines, overlines and strikeouts on the characters with this format. | |
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. | |
bool | fontFixedPitch () const |
Returns true if the text format's font is fixed pitch; otherwise returns false . | |
void | setFontStretch (int factor) |
int | fontStretch () const |
void | setFontStyleHint (QFont::StyleHint hint, QFont::StyleStrategy strategy=QFont::PreferDefault) |
void | setFontStyleStrategy (QFont::StyleStrategy strategy) |
QFont::StyleHint | fontStyleHint () const |
QFont::StyleStrategy | fontStyleStrategy () const |
void | setFontHintingPreference (QFont::HintingPreference hintingPreference) |
QFont::HintingPreference | fontHintingPreference () const |
void | setFontKerning (bool enable) |
bool | fontKerning () const |
void | setUnderlineStyle (UnderlineStyle style) |
UnderlineStyle | underlineStyle () const |
void | setVerticalAlignment (VerticalAlignment alignment) |
Sets the vertical alignment used for the characters with this format to the alignment specified. | |
VerticalAlignment | verticalAlignment () const |
Returns the vertical alignment used for characters with this format. | |
void | setTextOutline (const QPen &pen) |
Sets the pen used to draw the outlines of characters to the given pen. | |
QPen | textOutline () const |
Returns the pen used to draw the outlines of characters in this format. | |
void | setToolTip (const QString &tip) |
QString | toolTip () const |
void | setSuperScriptBaseline (qreal baseline) |
qreal | superScriptBaseline () const |
void | setSubScriptBaseline (qreal baseline) |
qreal | subScriptBaseline () const |
void | setBaselineOffset (qreal baseline) |
qreal | baselineOffset () const |
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. | |
bool | isAnchor () const |
Returns true if the text is formatted as an anchor; otherwise returns false . | |
void | setAnchorHref (const QString &value) |
Sets the hypertext link for the text format to the given value. | |
QString | anchorHref () const |
Returns the text format's hypertext link, or an empty string if none has been set. | |
void | setAnchorNames (const QStringList &names) |
QStringList | anchorNames () const |
void | setTableCellRowSpan (int tableCellRowSpan) |
int | tableCellRowSpan () const |
void | setTableCellColumnSpan (int tableCellColumnSpan) |
int | tableCellColumnSpan () const |
![]() | |
QTextFormat () | |
Creates a new text format with an InvalidFormat . | |
QTextFormat (int type) | |
Creates a new text format of the given type. | |
QTextFormat (const QTextFormat &rhs) | |
Creates a new text format with the same attributes as the other text format. | |
QTextFormat & | operator= (const QTextFormat &rhs) |
Assigns the other text format to this text format, and returns a reference to this text format. | |
~QTextFormat () | |
Destroys this text format. | |
void | swap (QTextFormat &other) |
void | merge (const QTextFormat &other) |
Merges the other format with this format; where there are conflicts the other format takes precedence. | |
bool | isValid () const |
Returns true if the format is valid (i.e. | |
bool | isEmpty () const |
int | type () const |
Returns the type of this format. | |
int | objectIndex () const |
Returns the index of the format object, or -1 if the format object is invalid. | |
void | setObjectIndex (int object) |
Sets the format object's object index. | |
QVariant | property (int propertyId) const |
Returns the property specified by the given propertyId. | |
void | setProperty (int propertyId, const QVariant &value) |
Sets the property specified by the propertyId to the given value. | |
void | clearProperty (int propertyId) |
Clears the value of the property given by propertyId. | |
bool | hasProperty (int propertyId) const |
Returns true if the text format has a property with the given propertyId; otherwise returns false . | |
bool | boolProperty (int propertyId) const |
Returns the value of the property specified by propertyId. | |
int | intProperty (int propertyId) const |
Returns the value of the property specified by propertyId. | |
qreal | doubleProperty (int propertyId) const |
Returns the value of the property specified by propertyId. | |
QString | stringProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QMetaType::QString type, an empty string is returned instead. | |
QColor | colorProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QMetaType::QColor type, an invalid color is returned instead. | |
QPen | penProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QMetaType::QPen type, Qt::NoPen is returned instead. | |
QBrush | brushProperty (int propertyId) const |
Returns the value of the property given by propertyId; if the property isn't of QMetaType::QBrush type, Qt::NoBrush is returned instead. | |
QTextLength | lengthProperty (int propertyId) const |
Returns the value of the property given by propertyId. | |
QList< QTextLength > | lengthVectorProperty (int propertyId) const |
Returns the value of the property given by propertyId. | |
void | setProperty (int propertyId, const QList< QTextLength > &lengths) |
Sets the value of the property given by propertyId to value. | |
QMap< int, QVariant > | properties () const |
Returns a map with all properties of this text format. | |
int | propertyCount () const |
void | setObjectType (int type) |
Sets the text format's object type to type. | |
int | objectType () const |
Returns the text format's object type. | |
bool | isCharFormat () const |
Returns true if this text format is a CharFormat ; otherwise returns false . | |
bool | isBlockFormat () const |
Returns true if this text format is a BlockFormat ; otherwise returns false . | |
bool | isListFormat () const |
Returns true if this text format is a ListFormat ; otherwise returns false . | |
bool | isFrameFormat () const |
Returns true if this text format is a FrameFormat ; otherwise returns false . | |
bool | isImageFormat () const |
Returns true if this text format is an image format; otherwise returns false . | |
bool | isTableFormat () const |
Returns true if this text format is a TableFormat ; otherwise returns false . | |
bool | isTableCellFormat () const |
QTextBlockFormat | toBlockFormat () const |
Returns this format as a block format. | |
QTextCharFormat | toCharFormat () const |
Returns this format as a character format. | |
QTextListFormat | toListFormat () const |
Returns this format as a list format. | |
QTextTableFormat | toTableFormat () const |
Returns this format as a table format. | |
QTextFrameFormat | toFrameFormat () const |
Returns this format as a frame format. | |
QTextImageFormat | toImageFormat () const |
Returns this format as an image format. | |
QTextTableCellFormat | toTableCellFormat () const |
bool | operator== (const QTextFormat &rhs) const |
Returns true if this text format is the same as the other text format. | |
bool | operator!= (const QTextFormat &rhs) const |
Returns true if this text format is different from the other text format. | |
operator QVariant () const | |
Returns the text format as a QVariant. | |
void | setLayoutDirection (Qt::LayoutDirection direction) |
Sets the document's layout direction to the specified direction. | |
Qt::LayoutDirection | layoutDirection () const |
Returns the document's layout direction. | |
void | setBackground (const QBrush &brush) |
Sets the brush use to paint the document's background to the brush specified. | |
QBrush | background () const |
Returns the brush used to paint the document's background. | |
void | clearBackground () |
Clears the brush used to paint the document's background. | |
void | setForeground (const QBrush &brush) |
Sets the foreground brush to the specified brush. | |
QBrush | foreground () const |
Returns the brush used to render foreground details, such as text, frame outlines, and table borders. | |
void | clearForeground () |
Clears the brush used to paint the document's foreground. | |
Protected Member Functions | |
QTextTableCellFormat (const QTextFormat &fmt) | |
![]() | |
QTextCharFormat (const QTextFormat &fmt) | |
Friends | |
class | QTextFormat |
Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &stream, const QTextTableCellFormat &fmt) |
Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &stream, QTextTableCellFormat &fmt) |
\reentrant
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument. \inmodule QtGui
The table cell format of a table cell in a document specifies the visual properties of the table cell.
The padding properties of a table cell are controlled by setLeftPadding(), setRightPadding(), setTopPadding(), and setBottomPadding(). All the paddings can be set at once using setPadding().
Definition at line 1022 of file qtextformat.h.
QTextTableCellFormat::QTextTableCellFormat | ( | ) |
Constructs a new table cell format object.
Definition at line 3921 of file qtextformat.cpp.
|
explicitprotected |
Creates a new table cell format with the same attributes as the given text format.
Definition at line 3934 of file qtextformat.cpp.
|
inline |
Returns the bottom border width of the table cell.
Definition at line 1050 of file qtextformat.h.
|
inline |
Returns the bottom border brush of the table cell.
Definition at line 1094 of file qtextformat.h.
|
inline |
Returns the bottom border style of the table cell.
Definition at line 1072 of file qtextformat.h.
|
inline |
|
inline |
Returns true
if this table cell format is valid; otherwise returns false
.
Definition at line 1027 of file qtextformat.h.
|
inline |
Returns the left border width of the table cell.
Definition at line 1055 of file qtextformat.h.
|
inline |
Returns the left border brush of the table cell.
Definition at line 1099 of file qtextformat.h.
|
inline |
Returns the left border style of the table cell.
Definition at line 1077 of file qtextformat.h.
|
inline |
|
inline |
Returns the right border width of the table cell.
Definition at line 1060 of file qtextformat.h.
|
inline |
Returns the right border brush of the table cell.
Definition at line 1104 of file qtextformat.h.
|
inline |
Returns the right border style of the table cell.
Definition at line 1082 of file qtextformat.h.
|
inline |
Sets the left, right, top, and bottom border width of the table cell.
Definition at line 1166 of file qtextformat.h.
Sets the left, right, top, and bottom border brush of the table cell.
Definition at line 1182 of file qtextformat.h.
|
inline |
Sets the left, right, top, and bottom border style of the table cell.
Definition at line 1174 of file qtextformat.h.
Sets the bottom border width of the table cell.
Definition at line 1048 of file qtextformat.h.
Sets the bottom border brush of the table cell.
Definition at line 1092 of file qtextformat.h.
|
inline |
Sets the bottom border style of the table cell.
Definition at line 1070 of file qtextformat.h.
Sets the left border width of the table cell.
Definition at line 1053 of file qtextformat.h.
Sets the left border brush of the table cell.
Definition at line 1097 of file qtextformat.h.
|
inline |
Sets the left border style of the table cell.
Definition at line 1075 of file qtextformat.h.
Sets the left, right, top, and bottom padding of the table cell.
Definition at line 1158 of file qtextformat.h.
Sets the right border width of the table cell.
Definition at line 1058 of file qtextformat.h.
Sets the right border brush of the table cell.
Definition at line 1102 of file qtextformat.h.
|
inline |
Sets the right border style of the table cell.
Definition at line 1080 of file qtextformat.h.
Sets the top border width of the table cell.
Definition at line 1043 of file qtextformat.h.
Sets the top border brush of the table cell.
Definition at line 1087 of file qtextformat.h.
|
inline |
Sets the top border style of the table cell.
Definition at line 1065 of file qtextformat.h.
|
inline |
Returns the top border width of the table cell.
Definition at line 1045 of file qtextformat.h.
|
inline |
Returns the top border brush of the table cell.
Definition at line 1089 of file qtextformat.h.
|
inline |
Returns the top border style of the table cell.
Definition at line 1067 of file qtextformat.h.
|
inline |
|
friend |
Definition at line 504 of file qtextformat.cpp.
|
friend |
Definition at line 509 of file qtextformat.cpp.
|
friend |
Definition at line 1113 of file qtextformat.h.