source: trunk/doc/html/qstylesheetitem.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 30.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qstylesheet.cpp:77 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QStyleSheetItem Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<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>
33
34<p>The QStyleSheetItem class provides an encapsulation of a set of text styles.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qstylesheet-h.html">qstylesheet.h</a>&gt;</tt>
37<p>Inherits <a href="qt.html">Qt</a>.
38<p><a href="qstylesheetitem-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QStyleSheetItem"><b>QStyleSheetItem</b></a> ( QStyleSheet&nbsp;*&nbsp;parent, const&nbsp;QString&nbsp;&amp;&nbsp;name )</li>
42<li class=fn><a href="#QStyleSheetItem-2"><b>QStyleSheetItem</b></a> ( const&nbsp;QStyleSheetItem&nbsp;&amp;&nbsp;other )</li>
43<li class=fn><a href="#~QStyleSheetItem"><b>~QStyleSheetItem</b></a> ()</li>
44<li class=fn>QStyleSheetItem &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QStyleSheetItem&nbsp;&amp;&nbsp;other )</li>
45<li class=fn>QString <a href="#name"><b>name</b></a> () const</li>
46<li class=fn>QStyleSheet * <a href="#styleSheet"><b>styleSheet</b></a> ()</li>
47<li class=fn>const QStyleSheet * <a href="#styleSheet-2"><b>styleSheet</b></a> () const</li>
48<li class=fn>enum <a href="#DisplayMode-enum"><b>DisplayMode</b></a> { DisplayBlock, DisplayInline, DisplayListItem, DisplayNone }</li>
49<li class=fn>DisplayMode <a href="#displayMode"><b>displayMode</b></a> () const</li>
50<li class=fn>void <a href="#setDisplayMode"><b>setDisplayMode</b></a> ( DisplayMode&nbsp;m )</li>
51<li class=fn>int <a href="#alignment"><b>alignment</b></a> () const</li>
52<li class=fn>void <a href="#setAlignment"><b>setAlignment</b></a> ( int&nbsp;f )</li>
53<li class=fn>enum <a href="#VerticalAlignment-enum"><b>VerticalAlignment</b></a> { VAlignBaseline, VAlignSub, VAlignSuper }</li>
54<li class=fn>VerticalAlignment <a href="#verticalAlignment"><b>verticalAlignment</b></a> () const</li>
55<li class=fn>void <a href="#setVerticalAlignment"><b>setVerticalAlignment</b></a> ( VerticalAlignment&nbsp;valign )</li>
56<li class=fn>int <a href="#fontWeight"><b>fontWeight</b></a> () const</li>
57<li class=fn>void <a href="#setFontWeight"><b>setFontWeight</b></a> ( int&nbsp;w )</li>
58<li class=fn>int <a href="#logicalFontSize"><b>logicalFontSize</b></a> () const</li>
59<li class=fn>void <a href="#setLogicalFontSize"><b>setLogicalFontSize</b></a> ( int&nbsp;s )</li>
60<li class=fn>int <a href="#logicalFontSizeStep"><b>logicalFontSizeStep</b></a> () const</li>
61<li class=fn>void <a href="#setLogicalFontSizeStep"><b>setLogicalFontSizeStep</b></a> ( int&nbsp;s )</li>
62<li class=fn>int <a href="#fontSize"><b>fontSize</b></a> () const</li>
63<li class=fn>void <a href="#setFontSize"><b>setFontSize</b></a> ( int&nbsp;s )</li>
64<li class=fn>QString <a href="#fontFamily"><b>fontFamily</b></a> () const</li>
65<li class=fn>void <a href="#setFontFamily"><b>setFontFamily</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;fam )</li>
66<li class=fn>int numberOfColumns () const &nbsp;<em>(obsolete)</em></li>
67<li class=fn>void setNumberOfColumns ( int&nbsp;ncols ) &nbsp;<em>(obsolete)</em></li>
68<li class=fn>QColor <a href="#color"><b>color</b></a> () const</li>
69<li class=fn>void <a href="#setColor"><b>setColor</b></a> ( const&nbsp;QColor&nbsp;&amp;&nbsp;c )</li>
70<li class=fn>bool <a href="#fontItalic"><b>fontItalic</b></a> () const</li>
71<li class=fn>void <a href="#setFontItalic"><b>setFontItalic</b></a> ( bool&nbsp;italic )</li>
72<li class=fn>bool <a href="#definesFontItalic"><b>definesFontItalic</b></a> () const</li>
73<li class=fn>bool <a href="#fontUnderline"><b>fontUnderline</b></a> () const</li>
74<li class=fn>void <a href="#setFontUnderline"><b>setFontUnderline</b></a> ( bool&nbsp;underline )</li>
75<li class=fn>bool <a href="#definesFontUnderline"><b>definesFontUnderline</b></a> () const</li>
76<li class=fn>bool <a href="#fontStrikeOut"><b>fontStrikeOut</b></a> () const</li>
77<li class=fn>void <a href="#setFontStrikeOut"><b>setFontStrikeOut</b></a> ( bool&nbsp;strikeOut )</li>
78<li class=fn>bool <a href="#definesFontStrikeOut"><b>definesFontStrikeOut</b></a> () const</li>
79<li class=fn>bool <a href="#isAnchor"><b>isAnchor</b></a> () const</li>
80<li class=fn>void <a href="#setAnchor"><b>setAnchor</b></a> ( bool&nbsp;anc )</li>
81<li class=fn>enum <a href="#WhiteSpaceMode-enum"><b>WhiteSpaceMode</b></a> { WhiteSpaceNormal, WhiteSpacePre, WhiteSpaceNoWrap }</li>
82<li class=fn>WhiteSpaceMode <a href="#whiteSpaceMode"><b>whiteSpaceMode</b></a> () const</li>
83<li class=fn>void <a href="#setWhiteSpaceMode"><b>setWhiteSpaceMode</b></a> ( WhiteSpaceMode&nbsp;m )</li>
84<li class=fn>enum <a href="#Margin-enum"><b>Margin</b></a> { MarginLeft, MarginRight, MarginTop, MarginBottom, MarginFirstLine, MarginAll, MarginVertical, MarginHorizontal }</li>
85<li class=fn>int <a href="#margin"><b>margin</b></a> ( Margin&nbsp;m ) const</li>
86<li class=fn>void <a href="#setMargin"><b>setMargin</b></a> ( Margin&nbsp;m, int&nbsp;v )</li>
87<li class=fn>enum <a href="#ListStyle-enum"><b>ListStyle</b></a> { ListDisc, ListCircle, ListSquare, ListDecimal, ListLowerAlpha, ListUpperAlpha }</li>
88<li class=fn>ListStyle <a href="#listStyle"><b>listStyle</b></a> () const</li>
89<li class=fn>void <a href="#setListStyle"><b>setListStyle</b></a> ( ListStyle&nbsp;s )</li>
90<li class=fn>QString <a href="#contexts"><b>contexts</b></a> () const</li>
91<li class=fn>void <a href="#setContexts"><b>setContexts</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;c )</li>
92<li class=fn>bool <a href="#allowedInContext"><b>allowedInContext</b></a> ( const&nbsp;QStyleSheetItem&nbsp;*&nbsp;s ) const</li>
93<li class=fn>bool <a href="#selfNesting"><b>selfNesting</b></a> () const</li>
94<li class=fn>void <a href="#setSelfNesting"><b>setSelfNesting</b></a> ( bool&nbsp;nesting )</li>
95<li class=fn>int lineSpacing () const &nbsp;<em>(obsolete)</em></li>
96</ul>
97<hr><a name="details"></a><h2>Detailed Description</h2>
98
99
100The QStyleSheetItem class provides an encapsulation of a set of text styles.
101<p>
102<p> A style sheet item consists of a name and a set of attributes that
103specifiy 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
104a rich text tag and the display property changes associated with
105it.
106<p> The <a href="#DisplayMode-enum">display mode</a>
107attribute indicates whether the item is a block, an inline element
108or a list element; see <a href="#setDisplayMode">setDisplayMode</a>(). The treatment of
109whitespace is controlled by the <a href="#WhiteSpaceMode-enum">white space mode</a>; see
110<a href="#setWhiteSpaceMode">setWhiteSpaceMode</a>(). An item's margins are set with <a href="#setMargin">setMargin</a>(),
111In the case of list items, the list style is set with
112<a href="#setListStyle">setListStyle</a>(). An item may be a hypertext link anchor; see
113<a href="#setAnchor">setAnchor</a>(). Other attributes are set with <a href="#setAlignment">setAlignment</a>(),
114<a href="#setVerticalAlignment">setVerticalAlignment</a>(), <a href="#setFontFamily">setFontFamily</a>(), <a href="#setFontSize">setFontSize</a>(),
115<a href="#setFontWeight">setFontWeight</a>(), <a href="#setFontItalic">setFontItalic</a>(), <a href="#setFontUnderline">setFontUnderline</a>(),
116setFontStrikeOut and <a href="#setColor">setColor</a>().
117<p>See also <a href="text.html">Text Related Classes</a>.
118
119<hr><h2>Member Type Documentation</h2>
120<h3 class=fn><a name="DisplayMode-enum"></a>QStyleSheetItem::DisplayMode</h3>
121
122<p> This enum type defines the way adjacent elements are displayed.
123<ul>
124<li><tt>QStyleSheetItem::DisplayBlock</tt> - elements are displayed as a rectangular block
125(e.g. <tt>&lt;p&gt;...&lt;/p&gt;</tt>).
126<li><tt>QStyleSheetItem::DisplayInline</tt> - elements are displayed in a horizontally
127flowing sequence (e.g. <tt>&lt;em&gt;...&lt;/em&gt;</tt>).
128<li><tt>QStyleSheetItem::DisplayListItem</tt> - elements are displayed in a vertical
129sequence (e.g. <tt>&lt;li&gt;...&lt;/li&gt;</tt>).
130<li><tt>QStyleSheetItem::DisplayNone</tt> - elements are not displayed at all.
131</ul>
132<h3 class=fn><a name="ListStyle-enum"></a>QStyleSheetItem::ListStyle</h3>
133
134<p> This enum type defines how the items in a list are prefixed when
135displayed.
136<ul>
137<li><tt>QStyleSheetItem::ListDisc</tt> - a filled circle (i.e. a bullet)
138<li><tt>QStyleSheetItem::ListCircle</tt> - an unfilled circle
139<li><tt>QStyleSheetItem::ListSquare</tt> - a filled square
140<li><tt>QStyleSheetItem::ListDecimal</tt> - an integer in base 10: <em>1</em>, <em>2</em>, <em>3</em>, ...
141<li><tt>QStyleSheetItem::ListLowerAlpha</tt> - a lowercase letter: <em>a</em>, <em>b</em>, <em>c</em>, ...
142<li><tt>QStyleSheetItem::ListUpperAlpha</tt> - an uppercase letter: <em>A</em>, <em>B</em>, <em>C</em>, ...
143</ul>
144<h3 class=fn><a name="Margin-enum"></a>QStyleSheetItem::Margin</h3>
145
146<ul>
147<li><tt>QStyleSheetItem::MarginLeft</tt> - left margin
148<li><tt>QStyleSheetItem::MarginRight</tt> - right margin
149<li><tt>QStyleSheetItem::MarginTop</tt> - top margin
150<li><tt>QStyleSheetItem::MarginBottom</tt> - bottom margin
151<li><tt>QStyleSheetItem::MarginAll</tt> - all margins (left, right, top and bottom)
152<li><tt>QStyleSheetItem::MarginVertical</tt> - top and bottom margins
153<li><tt>QStyleSheetItem::MarginHorizontal</tt> - left and right margins
154<li><tt>QStyleSheetItem::MarginFirstLine</tt> - margin (indentation) of the first line of
155a paragarph (in addition to the MarginLeft of the paragraph)
156</ul>
157<h3 class=fn><a name="VerticalAlignment-enum"></a>QStyleSheetItem::VerticalAlignment</h3>
158
159<p> This enum type defines the way elements are aligned vertically.
160This is only supported for text elements.
161<ul>
162<li><tt>QStyleSheetItem::VAlignBaseline</tt> - align the baseline of the element (or the
163bottom, if the element doesn't have a baseline) with the
164baseline of the parent
165<li><tt>QStyleSheetItem::VAlignSub</tt> - subscript the element
166<li><tt>QStyleSheetItem::VAlignSuper</tt> - superscript the element
167</ul><p>
168<h3 class=fn><a name="WhiteSpaceMode-enum"></a>QStyleSheetItem::WhiteSpaceMode</h3>
169
170<p> This enum defines the ways in which <a href="qstylesheet.html">QStyleSheet</a> can treat
171whitespace.
172<ul>
173<li><tt>QStyleSheetItem::WhiteSpaceNormal</tt> - any sequence of whitespace (including
174line-breaks) is equivalent to a single space.
175<li><tt>QStyleSheetItem::WhiteSpacePre</tt> - whitespace must be output exactly as given
176in the input.
177<li><tt>QStyleSheetItem::WhiteSpaceNoWrap</tt> - multiple spaces are collapsed as with
178WhiteSpaceNormal, but no automatic line-breaks occur. To break
179lines manually, use the <tt>&lt;br&gt;</tt> tag.
180</ul><p>
181<hr><h2>Member Function Documentation</h2>
182<h3 class=fn><a name="QStyleSheetItem"></a>QStyleSheetItem::QStyleSheetItem ( <a href="qstylesheet.html">QStyleSheet</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;name )
183</h3>
184Constructs a new style called <em>name</em> for the stylesheet <em>parent</em>.
185<p> All properties in QStyleSheetItem are initially in the "do not
186change" state, except <a href="#DisplayMode-enum">display
187 mode</a>, which defaults to <a href="#DisplayMode-enum">DisplayInline</a>.
188
189<h3 class=fn><a name="QStyleSheetItem-2"></a>QStyleSheetItem::QStyleSheetItem ( const&nbsp;<a href="qstylesheetitem.html">QStyleSheetItem</a>&nbsp;&amp;&nbsp;other )
190</h3>
191Copy constructor. Constructs a copy of <em>other</em> that is not bound
192to any style sheet.
193
194<h3 class=fn><a name="~QStyleSheetItem"></a>QStyleSheetItem::~QStyleSheetItem ()
195</h3>
196Destroys the style. Note that QStyleSheetItem objects become
197owned by <a href="qstylesheet.html">QStyleSheet</a> when they are created.
198
199<h3 class=fn>int <a name="alignment"></a>QStyleSheetItem::alignment () const
200</h3>
201Returns 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>.
202<p> <p>See also <a href="#setAlignment">setAlignment</a>() and <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.
203
204<h3 class=fn>bool <a name="allowedInContext"></a>QStyleSheetItem::allowedInContext ( const&nbsp;<a href="qstylesheetitem.html">QStyleSheetItem</a>&nbsp;*&nbsp;s ) const
205</h3>
206Returns TRUE if this style can be nested into an element of style
207<em>s</em>; otherwise returns FALSE.
208<p> <p>See also <a href="#contexts">contexts</a>() and <a href="#setContexts">setContexts</a>().
209
210<h3 class=fn><a href="qcolor.html">QColor</a> <a name="color"></a>QStyleSheetItem::color () const
211</h3>
212Returns the text color of this style or an invalid color if no
213color has been set.
214<p> <p>See also <a href="#setColor">setColor</a>() and <a href="qcolor.html#isValid">QColor::isValid</a>().
215
216<h3 class=fn><a href="qstring.html">QString</a> <a name="contexts"></a>QStyleSheetItem::contexts () const
217</h3>
218Returns a space-separated list of names of styles that may contain
219elements of this style. If nothing has been set, <a href="#contexts">contexts</a>()
220returns an empty string, which indicates that this style can be
221nested everywhere.
222<p> <p>See also <a href="#setContexts">setContexts</a>().
223
224<h3 class=fn>bool <a name="definesFontItalic"></a>QStyleSheetItem::definesFontItalic () const
225</h3>
226Returns TRUE if the style defines a font shape; otherwise returns
227FALSE. A style does not define any shape until <a href="#setFontItalic">setFontItalic</a>() is
228called.
229<p> <p>See also <a href="#setFontItalic">setFontItalic</a>() and <a href="#fontItalic">fontItalic</a>().
230
231<h3 class=fn>bool <a name="definesFontStrikeOut"></a>QStyleSheetItem::definesFontStrikeOut () const
232</h3>
233Returns TRUE if the style defines a setting for the strikeOut
234property of the font; otherwise returns FALSE. A style does not
235define this until <a href="#setFontStrikeOut">setFontStrikeOut</a>() is called.
236<p> <p>See also <a href="#setFontStrikeOut">setFontStrikeOut</a>() and <a href="#fontStrikeOut">fontStrikeOut</a>().
237
238<h3 class=fn>bool <a name="definesFontUnderline"></a>QStyleSheetItem::definesFontUnderline () const
239</h3>
240Returns TRUE if the style defines a setting for the underline
241property of the font; otherwise returns FALSE. A style does not
242define this until <a href="#setFontUnderline">setFontUnderline</a>() is called.
243<p> <p>See also <a href="#setFontUnderline">setFontUnderline</a>() and <a href="#fontUnderline">fontUnderline</a>().
244
245<h3 class=fn><a href="qstylesheetitem.html#DisplayMode-enum">DisplayMode</a> <a name="displayMode"></a>QStyleSheetItem::displayMode () const
246</h3>
247Returns the <a href="#DisplayMode-enum">display
248 mode</a> of the style.
249<p> <p>See also <a href="#setDisplayMode">setDisplayMode</a>().
250
251<h3 class=fn><a href="qstring.html">QString</a> <a name="fontFamily"></a>QStyleSheetItem::fontFamily () const
252</h3>
253Returns the font family setting of the style. This is either a
254valid font family or <a href="qstring.html#QString-null">QString::null</a> if no family has been set.
255<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>().
256
257<h3 class=fn>bool <a name="fontItalic"></a>QStyleSheetItem::fontItalic () const
258</h3>
259Returns TRUE if the style sets an italic font; otherwise returns
260FALSE.
261<p> <p>See also <a href="#setFontItalic">setFontItalic</a>() and <a href="#definesFontItalic">definesFontItalic</a>().
262
263<h3 class=fn>int <a name="fontSize"></a>QStyleSheetItem::fontSize () const
264</h3>
265Returns the font size setting of the style. This is either a valid
266point size or <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
267<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>().
268
269<h3 class=fn>bool <a name="fontStrikeOut"></a>QStyleSheetItem::fontStrikeOut () const
270</h3>
271Returns TRUE if the style sets a strike out font; otherwise
272returns FALSE.
273<p> <p>See also <a href="#setFontStrikeOut">setFontStrikeOut</a>() and <a href="#definesFontStrikeOut">definesFontStrikeOut</a>().
274
275<h3 class=fn>bool <a name="fontUnderline"></a>QStyleSheetItem::fontUnderline () const
276</h3>
277Returns TRUE if the style sets an underlined font; otherwise
278returns FALSE.
279<p> <p>See also <a href="#setFontUnderline">setFontUnderline</a>() and <a href="#definesFontUnderline">definesFontUnderline</a>().
280
281<h3 class=fn>int <a name="fontWeight"></a>QStyleSheetItem::fontWeight () const
282</h3>
283Returns the font weight setting of the style. This is either a
284valid <a href="qfont.html#Weight-enum">QFont::Weight</a> or the value <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
285<p> <p>See also <a href="#setFontWeight">setFontWeight</a>() and <a href="qfont.html">QFont</a>.
286
287<h3 class=fn>bool <a name="isAnchor"></a>QStyleSheetItem::isAnchor () const
288</h3>
289Returns whether this style is an anchor.
290<p> <p>See also <a href="#setAnchor">setAnchor</a>().
291
292<h3 class=fn>int <a name="lineSpacing"></a>QStyleSheetItem::lineSpacing () const
293</h3>
294<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
295<p> Returns the linespacing
296
297<h3 class=fn><a href="qstylesheetitem.html#ListStyle-enum">ListStyle</a> <a name="listStyle"></a>QStyleSheetItem::listStyle () const
298</h3>
299Returns the list style of the style.
300<p> <p>See also <a href="#setListStyle">setListStyle</a>() and <a href="#ListStyle-enum">ListStyle</a>.
301
302<h3 class=fn>int <a name="logicalFontSize"></a>QStyleSheetItem::logicalFontSize () const
303</h3>
304Returns the logical font size setting of the style. This is either
305a valid size between 1 and 7 or <a href="#AdditionalStyleValues-enum">QStyleSheetItem::Undefined</a>.
306<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>().
307
308<h3 class=fn>int <a name="logicalFontSizeStep"></a>QStyleSheetItem::logicalFontSizeStep () const
309</h3>
310Returns the logical font size step of this style.
311<p> The default is 0. Tags such as <tt>big</tt> define <tt>+1</tt>; <tt>small</tt>
312defines <tt>-1</tt>.
313<p> <p>See also <a href="#setLogicalFontSizeStep">setLogicalFontSizeStep</a>().
314
315<h3 class=fn>int <a name="margin"></a>QStyleSheetItem::margin ( <a href="qstylesheetitem.html#Margin-enum">Margin</a>&nbsp;m ) const
316</h3>
317Returns the width of margin <em>m</em> in pixels.
318<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>.
319<p> <p>See also <a href="#setMargin">setMargin</a>() and <a href="#Margin-enum">Margin</a>.
320
321<h3 class=fn><a href="qstring.html">QString</a> <a name="name"></a>QStyleSheetItem::name () const
322</h3>
323Returns the name of the style item.
324
325<h3 class=fn>int <a name="numberOfColumns"></a>QStyleSheetItem::numberOfColumns () const
326</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
327<p> Returns the number of columns for this style.
328<p> <p>See also <a href="#setNumberOfColumns">setNumberOfColumns</a>(), <a href="#displayMode">displayMode</a>(), and <a href="#setDisplayMode">setDisplayMode</a>().
329
330<p>
331<h3 class=fn><a href="qstylesheetitem.html">QStyleSheetItem</a>&nbsp;&amp; <a name="operator-eq"></a>QStyleSheetItem::operator= ( const&nbsp;<a href="qstylesheetitem.html">QStyleSheetItem</a>&nbsp;&amp;&nbsp;other )
332</h3>
333Assignment. Assings a copy of <em>other</em> that is not bound to any style sheet.
334Unbounds first from previous style sheet.
335
336<h3 class=fn>bool <a name="selfNesting"></a>QStyleSheetItem::selfNesting () const
337</h3>
338Returns TRUE if this style has self-nesting enabled; otherwise
339returns FALSE.
340<p> <p>See also <a href="#setSelfNesting">setSelfNesting</a>().
341
342<h3 class=fn>void <a name="setAlignment"></a>QStyleSheetItem::setAlignment ( int&nbsp;f )
343</h3>
344Sets the alignment to <em>f</em>. This only makes sense for styles with
345a <a href="#DisplayMode-enum">display mode</a> of
346DisplayBlock. Possible values are <a href="qt.html#AlignmentFlags-enum">AlignAuto</a>, <a href="qt.html#AlignmentFlags-enum">AlignLeft</a>,
347<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>.
348<p> <p>See also <a href="#alignment">alignment</a>(), <a href="#displayMode">displayMode</a>(), and <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>.
349
350<h3 class=fn>void <a name="setAnchor"></a>QStyleSheetItem::setAnchor ( bool&nbsp;anc )
351</h3>
352If <em>anc</em> is TRUE, sets this style to be an anchor (hypertext
353link); otherwise sets it to not be an anchor. Elements in this
354style link to other documents or anchors.
355<p> <p>See also <a href="#isAnchor">isAnchor</a>().
356
357<h3 class=fn>void <a name="setColor"></a>QStyleSheetItem::setColor ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp;&nbsp;c )
358</h3>
359Sets the text color of this style to <em>c</em>.
360<p> <p>See also <a href="#color">color</a>().
361
362<h3 class=fn>void <a name="setContexts"></a>QStyleSheetItem::setContexts ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;c )
363</h3>
364Sets a space-separated list of names of styles that may contain
365elements of this style. If <em>c</em> is empty, the style can be nested
366everywhere.
367<p> <p>See also <a href="#contexts">contexts</a>().
368
369<h3 class=fn>void <a name="setDisplayMode"></a>QStyleSheetItem::setDisplayMode ( <a href="qstylesheetitem.html#DisplayMode-enum">DisplayMode</a>&nbsp;m )
370</h3>
371Sets the display mode of the style to <em>m</em>.
372<p> <p>See also <a href="#displayMode">displayMode</a>().
373
374<h3 class=fn>void <a name="setFontFamily"></a>QStyleSheetItem::setFontFamily ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;fam )
375</h3>
376Sets the font family setting of the style to <em>fam</em>.
377<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>().
378
379<h3 class=fn>void <a name="setFontItalic"></a>QStyleSheetItem::setFontItalic ( bool&nbsp;italic )
380</h3>
381If <em>italic</em> is TRUE sets italic for the style; otherwise sets
382upright.
383<p> <p>See also <a href="#fontItalic">fontItalic</a>() and <a href="#definesFontItalic">definesFontItalic</a>().
384
385<h3 class=fn>void <a name="setFontSize"></a>QStyleSheetItem::setFontSize ( int&nbsp;s )
386</h3>
387Sets the font size setting of the style to <em>s</em> points.
388<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>().
389
390<h3 class=fn>void <a name="setFontStrikeOut"></a>QStyleSheetItem::setFontStrikeOut ( bool&nbsp;strikeOut )
391</h3>
392If <em>strikeOut</em> is TRUE, sets strike out for the style; otherwise
393sets no strike out.
394<p> <p>See also <a href="#fontStrikeOut">fontStrikeOut</a>() and <a href="#definesFontStrikeOut">definesFontStrikeOut</a>().
395
396<h3 class=fn>void <a name="setFontUnderline"></a>QStyleSheetItem::setFontUnderline ( bool&nbsp;underline )
397</h3>
398If <em>underline</em> is TRUE, sets underline for the style; otherwise
399sets no underline.
400<p> <p>See also <a href="#fontUnderline">fontUnderline</a>() and <a href="#definesFontUnderline">definesFontUnderline</a>().
401
402<h3 class=fn>void <a name="setFontWeight"></a>QStyleSheetItem::setFontWeight ( int&nbsp;w )
403</h3>
404Sets the font weight setting of the style to <em>w</em>. Valid values
405are those defined by <a href="qfont.html#Weight-enum">QFont::Weight</a>.
406<p> <p>See also <a href="qfont.html">QFont</a> and <a href="#fontWeight">fontWeight</a>().
407
408<h3 class=fn>void <a name="setListStyle"></a>QStyleSheetItem::setListStyle ( <a href="qstylesheetitem.html#ListStyle-enum">ListStyle</a>&nbsp;s )
409</h3>
410Sets the list style of the style to <em>s</em>.
411<p> This is used by nested elements that have a display mode of <a href="#DisplayMode-enum">DisplayListItem</a>.
412<p> <p>See also <a href="#listStyle">listStyle</a>(), <a href="#DisplayMode-enum">DisplayMode</a>, and <a href="#ListStyle-enum">ListStyle</a>.
413
414<h3 class=fn>void <a name="setLogicalFontSize"></a>QStyleSheetItem::setLogicalFontSize ( int&nbsp;s )
415</h3>
416Sets the logical font size setting of the style to <em>s</em>. Valid
417logical sizes are 1 to 7.
418<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>().
419
420<h3 class=fn>void <a name="setLogicalFontSizeStep"></a>QStyleSheetItem::setLogicalFontSizeStep ( int&nbsp;s )
421</h3>
422Sets the logical font size step of this style to <em>s</em>.
423<p> <p>See also <a href="#logicalFontSizeStep">logicalFontSizeStep</a>().
424
425<h3 class=fn>void <a name="setMargin"></a>QStyleSheetItem::setMargin ( <a href="qstylesheetitem.html#Margin-enum">Margin</a>&nbsp;m, int&nbsp;v )
426</h3>
427Sets the width of margin <em>m</em> to <em>v</em> pixels.
428<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>,
429<a href="#Margin-enum">MarginVertical</a> or <a href="#Margin-enum">MarginHorizontal</a>. The value <em>v</em> must
430be >= 0.
431<p> <p>See also <a href="#margin">margin</a>().
432
433<h3 class=fn>void <a name="setNumberOfColumns"></a>QStyleSheetItem::setNumberOfColumns ( int&nbsp;ncols )
434</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
435<p> Sets the number of columns for this style. Elements in the style
436are divided into columns.
437<p> This makes sense only if the style uses a block display mode
438(see QStyleSheetItem::DisplayMode).
439<p> <p>See also <a href="#numberOfColumns">numberOfColumns</a>().
440
441<h3 class=fn>void <a name="setSelfNesting"></a>QStyleSheetItem::setSelfNesting ( bool&nbsp;nesting )
442</h3>
443Sets the self-nesting property for this style to <em>nesting</em>.
444<p> In order to support "dirty" HTML, paragraphs <tt>&lt;p&gt;</tt> and list
445items <tt>&lt;li&gt;</tt> are not self-nesting. This means that starting a
446new paragraph or list item automatically closes the previous one.
447<p> <p>See also <a href="#selfNesting">selfNesting</a>().
448
449<h3 class=fn>void <a name="setVerticalAlignment"></a>QStyleSheetItem::setVerticalAlignment ( <a href="qstylesheetitem.html#VerticalAlignment-enum">VerticalAlignment</a>&nbsp;valign )
450</h3>
451Sets the vertical alignment to <em>valign</em>. Possible values are
452<a href="#VerticalAlignment-enum">VAlignBaseline</a>, <a href="#VerticalAlignment-enum">VAlignSub</a> or <a href="#VerticalAlignment-enum">VAlignSuper</a>.
453<p> The vertical alignment property is not inherited.
454<p> <p>See also <a href="#verticalAlignment">verticalAlignment</a>().
455
456<h3 class=fn>void <a name="setWhiteSpaceMode"></a>QStyleSheetItem::setWhiteSpaceMode ( <a href="qstylesheetitem.html#WhiteSpaceMode-enum">WhiteSpaceMode</a>&nbsp;m )
457</h3>
458Sets the whitespace mode to <em>m</em>.
459<p> <p>See also <a href="#WhiteSpaceMode-enum">WhiteSpaceMode</a>.
460
461<h3 class=fn><a href="qstylesheet.html">QStyleSheet</a>&nbsp;* <a name="styleSheet"></a>QStyleSheetItem::styleSheet ()
462</h3>
463Returns the style sheet this item is in.
464
465<h3 class=fn>const&nbsp;<a href="qstylesheet.html">QStyleSheet</a>&nbsp;* <a name="styleSheet-2"></a>QStyleSheetItem::styleSheet () const
466</h3>
467This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
468<p> Returns the style sheet this item is in.
469
470<h3 class=fn><a href="qstylesheetitem.html#VerticalAlignment-enum">VerticalAlignment</a> <a name="verticalAlignment"></a>QStyleSheetItem::verticalAlignment () const
471</h3>
472Returns the vertical alignment of the style. Possible values are
473<a href="#VerticalAlignment-enum">VAlignBaseline</a>, <a href="#VerticalAlignment-enum">VAlignSub</a> or <a href="#VerticalAlignment-enum">VAlignSuper</a>.
474<p> <p>See also <a href="#setVerticalAlignment">setVerticalAlignment</a>().
475
476<h3 class=fn><a href="qstylesheetitem.html#WhiteSpaceMode-enum">WhiteSpaceMode</a> <a name="whiteSpaceMode"></a>QStyleSheetItem::whiteSpaceMode () const
477</h3>
478Returns the whitespace mode.
479<p> <p>See also <a href="#setWhiteSpaceMode">setWhiteSpaceMode</a>() and <a href="#WhiteSpaceMode-enum">WhiteSpaceMode</a>.
480
481<!-- eof -->
482<hr><p>
483This file is part of the <a href="index.html">Qt toolkit</a>.
484Copyright &copy; 1995-2007
485<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
486<table width=100% cellspacing=0 border=0><tr>
487<td>Copyright &copy; 2007
488<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
489<td align=right><div align=right>Qt 3.3.8</div>
490</table></div></address></body>
491</html>
Note: See TracBrowser for help on using the repository browser.