You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
492 lines
30 KiB
492 lines
30 KiB
14 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qstylesheet.cpp:77 -->
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>QStyleSheetItem Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QStyleSheetItem Class Reference</h1>
|
||
|
|
||
|
<p>The QStyleSheetItem class provides an encapsulation of a set of text styles.
|
||
|
<a href="#details">More...</a>
|
||
|
<p><tt>#include <<a href="qstylesheet-h.html">qstylesheet.h</a>></tt>
|
||
|
<p>Inherits <a href="qt.html">Qt</a>.
|
||
|
<p><a href="qstylesheetitem-members.html">List of all member functions.</a>
|
||
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#QStyleSheetItem"><b>QStyleSheetItem</b></a> ( QStyleSheet * parent, const QString & name )</li>
|
||
|
<li class=fn><a href="#QStyleSheetItem-2"><b>QStyleSheetItem</b></a> ( const QStyleSheetItem & other )</li>
|
||
|
<li class=fn><a href="#~QStyleSheetItem"><b>~QStyleSheetItem</b></a> ()</li>
|
||
|
<li class=fn>QStyleSheetItem & <a href="#operator-eq"><b>operator=</b></a> ( const QStyleSheetItem & other )</li>
|
||
|
<li class=fn>QString <a href="#name"><b>name</b></a> () const</li>
|
||
|
<li class=fn>QStyleSheet * <a href="#styleSheet"><b>styleSheet</b></a> ()</li>
|
||
|
<li class=fn>const QStyleSheet * <a href="#styleSheet-2"><b>styleSheet</b></a> () const</li>
|
||
|
<li class=fn>enum <a href="#DisplayMode-enum"><b>DisplayMode</b></a> { DisplayBlock, DisplayInline, DisplayListItem, DisplayNone }</li>
|
||
|
<li class=fn>DisplayMode <a href="#displayMode"><b>displayMode</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setDisplayMode"><b>setDisplayMode</b></a> ( DisplayMode m )</li>
|
||
|
<li class=fn>int <a href="#alignment"><b>alignment</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setAlignment"><b>setAlignment</b></a> ( int f )</li>
|
||
|
<li class=fn>enum <a href="#VerticalAlignment-enum"><b>VerticalAlignment</b></a> { VAlignBaseline, VAlignSub, VAlignSuper }</li>
|
||
|
<li class=fn>VerticalAlignment <a href="#verticalAlignment"><b>verticalAlignment</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setVerticalAlignment"><b>setVerticalAlignment</b></a> ( VerticalAlignment valign )</li>
|
||
|
<li class=fn>int <a href="#fontWeight"><b>fontWeight</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontWeight"><b>setFontWeight</b></a> ( int w )</li>
|
||
|
<li class=fn>int <a href="#logicalFontSize"><b>logicalFontSize</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setLogicalFontSize"><b>setLogicalFontSize</b></a> ( int s )</li>
|
||
|
<li class=fn>int <a href="#logicalFontSizeStep"><b>logicalFontSizeStep</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setLogicalFontSizeStep"><b>setLogicalFontSizeStep</b></a> ( int s )</li>
|
||
|
<li class=fn>int <a href="#fontSize"><b>fontSize</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontSize"><b>setFontSize</b></a> ( int s )</li>
|
||
|
<li class=fn>QString <a href="#fontFamily"><b>fontFamily</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontFamily"><b>setFontFamily</b></a> ( const QString & fam )</li>
|
||
|
<li class=fn>int numberOfColumns () const <em>(obsolete)</em></li>
|
||
|
<li class=fn>void setNumberOfColumns ( int ncols ) <em>(obsolete)</em></li>
|
||
|
<li class=fn>QColor <a href="#color"><b>color</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setColor"><b>setColor</b></a> ( const QColor & c )</li>
|
||
|
<li class=fn>bool <a href="#fontItalic"><b>fontItalic</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontItalic"><b>setFontItalic</b></a> ( bool italic )</li>
|
||
|
<li class=fn>bool <a href="#definesFontItalic"><b>definesFontItalic</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#fontUnderline"><b>fontUnderline</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontUnderline"><b>setFontUnderline</b></a> ( bool underline )</li>
|
||
|
<li class=fn>bool <a href="#definesFontUnderline"><b>definesFontUnderline</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#fontStrikeOut"><b>fontStrikeOut</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setFontStrikeOut"><b>setFontStrikeOut</b></a> ( bool strikeOut )</li>
|
||
|
<li class=fn>bool <a href="#definesFontStrikeOut"><b>definesFontStrikeOut</b></a> () const</li>
|
||
|
<li class=fn>bool <a href="#isAnchor"><b>isAnchor</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setAnchor"><b>setAnchor</b></a> ( bool anc )</li>
|
||
|
<li class=fn>enum <a href="#WhiteSpaceMode-enum"><b>WhiteSpaceMode</b></a> { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap }</li>
|
||
|
<li class=fn>WhiteSpaceMode <a href="#whiteSpaceMode"><b>whiteSpaceMode</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setWhiteSpaceMode"><b>setWhiteSpaceMode</b></a> ( WhiteSpaceMode m )</li>
|
||
|
<li class=fn>enum <a href="#Margin-enum"><b>Margin</b></a> { MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, MarginVertical, MarginHorizontal }</li>
|
||
|
<li class=fn>int <a href="#margin"><b>margin</b></a> ( Margin m ) const</li>
|
||
|
<li class=fn>void <a href="#setMargin"><b>setMargin</b></a> ( Margin m, int v )</li>
|
||
|
<li class=fn>enum <a href="#ListStyle-enum"><b>ListStyle</b></a> { ListDisc, ListCircle, ListSquare, ListDecimal, ListLowerAlpha, ListUpperAlpha }</li>
|
||
|
<li class=fn>ListStyle <a href="#listStyle"><b>listStyle</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setListStyle"><b>setListStyle</b></a> ( ListStyle s )</li>
|
||
|
<li class=fn>QString <a href="#contexts"><b>contexts</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setContexts"><b>setContexts</b></a> ( const QString & c )</li>
|
||
|
<li class=fn>bool <a href="#allowedInContext"><b>allowedInContext</b></a> ( const QStyleSheetItem * s ) const</li>
|
||
|
<li class=fn>bool <a href="#selfNesting"><b>selfNesting</b></a> () const</li>
|
||
|
<li class=fn>void <a href="#setSelfNesting"><b>setSelfNesting</b></a> ( bool nesting )</li>
|
||
|
<li class=fn>int lineSpacing () const <em>(obsolete)</em></li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
|
The QStyleSheetItem class provides an encapsulation of a set of text styles.
|
||
|
<p>
|
||
|
<p> A style sheet item consists of a name and a set of attributes that
|
||
|
specifiy its font, color, etc. When used in a <a href="qstylesheet.html">style sheet</a> (see <a href="#styleSheet">styleSheet</a>()), items define the <a href="#name">name</a>() of
|
||
|
a rich text tag and the display property changes associated with
|
||
|
it.
|
||
|
<p> The <a href="#DisplayMode-enum">display mode</a>
|
||
|
attribute indicates whether the item is a block, an inline element
|
||
|
or a list element; see <a href="#setDisplayMode">setDisplayMode</a>(). The treatment of
|
||
|
whitespace is controlled by the <a href="#WhiteSpaceMode-enum">white space mode</a>; see
|
||
|
<a href="#setWhiteSpaceMode">setWhiteSpaceMode</a>(). An item's margins are set with <a href="#setMargin">setMargin</a>(),
|
||
|
In the case of list items, the list style is set with
|
||
|
<a href="#setListStyle">setListStyle</a>(). An item may be a hypertext link anchor; see
|
||
|
<a href="#setAnchor">setAnchor</a>(). Other attributes are set with <a href="#setAlignment">setAlignment</a>(),
|
||
|
<a href="#setVerticalAlignment">setVerticalAlignment</a>(), <a href="#setFontFamily">setFontFamily</a>(), <a href="#setFontSize">setFontSize</a>(),
|
||
|
<a href="#setFontWeight">setFontWeight</a>(), <a href="#setFontItalic">setFontItalic</a>(), <a href="#setFontUnderline">setFontUnderline</a>(),
|
||
|
setFontStrikeOut and <a href="#setColor">setColor</a>().
|
||
|
<p>See also <a href="text.html">Text Related Classes</a>.
|
||
|
|
||
|
<hr><h2>Member Type Documentation</h2>
|
||
|
<h3 class=fn><a name="DisplayMode-enum"></a>QStyleSheetItem::DisplayMode</h3>
|
||
|
|
||
|
<p> This enum type defines the way adjacent elements are displayed.
|
||
|
<ul>
|
||
|
<li><tt>QStyleSheetItem::DisplayBlock</tt> - elements are displayed as a rectangular block
|
||
|
(e.g. <tt><p>...</p></tt>).
|
||
|
<li><tt>QStyleSheetItem::DisplayInline</tt> - elements are displayed in a horizontally
|
||
|
flowing sequence (e.g. <tt><em>...</em></tt>).
|
||
|
<li><tt>QStyleSheetItem::DisplayListItem</tt> - elements are displayed in a vertical
|
||
|
sequence (e.g. <tt><li>...</li></tt>).
|
||
|
<li><tt>QStyleSheetItem::DisplayNone</tt> - elements are not displayed at all.
|
||
|
</ul>
|
||
|
<h3 class=fn><a name="ListStyle-enum"></a>QStyleSheetItem::ListStyle</h3>
|
||
|
|
||
|
<p> This enum type defines how the items in a list are prefixed when
|
||
|
displayed.
|
||
|
<ul>
|
||
|
<li><tt>QStyleSheetItem::ListDisc</tt> - a filled circle (i.e. a bullet)
|
||
|
<li><tt>QStyleSheetItem::ListCircle</tt> - an unfilled circle
|
||
|
<li><tt>QStyleSheetItem::ListSquare</tt> - a filled square
|
||
|
<li><tt>QStyleSheetItem::ListDecimal</tt> - an integer in base 10: <em>1</em>, <em>2</em>, <em>3</em>, ...
|
||
|
<li><tt>QStyleSheetItem::ListLowerAlpha</tt> - a lowercase letter: <em>a</em>, <em>b</em>, <em>c</em>, ...
|
||
|
<li><tt>QStyleSheetItem::ListUpperAlpha</tt> - an uppercase letter: <em>A</em>, <em>B</em>, <em>C</em>, ...
|
||
|
</ul>
|
||
|
<h3 class=fn><a name="Margin-enum"></a>QStyleSheetItem::Margin</h3>
|
||
|
|
||
|
<ul>
|
||
|
<li><tt>QStyleSheetItem::MarginLeft</tt> - left margin
|
||
|
<li><tt>QStyleSheetItem::MarginRight</tt> - right margin
|
||
|
<li><tt>QStyleSheetItem::MarginTop</tt> - top margin
|
||
|
<li><tt>QStyleSheetItem::MarginBottom</tt> - bottom margin
|
||
|
<li><tt>QStyleSheetItem::MarginAll</tt> - all margins (left, right, top and bottom)
|
||
|
<li><tt>QStyleSheetItem::MarginVertical</tt> - top and bottom margins
|
||
|
<li><tt>QStyleSheetItem::MarginHorizontal</tt> - left and right margins
|
||
|
<li><tt>QStyleSheetItem::MarginFirstLine</tt> - margin (indentation) of the first line of
|
||
|
a paragarph (in addition to the MarginLeft of the paragraph)
|
||
|
</ul>
|
||
|
<h3 class=fn><a name="VerticalAlignment-enum"></a>QStyleSheetItem::VerticalAlignment</h3>
|
||
|
|
||
|
<p> This enum type defines the way elements are aligned vertically.
|
||
|
This is only supported for text elements.
|
||
|
<ul>
|
||
|
<li><tt>QStyleSheetItem::VAlignBaseline</tt> - align the baseline of the element (or the
|
||
|
bottom, if the element doesn't have a baseline) with the
|
||
|
baseline of the parent
|
||
|
<li><tt>QStyleSheetItem::VAlignSub</tt> - subscript the element
|
||
|
<li><tt>QStyleSheetItem::VAlignSuper</tt> - superscript the element
|
||
|
</ul><p>
|
||
|
<h3 class=fn><a name="WhiteSpaceMode-enum"></a>QStyleSheetItem::WhiteSpaceMode</h3>
|
||
|
|
||
|
<p> This enum defines the ways in which <a href="qstylesheet.html">QStyleSheet</a> can treat
|
||
|
whitespace.
|
||
|
<ul>
|
||
|
<li><tt>QStyleSheetItem::WhiteSpaceNormal</tt> - any sequence of whitespace (including
|
||
|
line-breaks) is equivalent to a single space.
|
||
|
<li><tt>QStyleSheetItem::WhiteSpacePre</tt> - whitespace must be output exactly as given
|
||
|
in the input.
|
||
|
<li><tt>QStyleSheetItem::WhiteSpaceNoWrap</tt> - multiple spaces are collapsed as with
|
||
|
WhiteSpaceNormal, but no automatic line-breaks occur. To break
|
||
|
lines manually, use the <tt><br></tt> tag.
|
||
|
</ul><p>
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
|
<h3 class=fn><a name="QStyleSheetItem"></a>QStyleSheetItem::QStyleSheetItem ( <a href="qstylesheet.html">QStyleSheet</a> * parent, const <a href="qstring.html">QString</a> & name )
|
||
|
</h3>
|
||
|
Constructs a new style called <em>name</em> for the stylesheet <em>parent</em>.
|
||
|
<p> All properties in QStyleSheetItem are initially in the "do not
|
||
|
change" state, except <a href="#DisplayMode-enum">display
|
||
|
mode</a>, which defaults to <a href="#DisplayMode-enum">DisplayInline</a>.
|
||
|
|
||
|
<h3 class=fn><a name="QStyleSheetItem-2"></a>QStyleSheetItem::QStyleSheetItem ( const <a href="qstylesheetitem.html">QStyleSheetItem</a> & other )
|
||
|
</h3>
|
||
|
Copy constructor. Constructs a copy of <em>other</em> that is not bound
|
||
|
to any style sheet.
|
||
|
|
||
|
<h3 class=fn><a name="~QStyleSheetItem"></a>QStyleSheetItem::~QStyleSheetItem ()
|
||
|
</h3>
|
||
|
Destroys the style. Note that QStyleSheetItem objects become
|
||
|
owned by <a href="qstylesheet.html">QStyleSheet</a> when they are created.
|
||
|
|
||
|
<h3 class=fn>int <a name="alignment"></a>QStyleSheetItem::alignment () const
|
||
|
</h3>
|
||
|
Returns the alignment of this style. Possible values are <a href="qt.html#AlignmentFlags-enum">AlignAuto</a>, <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>, <a href="qt.html#AlignmentFlags-enum">AlignRight</a>, <a href="qt.html#AlignmentFlags-enum">AlignCenter</a> or <a href="qt.html#AlignmentFlags-enum">AlignJustify</a>.
|
||
|
<p> <p>See also <a href="#setAlignment">setAlignment</a>() and <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.
|
||
|
|
||
|
<h3 class=fn>bool <a name="allowedInContext"></a>QStyleSheetItem::allowedInContext ( const <a href="qstylesheetitem.html">QStyleSheetItem</a> * s ) const
|
||
|
</h3>
|
||
|
Returns TRUE if this style can be nested into an element of style
|
||
|
<em>s</em>; otherwise returns FALSE.
|
||
|
<p> <p>See also <a href="#contexts">contexts</a>() and <a href="#setContexts">setContexts</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qcolor.html">QColor</a> <a name="color"></a>QStyleSheetItem::color () const
|
||
|
</h3>
|
||
|
Returns the text color of this style or an invalid color if no
|
||
|
color has been set.
|
||
|
<p> <p>See also <a href="#setColor">setColor</a>() and <a href="qcolor.html#isValid">QColor::isValid</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qstring.html">QString</a> <a name="contexts"></a>QStyleSheetItem::contexts () const
|
||
|
</h3>
|
||
|
Returns a space-separated list of names of styles that may contain
|
||
|
elements of this style. If nothing has been set, <a href="#contexts">contexts</a>()
|
||
|
returns an empty string, which indicates that this style can be
|
||
|
nested everywhere.
|
||
|
<p> <p>See also <a href="#setContexts">setContexts</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="definesFontItalic"></a>QStyleSheetItem::definesFontItalic () const
|
||
|
</h3>
|
||
|
Returns TRUE if the style defines a font shape; otherwise returns
|
||
|
FALSE. A style does not define any shape until <a href="#setFontItalic">setFontItalic</a>() is
|
||
|
called.
|
||
|
<p> <p>See also <a href="#setFontItalic">setFontItalic</a>() and <a href="#fontItalic">fontItalic</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="definesFontStrikeOut"></a>QStyleSheetItem::definesFontStrikeOut () const
|
||
|
</h3>
|
||
|
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 <a href="#setFontStrikeOut">setFontStrikeOut</a>() is called.
|
||
|
<p> <p>See also <a href="#setFontStrikeOut">setFontStrikeOut</a>() and <a href="#fontStrikeOut">fontStrikeOut</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="definesFontUnderline"></a>QStyleSheetItem::definesFontUnderline () const
|
||
|
</h3>
|
||
|
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 <a href="#setFontUnderline">setFontUnderline</a>() is called.
|
||
|
<p> <p>See also <a href="#setFontUnderline">setFontUnderline</a>() and <a href="#fontUnderline">fontUnderline</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qstylesheetitem.html#DisplayMode-enum">DisplayMode</a> <a name="displayMode"></a>QStyleSheetItem::displayMode () const
|
||
|
</h3>
|
||
|
Returns the <a href="#DisplayMode-enum">display
|
||
|
mode</a> of the style.
|
||
|
<p> <p>See also <a href="#setDisplayMode">setDisplayMode</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qstring.html">QString</a> <a name="fontFamily"></a>QStyleSheetItem::fontFamily () const
|
||
|
</h3>
|
||
|
Returns the font family setting of the style. This is either a
|
||
|
valid font family or <a href="qstring.html#QString-null">QString::null</a> if no family has been set.
|
||
|
<p> <p>See also <a href="#setFontFamily">setFontFamily</a>(), <a href="qfont.html#family">QFont::family</a>(), and <a href="qfont.html#setFamily">QFont::setFamily</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="fontItalic"></a>QStyleSheetItem::fontItalic () const
|
||
|
</h3>
|
||
|
Returns TRUE if the style sets an italic font; otherwise returns
|
||
|
FALSE.
|
||
|
<p> <p>See also <a href="#setFontItalic">setFontItalic</a>() and <a href="#definesFontItalic">definesFontItalic</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="fontSize"></a>QStyleSheetItem::fontSize () const
|
||
|
</h3>
|
||
|
Returns the font size setting of the style. This is either a valid
|
||
|
point size or <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
|
||
|
<p> <p>See also <a href="#setFontSize">setFontSize</a>(), <a href="qfont.html#pointSize">QFont::pointSize</a>(), and <a href="qfont.html#setPointSize">QFont::setPointSize</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="fontStrikeOut"></a>QStyleSheetItem::fontStrikeOut () const
|
||
|
</h3>
|
||
|
Returns TRUE if the style sets a strike out font; otherwise
|
||
|
returns FALSE.
|
||
|
<p> <p>See also <a href="#setFontStrikeOut">setFontStrikeOut</a>() and <a href="#definesFontStrikeOut">definesFontStrikeOut</a>().
|
||
|
|
||
|
<h3 class=fn>bool <a name="fontUnderline"></a>QStyleSheetItem::fontUnderline () const
|
||
|
</h3>
|
||
|
Returns TRUE if the style sets an underlined font; otherwise
|
||
|
returns FALSE.
|
||
|
<p> <p>See also <a href="#setFontUnderline">setFontUnderline</a>() and <a href="#definesFontUnderline">definesFontUnderline</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="fontWeight"></a>QStyleSheetItem::fontWeight () const
|
||
|
</h3>
|
||
|
Returns the font weight setting of the style. This is either a
|
||
|
valid <a href="qfont.html#Weight-enum">QFont::Weight</a> or the value <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
|
||
|
<p> <p>See also <a href="#setFontWeight">setFontWeight</a>() and <a href="qfont.html">QFont</a>.
|
||
|
|
||
|
<h3 class=fn>bool <a name="isAnchor"></a>QStyleSheetItem::isAnchor () const
|
||
|
</h3>
|
||
|
Returns whether this style is an anchor.
|
||
|
<p> <p>See also <a href="#setAnchor">setAnchor</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="lineSpacing"></a>QStyleSheetItem::lineSpacing () const
|
||
|
</h3>
|
||
|
<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> Returns the linespacing
|
||
|
|
||
|
<h3 class=fn><a href="qstylesheetitem.html#ListStyle-enum">ListStyle</a> <a name="listStyle"></a>QStyleSheetItem::listStyle () const
|
||
|
</h3>
|
||
|
Returns the list style of the style.
|
||
|
<p> <p>See also <a href="#setListStyle">setListStyle</a>() and <a href="#ListStyle-enum">ListStyle</a>.
|
||
|
|
||
|
<h3 class=fn>int <a name="logicalFontSize"></a>QStyleSheetItem::logicalFontSize () const
|
||
|
</h3>
|
||
|
Returns the logical font size setting of the style. This is either
|
||
|
a valid size between 1 and 7 or <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
|
||
|
<p> <p>See also <a href="#setLogicalFontSize">setLogicalFontSize</a>(), <a href="#setLogicalFontSizeStep">setLogicalFontSizeStep</a>(), <a href="qfont.html#pointSize">QFont::pointSize</a>(), and <a href="qfont.html#setPointSize">QFont::setPointSize</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="logicalFontSizeStep"></a>QStyleSheetItem::logicalFontSizeStep () const
|
||
|
</h3>
|
||
|
Returns the logical font size step of this style.
|
||
|
<p> The default is 0. Tags such as <tt>big</tt> define <tt>+1</tt>; <tt>small</tt>
|
||
|
defines <tt>-1</tt>.
|
||
|
<p> <p>See also <a href="#setLogicalFontSizeStep">setLogicalFontSizeStep</a>().
|
||
|
|
||
|
<h3 class=fn>int <a name="margin"></a>QStyleSheetItem::margin ( <a href="qstylesheetitem.html#Margin-enum">Margin</a> m ) const
|
||
|
</h3>
|
||
|
Returns the width of margin <em>m</em> in pixels.
|
||
|
<p> The margin, <em>m</em>, can be <a href="#Margin-enum">MarginLeft</a>, <a href="#Margin-enum">MarginRight</a>, <a href="#Margin-enum">MarginTop</a>, <a href="#Margin-enum">MarginBottom</a>, or <a href="#Margin-enum">MarginFirstLine</a>.
|
||
|
<p> <p>See also <a href="#setMargin">setMargin</a>() and <a href="#Margin-enum">Margin</a>.
|
||
|
|
||
|
<h3 class=fn><a href="qstring.html">QString</a> <a name="name"></a>QStyleSheetItem::name () const
|
||
|
</h3>
|
||
|
Returns the name of the style item.
|
||
|
|
||
|
<h3 class=fn>int <a name="numberOfColumns"></a>QStyleSheetItem::numberOfColumns () const
|
||
|
</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> Returns the number of columns for this style.
|
||
|
<p> <p>See also <a href="#setNumberOfColumns">setNumberOfColumns</a>(), <a href="#displayMode">displayMode</a>(), and <a href="#setDisplayMode">setDisplayMode</a>().
|
||
|
|
||
|
<p>
|
||
|
<h3 class=fn><a href="qstylesheetitem.html">QStyleSheetItem</a> & <a name="operator-eq"></a>QStyleSheetItem::operator= ( const <a href="qstylesheetitem.html">QStyleSheetItem</a> & other )
|
||
|
</h3>
|
||
|
Assignment. Assings a copy of <em>other</em> that is not bound to any style sheet.
|
||
|
Unbounds first from previous style sheet.
|
||
|
|
||
|
<h3 class=fn>bool <a name="selfNesting"></a>QStyleSheetItem::selfNesting () const
|
||
|
</h3>
|
||
|
Returns TRUE if this style has self-nesting enabled; otherwise
|
||
|
returns FALSE.
|
||
|
<p> <p>See also <a href="#setSelfNesting">setSelfNesting</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setAlignment"></a>QStyleSheetItem::setAlignment ( int f )
|
||
|
</h3>
|
||
|
Sets the alignment to <em>f</em>. This only makes sense for styles with
|
||
|
a <a href="#DisplayMode-enum">display mode</a> of
|
||
|
DisplayBlock. Possible values are <a href="qt.html#AlignmentFlags-enum">AlignAuto</a>, <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>,
|
||
|
<a href="qt.html#AlignmentFlags-enum">AlignRight</a>, <a href="qt.html#AlignmentFlags-enum">AlignCenter</a> or <a href="qt.html#AlignmentFlags-enum">AlignJustify</a>.
|
||
|
<p> <p>See also <a href="#alignment">alignment</a>(), <a href="#displayMode">displayMode</a>(), and <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.
|
||
|
|
||
|
<h3 class=fn>void <a name="setAnchor"></a>QStyleSheetItem::setAnchor ( bool anc )
|
||
|
</h3>
|
||
|
If <em>anc</em> 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.
|
||
|
<p> <p>See also <a href="#isAnchor">isAnchor</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setColor"></a>QStyleSheetItem::setColor ( const <a href="qcolor.html">QColor</a> & c )
|
||
|
</h3>
|
||
|
Sets the text color of this style to <em>c</em>.
|
||
|
<p> <p>See also <a href="#color">color</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setContexts"></a>QStyleSheetItem::setContexts ( const <a href="qstring.html">QString</a> & c )
|
||
|
</h3>
|
||
|
Sets a space-separated list of names of styles that may contain
|
||
|
elements of this style. If <em>c</em> is empty, the style can be nested
|
||
|
everywhere.
|
||
|
<p> <p>See also <a href="#contexts">contexts</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setDisplayMode"></a>QStyleSheetItem::setDisplayMode ( <a href="qstylesheetitem.html#DisplayMode-enum">DisplayMode</a> m )
|
||
|
</h3>
|
||
|
Sets the display mode of the style to <em>m</em>.
|
||
|
<p> <p>See also <a href="#displayMode">displayMode</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontFamily"></a>QStyleSheetItem::setFontFamily ( const <a href="qstring.html">QString</a> & fam )
|
||
|
</h3>
|
||
|
Sets the font family setting of the style to <em>fam</em>.
|
||
|
<p> <p>See also <a href="#fontFamily">fontFamily</a>(), <a href="qfont.html#family">QFont::family</a>(), and <a href="qfont.html#setFamily">QFont::setFamily</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontItalic"></a>QStyleSheetItem::setFontItalic ( bool italic )
|
||
|
</h3>
|
||
|
If <em>italic</em> is TRUE sets italic for the style; otherwise sets
|
||
|
upright.
|
||
|
<p> <p>See also <a href="#fontItalic">fontItalic</a>() and <a href="#definesFontItalic">definesFontItalic</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontSize"></a>QStyleSheetItem::setFontSize ( int s )
|
||
|
</h3>
|
||
|
Sets the font size setting of the style to <em>s</em> points.
|
||
|
<p> <p>See also <a href="#fontSize">fontSize</a>(), <a href="qfont.html#pointSize">QFont::pointSize</a>(), and <a href="qfont.html#setPointSize">QFont::setPointSize</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontStrikeOut"></a>QStyleSheetItem::setFontStrikeOut ( bool strikeOut )
|
||
|
</h3>
|
||
|
If <em>strikeOut</em> is TRUE, sets strike out for the style; otherwise
|
||
|
sets no strike out.
|
||
|
<p> <p>See also <a href="#fontStrikeOut">fontStrikeOut</a>() and <a href="#definesFontStrikeOut">definesFontStrikeOut</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontUnderline"></a>QStyleSheetItem::setFontUnderline ( bool underline )
|
||
|
</h3>
|
||
|
If <em>underline</em> is TRUE, sets underline for the style; otherwise
|
||
|
sets no underline.
|
||
|
<p> <p>See also <a href="#fontUnderline">fontUnderline</a>() and <a href="#definesFontUnderline">definesFontUnderline</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setFontWeight"></a>QStyleSheetItem::setFontWeight ( int w )
|
||
|
</h3>
|
||
|
Sets the font weight setting of the style to <em>w</em>. Valid values
|
||
|
are those defined by <a href="qfont.html#Weight-enum">QFont::Weight</a>.
|
||
|
<p> <p>See also <a href="qfont.html">QFont</a> and <a href="#fontWeight">fontWeight</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setListStyle"></a>QStyleSheetItem::setListStyle ( <a href="qstylesheetitem.html#ListStyle-enum">ListStyle</a> s )
|
||
|
</h3>
|
||
|
Sets the list style of the style to <em>s</em>.
|
||
|
<p> This is used by nested elements that have a display mode of <a href="#DisplayMode-enum">DisplayListItem</a>.
|
||
|
<p> <p>See also <a href="#listStyle">listStyle</a>(), <a href="#DisplayMode-enum">DisplayMode</a>, and <a href="#ListStyle-enum">ListStyle</a>.
|
||
|
|
||
|
<h3 class=fn>void <a name="setLogicalFontSize"></a>QStyleSheetItem::setLogicalFontSize ( int s )
|
||
|
</h3>
|
||
|
Sets the logical font size setting of the style to <em>s</em>. Valid
|
||
|
logical sizes are 1 to 7.
|
||
|
<p> <p>See also <a href="#logicalFontSize">logicalFontSize</a>(), <a href="qfont.html#pointSize">QFont::pointSize</a>(), and <a href="qfont.html#setPointSize">QFont::setPointSize</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setLogicalFontSizeStep"></a>QStyleSheetItem::setLogicalFontSizeStep ( int s )
|
||
|
</h3>
|
||
|
Sets the logical font size step of this style to <em>s</em>.
|
||
|
<p> <p>See also <a href="#logicalFontSizeStep">logicalFontSizeStep</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setMargin"></a>QStyleSheetItem::setMargin ( <a href="qstylesheetitem.html#Margin-enum">Margin</a> m, int v )
|
||
|
</h3>
|
||
|
Sets the width of margin <em>m</em> to <em>v</em> pixels.
|
||
|
<p> The margin, <em>m</em>, can be <a href="#Margin-enum">MarginLeft</a>, <a href="#Margin-enum">MarginRight</a>, <a href="#Margin-enum">MarginTop</a>, <a href="#Margin-enum">MarginBottom</a>, <a href="#Margin-enum">MarginFirstLine</a>, <a href="#Margin-enum">MarginAll</a>,
|
||
|
<a href="#Margin-enum">MarginVertical</a> or <a href="#Margin-enum">MarginHorizontal</a>. The value <em>v</em> must
|
||
|
be >= 0.
|
||
|
<p> <p>See also <a href="#margin">margin</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setNumberOfColumns"></a>QStyleSheetItem::setNumberOfColumns ( int ncols )
|
||
|
</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> Sets the number of columns for this style. Elements in the style
|
||
|
are divided into columns.
|
||
|
<p> This makes sense only if the style uses a block display mode
|
||
|
(see QStyleSheetItem::DisplayMode).
|
||
|
<p> <p>See also <a href="#numberOfColumns">numberOfColumns</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setSelfNesting"></a>QStyleSheetItem::setSelfNesting ( bool nesting )
|
||
|
</h3>
|
||
|
Sets the self-nesting property for this style to <em>nesting</em>.
|
||
|
<p> In order to support "dirty" HTML, paragraphs <tt><p></tt> and list
|
||
|
items <tt><li></tt> are not self-nesting. This means that starting a
|
||
|
new paragraph or list item automatically closes the previous one.
|
||
|
<p> <p>See also <a href="#selfNesting">selfNesting</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setVerticalAlignment"></a>QStyleSheetItem::setVerticalAlignment ( <a href="qstylesheetitem.html#VerticalAlignment-enum">VerticalAlignment</a> valign )
|
||
|
</h3>
|
||
|
Sets the vertical alignment to <em>valign</em>. Possible values are
|
||
|
<a href="#VerticalAlignment-enum">VAlignBaseline</a>, <a href="#VerticalAlignment-enum">VAlignSub</a> or <a href="#VerticalAlignment-enum">VAlignSuper</a>.
|
||
|
<p> The vertical alignment property is not inherited.
|
||
|
<p> <p>See also <a href="#verticalAlignment">verticalAlignment</a>().
|
||
|
|
||
|
<h3 class=fn>void <a name="setWhiteSpaceMode"></a>QStyleSheetItem::setWhiteSpaceMode ( <a href="qstylesheetitem.html#WhiteSpaceMode-enum">WhiteSpaceMode</a> m )
|
||
|
</h3>
|
||
|
Sets the whitespace mode to <em>m</em>.
|
||
|
<p> <p>See also <a href="#WhiteSpaceMode-enum">WhiteSpaceMode</a>.
|
||
|
|
||
|
<h3 class=fn><a href="qstylesheet.html">QStyleSheet</a> * <a name="styleSheet"></a>QStyleSheetItem::styleSheet ()
|
||
|
</h3>
|
||
|
Returns the style sheet this item is in.
|
||
|
|
||
|
<h3 class=fn>const <a href="qstylesheet.html">QStyleSheet</a> * <a name="styleSheet-2"></a>QStyleSheetItem::styleSheet () const
|
||
|
</h3>
|
||
|
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
||
|
<p> Returns the style sheet this item is in.
|
||
|
|
||
|
<h3 class=fn><a href="qstylesheetitem.html#VerticalAlignment-enum">VerticalAlignment</a> <a name="verticalAlignment"></a>QStyleSheetItem::verticalAlignment () const
|
||
|
</h3>
|
||
|
Returns the vertical alignment of the style. Possible values are
|
||
|
<a href="#VerticalAlignment-enum">VAlignBaseline</a>, <a href="#VerticalAlignment-enum">VAlignSub</a> or <a href="#VerticalAlignment-enum">VAlignSuper</a>.
|
||
|
<p> <p>See also <a href="#setVerticalAlignment">setVerticalAlignment</a>().
|
||
|
|
||
|
<h3 class=fn><a href="qstylesheetitem.html#WhiteSpaceMode-enum">WhiteSpaceMode</a> <a name="whiteSpaceMode"></a>QStyleSheetItem::whiteSpaceMode () const
|
||
|
</h3>
|
||
|
Returns the whitespace mode.
|
||
|
<p> <p>See also <a href="#setWhiteSpaceMode">setWhiteSpaceMode</a>() and <a href="#WhiteSpaceMode-enum">WhiteSpaceMode</a>.
|
||
|
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">Qt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>Qt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|