.BI "bool \fBallowedInContext\fR ( const QStyleSheetItem * s ) const"
.br
.ti -1c
.BI "bool \fBselfNesting\fR () const"
.br
.ti -1c
.BI "void \fBsetSelfNesting\fR ( bool nesting )"
.br
.ti -1c
.BI "int lineSpacing () const \fI(obsolete)\fR"
.br
.in -1c
.SH DESCRIPTION
The QStyleSheetItem class provides an encapsulation of a set of text styles.
.PP
A style sheet item consists of a name and a set of attributes that specifiy its font, color, etc. When used in a style sheet (see styleSheet()), items define the name() of a rich text tag and the display property changes associated with it.
.PP
The display mode attribute indicates whether the item is a block, an inline element or a list element; see setDisplayMode(). The treatment of whitespace is controlled by the white space mode; see setWhiteSpaceMode(). An item's margins are set with setMargin(), In the case of list items, the list style is set with setListStyle(). An item may be a hypertext link anchor; see setAnchor(). Other attributes are set with setAlignment(), setVerticalAlignment(), setFontFamily(), setFontSize(), setFontWeight(), setFontItalic(), setFontUnderline(), setFontStrikeOut and setColor().
.PP
See also Text Related Classes.
.SS "Member Type Documentation"
.SH "QStyleSheetItem::DisplayMode"
This enum type defines the way adjacent elements are displayed.
.TP
\fCQStyleSheetItem::DisplayBlock\fR - elements are displayed as a rectangular block (e.g. \fC<p>...</p>\fR).
.TP
\fCQStyleSheetItem::DisplayInline\fR - elements are displayed in a horizontally flowing sequence (e.g. \fC<em>...</em>\fR).
.TP
\fCQStyleSheetItem::DisplayListItem\fR - elements are displayed in a vertical sequence (e.g. \fC<li>...</li>\fR).
.TP
\fCQStyleSheetItem::DisplayNone\fR - elements are not displayed at all.
.SH "QStyleSheetItem::ListStyle"
This enum type defines how the items in a list are prefixed when displayed.
.TP
\fCQStyleSheetItem::ListDisc\fR - a filled circle (i.e. a bullet)
.TP
\fCQStyleSheetItem::ListCircle\fR - an unfilled circle
.TP
\fCQStyleSheetItem::ListSquare\fR - a filled square
.TP
\fCQStyleSheetItem::ListDecimal\fR - an integer in base 10: \fI1\fR, \fI2\fR, \fI3\fR, ...
.TP
\fCQStyleSheetItem::ListLowerAlpha\fR - a lowercase letter: \fIa\fR, \fIb\fR, \fIc\fR, ...
.TP
\fCQStyleSheetItem::ListUpperAlpha\fR - an uppercase letter: \fIA\fR, \fIB\fR, \fIC\fR, ...
\fCQStyleSheetItem::MarginAll\fR - all margins (left, right, top and bottom)
.TP
\fCQStyleSheetItem::MarginVertical\fR - top and bottom margins
.TP
\fCQStyleSheetItem::MarginHorizontal\fR - left and right margins
.TP
\fCQStyleSheetItem::MarginFirstLine\fR - margin (indentation) of the first line of a paragarph (in addition to the MarginLeft of the paragraph)
.SH "QStyleSheetItem::VerticalAlignment"
This enum type defines the way elements are aligned vertically. This is only supported for text elements.
.TP
\fCQStyleSheetItem::VAlignBaseline\fR - align the baseline of the element (or the bottom, if the element doesn't have a baseline) with the baseline of the parent
.TP
\fCQStyleSheetItem::VAlignSub\fR - subscript the element
.TP
\fCQStyleSheetItem::VAlignSuper\fR - superscript the element
.SH "QStyleSheetItem::WhiteSpaceMode"
This enum defines the ways in which QStyleSheet can treat whitespace.
.TP
\fCQStyleSheetItem::WhiteSpaceNormal\fR - any sequence of whitespace (including line-breaks) is equivalent to a single space.
.TP
\fCQStyleSheetItem::WhiteSpacePre\fR - whitespace must be output exactly as given in the input.
.TP
\fCQStyleSheetItem::WhiteSpaceNoWrap\fR - multiple spaces are collapsed as with WhiteSpaceNormal, but no automatic line-breaks occur. To break lines manually, use the \fC<br>\fR tag.
Returns a space-separated list of names of styles that may contain elements of this style. If nothing has been set, contexts() returns an empty string, which indicates that this style can be nested everywhere.
Returns TRUE if the style defines a setting for the strikeOut property of the font; otherwise returns FALSE. A style does not define this until setFontStrikeOut() is called.
Returns TRUE if the style defines a setting for the underline property of the font; otherwise returns FALSE. A style does not define this until setFontUnderline() is called.
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Returns the number of columns for this style.
.PP
See also setNumberOfColumns(), displayMode(), and setDisplayMode().
.SH "QStyleSheetItem & QStyleSheetItem::operator= ( const QStyleSheetItem & other )"
Assignment. Assings a copy of \fIother\fR that is not bound to any style sheet. Unbounds first from previous style sheet.
.SH "bool QStyleSheetItem::selfNesting () const"
Returns TRUE if this style has self-nesting enabled; otherwise returns FALSE.
.PP
See also setSelfNesting().
.SH "void QStyleSheetItem::setAlignment ( int f )"
Sets the alignment to \fIf\fR. This only makes sense for styles with a display mode of DisplayBlock. Possible values are AlignAuto, AlignLeft, AlignRight, AlignCenter or AlignJustify.
If \fIanc\fR is TRUE, sets this style to be an anchor (hypertext link); otherwise sets it to not be an anchor. Elements in this style link to other documents or anchors.
If \fIunderline\fR is TRUE, sets underline for the style; otherwise sets no underline.
.PP
See also fontUnderline() and definesFontUnderline().
.SH "void QStyleSheetItem::setFontWeight ( int w )"
Sets the font weight setting of the style to \fIw\fR. Valid values are those defined by QFont::Weight.
.PP
See also QFont and fontWeight().
.SH "void QStyleSheetItem::setListStyle ( ListStyle s )"
Sets the list style of the style to \fIs\fR.
.PP
This is used by nested elements that have a display mode of DisplayListItem.
.PP
See also listStyle(), DisplayMode, and ListStyle.
.SH "void QStyleSheetItem::setLogicalFontSize ( int s )"
Sets the logical font size setting of the style to \fIs\fR. Valid logical sizes are 1 to 7.
.PP
See also logicalFontSize(), QFont::pointSize(), and QFont::setPointSize().
.SH "void QStyleSheetItem::setLogicalFontSizeStep ( int s )"
Sets the logical font size step of this style to \fIs\fR.
.PP
See also logicalFontSizeStep().
.SH "void QStyleSheetItem::setMargin ( Margin m, int v )"
Sets the width of margin \fIm\fR to \fIv\fR pixels.
.PP
The margin, \fIm\fR, can be MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, MarginVertical or MarginHorizontal. The value \fIv\fR must be >= 0.
.PP
See also margin().
.SH "void QStyleSheetItem::setNumberOfColumns ( int ncols )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Sets the number of columns for this style. Elements in the style are divided into columns.
.PP
This makes sense only if the style uses a block display mode (see QStyleSheetItem::DisplayMode).
Sets the self-nesting property for this style to \fInesting\fR.
.PP
In order to support "dirty" HTML, paragraphs \fC<p>\fR and list items \fC<li>\fR are not self-nesting. This means that starting a new paragraph or list item automatically closes the previous one.