45 #include <QtGui/qcolor.h> 46 #include <QtGui/qfont.h> 47 #include <QtCore/qshareddata.h> 48 #include <QtCore/qvector.h> 49 #include <QtCore/qvariant.h> 50 #include <QtGui/qpen.h> 51 #include <QtGui/qbrush.h> 52 #include <QtGui/qtextoption.h> 79 #ifndef QT_NO_DATASTREAM 87 enum Type { VariableLength = 0, FixedLength, PercentageLength };
89 inline QTextLength() : lengthType(VariableLength), fixedValueOrPercentage(0) {}
93 inline Type type()
const {
return lengthType; }
97 case FixedLength:
return fixedValueOrPercentage;
98 case VariableLength:
return maximumLength;
99 case PercentageLength:
return fixedValueOrPercentage * maximumLength /
qreal(100);
122 : lengthType(atype), fixedValueOrPercentage(avalue) {}
124 #ifndef QT_NO_DATASTREAM 153 BackgroundBrush = 0x820,
154 ForegroundBrush = 0x821,
156 BackgroundImageUrl = 0x823,
159 BlockAlignment = 0x1010,
160 BlockTopMargin = 0x1030,
161 BlockBottomMargin = 0x1031,
162 BlockLeftMargin = 0x1032,
163 BlockRightMargin = 0x1033,
165 TabPositions = 0x1035,
166 BlockIndent = 0x1040,
168 LineHeightType = 0x1049,
169 BlockNonBreakableLines = 0x1050,
170 BlockTrailingHorizontalRulerWidth = 0x1060,
173 FirstFontProperty = 0x1FE0,
174 FontCapitalization = FirstFontProperty,
175 FontLetterSpacing = 0x1FE1,
176 FontWordSpacing = 0x1FE2,
177 FontStyleHint = 0x1FE3,
178 FontStyleStrategy = 0x1FE4,
179 FontKerning = 0x1FE5,
180 FontHintingPreference = 0x1FE6,
182 FontPointSize = 0x2001,
183 FontSizeAdjustment = 0x2002,
184 FontSizeIncrement = FontSizeAdjustment,
187 FontUnderline = 0x2005,
188 FontOverline = 0x2006,
189 FontStrikeOut = 0x2007,
190 FontFixedPitch = 0x2008,
191 FontPixelSize = 0x2009,
192 LastFontProperty = FontPixelSize,
194 TextUnderlineColor = 0x2010,
195 TextVerticalAlignment = 0x2021,
196 TextOutline = 0x2022,
198 TextToolTip = 0x2024,
208 ListNumberPrefix = 0x3002,
209 ListNumberSuffix = 0x3003,
212 FrameBorder = 0x4000,
213 FrameMargin = 0x4001,
214 FramePadding = 0x4002,
216 FrameHeight = 0x4004,
217 FrameTopMargin = 0x4005,
218 FrameBottomMargin = 0x4006,
219 FrameLeftMargin = 0x4007,
220 FrameRightMargin = 0x4008,
221 FrameBorderBrush = 0x4009,
222 FrameBorderStyle = 0x4010,
224 TableColumns = 0x4100,
225 TableColumnWidthConstraints = 0x4101,
226 TableCellSpacing = 0x4102,
227 TableCellPadding = 0x4103,
228 TableHeaderRowCount = 0x4104,
231 TableCellRowSpan = 0x4810,
232 TableCellColumnSpan = 0x4811,
234 TableCellTopPadding = 0x4812,
235 TableCellBottomPadding = 0x4813,
236 TableCellLeftPadding = 0x4814,
237 TableCellRightPadding = 0x4815,
242 ImageHeight = 0x5011,
251 FullWidthSelection = 0x06000,
254 PageBreakPolicy = 0x7000,
257 UserProperty = 0x100000
271 PageBreak_AlwaysBefore = 0x001,
272 PageBreak_AlwaysAfter = 0x010
291 int objectIndex()
const;
292 void setObjectIndex(
int object);
296 void clearProperty(
int propertyId);
297 bool hasProperty(
int propertyId)
const;
299 bool boolProperty(
int propertyId)
const;
300 int intProperty(
int propertyId)
const;
301 qreal doubleProperty(
int propertyId)
const;
302 QString stringProperty(
int propertyId)
const;
303 QColor colorProperty(
int propertyId)
const;
304 QPen penProperty(
int propertyId)
const;
305 QBrush brushProperty(
int propertyId)
const;
312 int propertyCount()
const;
314 inline void setObjectType(
int type);
316 {
return intProperty(ObjectType); }
322 inline bool isImageFormat()
const {
return type() == CharFormat && objectType() == ImageObject; }
323 inline bool isTableFormat()
const {
return type() == FrameFormat && objectType() == TableObject; }
344 { setProperty(BackgroundBrush, brush); }
346 {
return brushProperty(BackgroundBrush); }
348 { clearProperty(BackgroundBrush); }
351 { setProperty(ForegroundBrush, brush); }
353 {
return brushProperty(ForegroundBrush); }
355 { clearProperty(ForegroundBrush); }
531 if (_tableCellRowSpan <= 1)
539 if (_tableCellColumnSpan <= 1)
550 ProportionalHeight = 1,
553 LineDistanceHeight = 4
558 bool isValid()
const {
return isBlockFormat(); }
560 inline void setAlignment(Qt::Alignment alignment);
565 { setProperty(BlockTopMargin, margin); }
567 {
return doubleProperty(BlockTopMargin); }
570 { setProperty(BlockBottomMargin, margin); }
572 {
return doubleProperty(BlockBottomMargin); }
575 { setProperty(BlockLeftMargin, margin); }
577 {
return doubleProperty(BlockLeftMargin); }
580 { setProperty(BlockRightMargin, margin); }
582 {
return doubleProperty(BlockRightMargin); }
589 inline void setIndent(
int indent);
591 {
return intProperty(BlockIndent); }
594 { setProperty(
LineHeight, height); setProperty(LineHeightType, heightType); }
599 {
return intProperty(LineHeightType); }
602 { setProperty(BlockNonBreakableLines, b); }
604 {
return boolProperty(BlockNonBreakableLines); }
607 { setProperty(PageBreakPolicy,
int(flags)); }
609 {
return PageBreakFlags(intProperty(PageBreakPolicy)); }
629 return(scriptLineHeight);
630 case ProportionalHeight:
636 case LineDistanceHeight:
647 bool isValid()
const {
return isListFormat(); }
658 ListStyleUndefined = 0
661 inline void setStyle(
Style style);
665 inline void setIndent(
int indent);
667 {
return intProperty(ListIndent); }
669 inline void setNumberPrefix(
const QString &numberPrefix);
671 {
return stringProperty(ListNumberPrefix); }
673 inline void setNumberSuffix(
const QString &numberSuffix);
675 {
return stringProperty(ListNumberSuffix); }
699 bool isValid()
const {
return isImageFormat(); }
703 {
return stringProperty(ImageName); }
705 inline void setWidth(
qreal width);
707 {
return doubleProperty(ImageWidth); }
709 inline void setHeight(
qreal height);
711 {
return doubleProperty(ImageHeight); }
732 bool isValid()
const {
return isFrameFormat(); }
757 { setProperty(CssFloat, f); }
759 {
return static_cast<Position>(intProperty(CssFloat)); }
761 inline void setBorder(
qreal border);
763 {
return doubleProperty(FrameBorder); }
766 { setProperty(FrameBorderBrush, brush); }
768 {
return brushProperty(FrameBorderBrush); }
771 { setProperty(FrameBorderStyle, style); }
773 {
return static_cast<BorderStyle>(intProperty(FrameBorderStyle)); }
775 void setMargin(
qreal margin);
777 {
return doubleProperty(FrameMargin); }
779 inline void setTopMargin(
qreal margin);
780 qreal topMargin()
const;
782 inline void setBottomMargin(
qreal margin);
783 qreal bottomMargin()
const;
785 inline void setLeftMargin(
qreal margin);
786 qreal leftMargin()
const;
788 inline void setRightMargin(
qreal margin);
789 qreal rightMargin()
const;
791 inline void setPadding(
qreal padding);
793 {
return doubleProperty(FramePadding); }
795 inline void setWidth(
qreal width);
797 { setProperty(FrameWidth, length); }
799 {
return lengthProperty(FrameWidth); }
801 inline void setHeight(
qreal height);
804 {
return lengthProperty(FrameHeight); }
807 { setProperty(PageBreakPolicy,
int(flags)); }
809 {
return PageBreakFlags(intProperty(PageBreakPolicy)); }
847 inline bool isValid()
const {
return isTableFormat(); }
850 {
int cols = intProperty(TableColumns);
if (cols == 0) cols = 1;
return cols; }
851 inline void setColumns(
int columns);
854 { setProperty(TableColumnWidthConstraints, constraints); }
857 {
return lengthVectorProperty(TableColumnWidthConstraints); }
860 { clearProperty(TableColumnWidthConstraints); }
863 {
return doubleProperty(TableCellSpacing); }
865 { setProperty(TableCellSpacing, spacing); }
868 {
return doubleProperty(TableCellPadding); }
869 inline void setCellPadding(
qreal padding);
871 inline void setAlignment(Qt::Alignment alignment);
873 {
return QFlag(intProperty(BlockAlignment)); }
876 { setProperty(TableHeaderRowCount, count); }
878 {
return intProperty(TableHeaderRowCount); }
903 inline bool isValid()
const {
return isTableCellFormat(); }
905 inline void setTopPadding(
qreal padding);
906 inline qreal topPadding()
const;
908 inline void setBottomPadding(
qreal padding);
909 inline qreal bottomPadding()
const;
911 inline void setLeftPadding(
qreal padding);
912 inline qreal leftPadding()
const;
914 inline void setRightPadding(
qreal padding);
915 inline qreal rightPadding()
const;
917 inline void setPadding(
qreal padding);
966 setTopPadding(padding);
967 setBottomPadding(padding);
968 setLeftPadding(padding);
969 setRightPadding(padding);
977 #endif // QTEXTFORMAT_H The QVariant class acts like a union for the most common Qt data types.
void setRightPadding(qreal padding)
Sets the right padding of the table cell.
The QColor class provides colors based on RGB, HSV or CMYK values.
void setFontKerning(bool enable)
Enables kerning for this font if enable is true; otherwise disables it.
qreal cellSpacing() const
Returns the table's cell spacing.
QStringList anchorNames() const
Returns the anchor names associated with this text format, or an empty string list if none has been s...
QFont font() const
Returns the font for this character format.
qreal rightPadding() const
Gets the right padding of the table cell.
HintingPreference
This enum describes the different levels of hinting that can be applied to glyphs to improve legibili...
void setTextOutline(const QPen &pen)
Sets the pen used to draw the outlines of characters to the given pen.
void setBorderBrush(const QBrush &brush)
Sets the brush used for the frame's border.
void setFontItalic(bool italic)
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic...
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
bool isFrameFormat() const
Returns true if this text format is a FrameFormat; otherwise returns false.
The QTextListFormat class provides formatting information for lists in a QTextDocument.
QFont::StyleStrategy fontStyleStrategy() const
Returns the current font style strategy.
QTextLength()
Constructs a new length object which represents a variable size.
#define QT_END_NAMESPACE
This macro expands to.
int columns() const
Returns the number of columns specified by the table format.
void setLineHeight(qreal height, int heightType)
Sets the line height for the paragraph to the value given by height which is dependent on heightType ...
void setPadding(qreal padding)
Sets the width of the frame's internal padding in pixels.
bool fontStrikeOut() const
Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherw...
void setToolTip(const QString &tip)
Sets the tool tip for a fragment of text to the given text.
void setBorder(qreal border)
Sets the width (in pixels) of the frame's border.
int headerRowCount() const
Returns the number of rows in the table that define the header.
void setFontStrikeOut(bool strikeOut)
If strikeOut is true, sets the text format's font with strike-out enabled (with a horizontal line thr...
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QFlag class is a helper data type for QFlags.
QColor colorProperty(int propertyId) const
Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type...
void setBorderStyle(BorderStyle style)
Sets the style of the frame's border.
void setProperty(int propertyId, const QVariant &value)
Sets the property specified by the propertyId to the given value.
QColor underlineColor() const
Returns the color used to underline the characters with this format.
Type type() const
Returns the type of this length object.
ObjectTypes
This enum describes what kind of QTextObject this format is associated with.
Position
This enum describes how a frame is located relative to the surrounding text.
PageBreakFlags pageBreakPolicy() const
Returns the currently set page break policy for the paragraph.
friend Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QTextLength &)
QFont::HintingPreference fontHintingPreference() const
Returns the hinting preference set for this text format.
void clearBackground()
Clears the brush used to paint the document's background.
void setIndent(int indent)
Sets the list format's indentation.
void setFontOverline(bool overline)
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non...
void setVerticalAlignment(VerticalAlignment alignment)
Sets the vertical alignment used for the characters with this format to the alignment specified...
void setFont(const QFont &font)
Sets the text format's font.
void setFontStyleStrategy(QFont::StyleStrategy strategy)
Sets the font style strategy.
void setWidth(qreal width)
Convenience method that sets the width of the frame's border rectangle's width to the specified fixed...
void setCellPadding(qreal padding)
Sets the cell padding for the table.
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
bool isValid() const
Returns true if this block format is valid; otherwise returns false.
QString anchorName() const
This function is deprecated.
bool isValid() const
Returns true if the format description is valid; otherwise returns false.
void setTextIndent(qreal aindent)
Sets the indent for the first line in the block.
void setFontFixedPitch(bool fixedPitch)
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch fon...
long ASN1_INTEGER_get ASN1_INTEGER * a
Type
This enum describes the different types a length object can have.
QTextCharFormat()
Constructs a new character format object.
QString anchorHref() const
Returns the text format's hypertext link, or an empty string if none has been set.
void setBackground(const QBrush &brush)
Sets the brush use to paint the document's background to the brush specified.
void setTableCellRowSpan(int tableCellRowSpan)
If this character format is applied to characters in a table cell, the cell will span tableCellRowSpa...
The QString class provides a Unicode character string.
qreal height() const
Returns the height of the rectangle occupied by the image.
bool isValid() const
Returns true if this character format is valid; otherwise returns false.
qreal topMargin() const
Returns the paragraph's top margin.
void setLeftPadding(qreal padding)
Sets the left padding of the table cell.
int indent() const
Returns the paragraph's indent.
qreal rightMargin() const
Returns the paragraph's right margin.
Capitalization
Rendering option for text this font applies to.
The QVector class is a template class that provides a dynamic array.
LineHeightTypes
This enum describes the various types of line spacing support paragraphs can have.
Qt::Alignment alignment() const
Returns the paragraph's alignment.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void clearForeground()
Clears the brush used to paint the document's foreground.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Qt::LayoutDirection layoutDirection() const
Returns the document's layout direction.
bool isValid() const
Returns true if this image format is valid; otherwise returns false.
bool isValid() const
Returns true if this table format is valid; otherwise returns false.
void setColumnWidthConstraints(const QVector< QTextLength > &constraints)
Sets the column width constraints for the table.
void setTopMargin(qreal margin)
Sets the paragraph's top margin.
void setFontWeight(int weight)
Sets the text format's font weight to weight.
void setAnchorName(const QString &name)
This function is deprecated.
void setAnchorNames(const QStringList &names)
Sets the text format's anchor names.
void setPosition(Position f)
Sets the policy for positioning frames with this frame format.
Position position() const
Returns the positioning policy for frames with this frame format.
void setTopMargin(qreal margin)
Sets the frame's top margin in pixels.
qreal padding() const
Returns the width of the frame's internal padding in pixels.
void setTableCellColumnSpan(int tableCellColumnSpan)
If this character format is applied to characters in a table cell, the cell will span tableCellColumn...
void setLeftMargin(qreal margin)
Sets the paragraph's left margin.
VerticalAlignment
This enum describes the ways that adjacent characters can be vertically aligned.
Qt::Alignment alignment() const
Returns the table's alignment.
void setBottomMargin(qreal margin)
Sets the paragraph's bottom margin.
The QTextImageFormat class provides formatting information for images in a QTextDocument.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Style style() const
Returns the list format's style.
int objectType() const
Returns the text format's object type.
UnderlineStyle underlineStyle() const
Returns the style of underlining the text.
UnderlineStyle
This enum describes the different ways drawing underlined text.
bool fontOverline() const
Returns true if the text format's font is overlined; otherwise returns false.
void setBottomPadding(qreal padding)
Sets the bottom padding of the table cell.
qreal margin() const
Returns the width of the frame's external margin in pixels.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
void setHeaderRowCount(int count)
Declares the first count rows of the table as table header.
void setPageBreakPolicy(PageBreakFlags flags)
Sets the page break policy for the frame/table to policy.
bool isAnchor() const
Returns true if the text is formatted as an anchor; otherwise returns false.
Property
This enum describes the different properties a format can have.
friend Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QTextLength &)
void setFontCapitalization(QFont::Capitalization capitalization)
Sets the capitalization of the text that apppears in this font to capitalization. ...
QString numberSuffix() const
Returns the list format's number suffix.
Style
This enum describes the symbols used to decorate list items:
bool isListFormat() const
Returns true if this text format is a ListFormat; otherwise returns false.
The QTextFormat class provides formatting information for a QTextDocument.
PageBreakFlag
This enum describes how page breaking is performed when printing.
The QTextCursor class offers an API to access and modify QTextDocuments.
void setName(const QString &name)
Sets the name of the image.
bool isValid() const
Returns true if the format is valid (i.
FormatType
This enum describes the text item a QTextFormat object is formatting.
void setPageBreakPolicy(PageBreakFlags flags)
Sets the page break policy for the paragraph to policy.
The QStringList class provides a list of strings.
void setFontLetterSpacing(qreal spacing)
Sets the letter spacing of this format to the given spacing, in percent.
int fontWeight() const
Returns the text format's font weight.
bool operator==(const QTextLength &other) const
Returns true if this text length is the same as the other text length.
QString toolTip() const
Returns the tool tip that is displayed for a fragment of text.
void setUnderlineColor(const QColor &color)
Sets the underline color used for the characters with this format to the color specified.
void setFontPointSize(qreal size)
Sets the text format's font size.
void setNumberPrefix(const QString &numberPrefix)
Sets the list format's number prefix to the string specified by numberPrefix.
void setWidth(const QTextLength &length)
Sets the frame's border rectangle's width.
bool isTableFormat() const
Returns true if this text format is a TableFormat; otherwise returns false.
QBrush background() const
Returns the brush used to paint the document's background.
void setNonBreakableLines(bool b)
If b is true, the lines in the paragraph are treated as non-breakable; otherwise they are breakable...
qreal lineHeight() const
This returns the LineHeight property for the paragraph.
qreal textIndent() const
Returns the paragraph's text indent.
void setObjectType(int type)
Sets the text format's object type to type.
int tableCellRowSpan() const
If this character format is applied to characters in a table cell, this function returns the number o...
QFont::StyleHint fontStyleHint() const
Returns the font style hint.
bool fontKerning() const
Returns true if the font kerning is enabled.
QTextLength height() const
Returns the height of the frame's border rectangle.
The QBrush class defines the fill pattern of shapes drawn by QPainter.
void setColumns(int columns)
Sets the number of columns required by the table format.
VerticalAlignment verticalAlignment() const
Returns the vertical alignment used for characters with this format.
QTextLength width() const
Returns the width of the frame's border rectangle.
void setAlignment(Qt::Alignment alignment)
Sets the paragraph's alignment.
bool nonBreakableLines() const
Returns true if the lines in the paragraph are non-breakable; otherwise returns false.
QString numberPrefix() const
Returns the list format's number prefix.
StyleHint
Style hints are used by the font matching algorithm to find an appropriate default family if a select...
void setCellSpacing(qreal spacing)
Sets the cell spacing for the table.
qreal fixedValueOrPercentage
void setAnchorHref(const QString &value)
Sets the hypertext link for the text format to the given value.
bool isValid() const
Returns true if this table cell format is valid; otherwise returns false.
void setNumberSuffix(const QString &numberSuffix)
Sets the list format's number suffix to the string specified by numberSuffix.
The QFont class specifies a font used for drawing text.
void setPadding(qreal padding)
Sets the left, right, top, and bottom padding of the table cell.
void setAlignment(Qt::Alignment alignment)
Sets the table's alignment.
QSharedDataPointer< QTextFormatPrivate > d
void setFontUnderline(bool underline)
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-und...
void setHeight(qreal height)
Sets the height of the rectangle occupied by the image.
void setLeftMargin(qreal margin)
Sets the frame's left margin in pixels.
void setHeight(qreal height)
Sets the frame's height.
qreal bottomMargin() const
Returns the paragraph's bottom margin.
qreal fontWordSpacing() const
Returns the current word spacing value.
bool isBlockFormat() const
Returns true if this text format is a BlockFormat; otherwise returns false.
int tableCellColumnSpan() const
If this character format is applied to characters in a table cell, this function returns the number o...
bool operator!=(const QTextLength &other) const
Returns true if this text length is different from the other text length.
void setTopPadding(qreal padding)
Sets the top padding of the table cell.
The QTextFrameFormat class provides formatting information for frames in a QTextDocument.
QBrush borderBrush() const
Returns the brush used for the frame's border.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument...
bool fontFixedPitch() const
Returns true if the text format's font is fixed pitch; otherwise returns false.
QBrush foreground() const
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
bool operator!=(const QTextFormat &rhs) const
Returns true if this text format is different from the other text format.
void setFontFamily(const QString &family)
Sets the text format's font family.
bool boolProperty(int propertyId) const
Returns the value of the property specified by propertyId.
void setRightMargin(qreal margin)
Sets the frame's right margin in pixels.
qreal value(qreal maximumLength) const
Returns the effective length, constrained by the type of the length object and the specified maximumL...
void clearColumnWidthConstraints()
Clears the column width constraints for the table.
void setIndent(int indent)
Sets the paragraph's indentation.
void setFontStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy=QFont::PreferDefault)
Sets the font style hint and strategy.
bool isCharFormat() const
Returns true if this text format is a CharFormat; otherwise returns false.
StyleStrategy
The style strategy tells the font matching algorithm what type of fonts should be used to find an app...
static const QCssKnownValue properties[NumProperties - 1]
void setRightMargin(qreal margin)
Sets the paragraph's right margin.
void setFontWordSpacing(qreal spacing)
Sets the word spacing of this format to the given spacing, in pixels.
The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument...
QString stringProperty(int propertyId) const
Returns the value of the property given by propertyId; if the property isn't of QVariant::String type...
void setAnchor(bool anchor)
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate wa...
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
The QTextTableFormat class provides formatting information for tables in a QTextDocument.
int lineHeightType() const
This returns the LineHeightType property of the paragraph.
void setForeground(const QBrush &brush)
Sets the foreground brush to the specified brush.
PageBreakFlags pageBreakPolicy() const
Returns the currently set page break policy for the frame/table.
The QDataStream class provides serialization of binary data to a QIODevice.
void clearProperty(int propertyId)
Clears the value of the property given by propertyId.
qreal rawValue() const
Returns the constraint value that is specific for the type of the length.
qreal fontPointSize() const
Returns the font size used to display text in this format.
qreal topPadding() const
Gets the top padding of the table cell.
int intProperty(int propertyId) const
Returns the value of the property specified by propertyId.
bool isImageFormat() const
Returns true if this text format is an image format; otherwise returns false.
bool isTableCellFormat() const
Returns true if this text format is a TableCellFormat; otherwise returns false.
qreal border() const
Returns the width of the border in pixels.
void setBottomMargin(qreal margin)
Sets the frame's bottom margin in pixels.
qreal cellPadding() const
Returns the table's cell padding.
qreal fontLetterSpacing() const
Returns the current letter spacing percentage.
The QTextObject class is a base class for different kinds of objects that can group parts of a QTextD...
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QTextLength &)
void setStyle(Style style)
Sets the list format's style.
qreal leftPadding() const
Gets the left padding of the table cell.
bool isValid() const
Returns true if this list format is valid; otherwise returns false.
QPen penProperty(int propertyId) const
Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type...
bool fontItalic() const
Returns true if the text format's font is italic; otherwise returns false.
QString fontFamily() const
Returns the text format's font family.
void setLayoutDirection(Qt::LayoutDirection direction)
Sets the document's layout direction to the specified direction.
void setUnderlineStyle(UnderlineStyle style)
Sets the style of underlining the text to style.
qreal bottomPadding() const
Gets the bottom padding of the table cell.
void setWidth(qreal width)
Sets the width of the rectangle occupied by the image.
qreal doubleProperty(int propertyId) const
Returns the value of the property specified by propertyId.
QDataStream & operator<<(QDataStream &out, const QUrl &url)
Writes url url to the stream out and returns a reference to the stream.
BorderStyle
This enum describes different border styles for the text frame.
int indent() const
Returns the list format's indentation.
qreal leftMargin() const
Returns the paragraph's left margin.
void setFontHintingPreference(QFont::HintingPreference hintingPreference)
Sets the hinting preference of the text format's font to be hintingPreference.
QFont::Capitalization fontCapitalization() const
Returns the current capitalization type of the font.
QVector< QTextLength > columnWidthConstraints() const
Returns a list of constraints used by this table format to control the appearance of columns in a tab...
QString name() const
Returns the name of the image.
bool fontUnderline() const
Returns true if the text format's font is underlined; otherwise returns false.
The QMap class is a template class that provides a skip-list-based dictionary.
QPen textOutline() const
Returns the pen used to draw the outlines of characters in this format.
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QTextLength &)
qreal width() const
Returns the width of the rectangle occupied by the image.
BorderStyle borderStyle() const
Returns the style of the frame's border.
Qt::LayoutDirection direction
QDataStream & operator>>(QDataStream &in, QUrl &url)
Reads a url into url from the stream in and returns a reference to the stream.