source: trunk/doc/html/qstyleoption.html

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

reference documentation added

File size: 13.2 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/qstyle.cpp:56 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QStyleOption 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>QStyleOption Class Reference</h1>
33
34<p>The QStyleOption class specifies optional parameters for QStyle functions.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qstyle-h.html">qstyle.h</a>&gt;</tt>
37<p><a href="qstyleoption-members.html">List of all member functions.</a>
38<h2>Public Members</h2>
39<ul>
40<li class=fn>enum <a href="#StyleOptionDefault-enum"><b>StyleOptionDefault</b></a> { Default }</li>
41<li class=fn><a href="#QStyleOption"><b>QStyleOption</b></a> ( StyleOptionDefault = Default )</li>
42<li class=fn><a href="#QStyleOption-2"><b>QStyleOption</b></a> ( int&nbsp;in1 )</li>
43<li class=fn><a href="#QStyleOption-3"><b>QStyleOption</b></a> ( int&nbsp;in1, int&nbsp;in2 )</li>
44<li class=fn><a href="#QStyleOption-4"><b>QStyleOption</b></a> ( int&nbsp;in1, int&nbsp;in2, int&nbsp;in3, int&nbsp;in4 )</li>
45<li class=fn><a href="#QStyleOption-5"><b>QStyleOption</b></a> ( QMenuItem&nbsp;*&nbsp;m )</li>
46<li class=fn><a href="#QStyleOption-6"><b>QStyleOption</b></a> ( QMenuItem&nbsp;*&nbsp;m, int&nbsp;in1 )</li>
47<li class=fn><a href="#QStyleOption-7"><b>QStyleOption</b></a> ( QMenuItem&nbsp;*&nbsp;m, int&nbsp;in1, int&nbsp;in2 )</li>
48<li class=fn><a href="#QStyleOption-8"><b>QStyleOption</b></a> ( const&nbsp;QColor&nbsp;&amp;&nbsp;c )</li>
49<li class=fn><a href="#QStyleOption-9"><b>QStyleOption</b></a> ( QTab&nbsp;*&nbsp;t )</li>
50<li class=fn><a href="#QStyleOption-a"><b>QStyleOption</b></a> ( QListViewItem&nbsp;*&nbsp;i )</li>
51<li class=fn><a href="#QStyleOption-b"><b>QStyleOption</b></a> ( QCheckListItem&nbsp;*&nbsp;i )</li>
52<li class=fn><a href="#QStyleOption-c"><b>QStyleOption</b></a> ( Qt::ArrowType&nbsp;a )</li>
53<li class=fn><a href="#QStyleOption-d"><b>QStyleOption</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r )</li>
54<li class=fn><a href="#QStyleOption-e"><b>QStyleOption</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
55<li class=fn>bool <a href="#isDefault"><b>isDefault</b></a> () const</li>
56<li class=fn>int <a href="#day"><b>day</b></a> () const</li>
57<li class=fn>int <a href="#lineWidth"><b>lineWidth</b></a> () const</li>
58<li class=fn>int <a href="#midLineWidth"><b>midLineWidth</b></a> () const</li>
59<li class=fn>int <a href="#frameShape"><b>frameShape</b></a> () const</li>
60<li class=fn>int <a href="#frameShadow"><b>frameShadow</b></a> () const</li>
61<li class=fn>int <a href="#headerSection"><b>headerSection</b></a> () const</li>
62<li class=fn>QMenuItem * <a href="#menuItem"><b>menuItem</b></a> () const</li>
63<li class=fn>int <a href="#maxIconWidth"><b>maxIconWidth</b></a> () const</li>
64<li class=fn>int <a href="#tabWidth"><b>tabWidth</b></a> () const</li>
65<li class=fn>const QColor &amp; <a href="#color"><b>color</b></a> () const</li>
66<li class=fn>QTab * <a href="#tab"><b>tab</b></a> () const</li>
67<li class=fn>QCheckListItem * <a href="#checkListItem"><b>checkListItem</b></a> () const</li>
68<li class=fn>QListViewItem * <a href="#listViewItem"><b>listViewItem</b></a> () const</li>
69<li class=fn>Qt::ArrowType <a href="#arrowType"><b>arrowType</b></a> () const</li>
70<li class=fn>QRect <a href="#rect"><b>rect</b></a> () const</li>
71<li class=fn>QWidget * <a href="#widget"><b>widget</b></a> () const</li>
72</ul>
73<hr><a name="details"></a><h2>Detailed Description</h2>
74
75
76The QStyleOption class specifies optional parameters for <a href="qstyle.html">QStyle</a> functions.
77
78<p> Some QStyle functions take an optional argument specifying extra
79information that is required for a paritical primitive or control.
80So that the QStyle class can be extended, QStyleOption is used to
81provide a variable-argument for these options.
82<p> The QStyleOption class has constructors for each type of optional
83argument, and this set of constructors may be extended in future
84Qt releases. There are also corresponding access functions that
85return the optional arguments: these too may be extended.
86<p> For each constructor, you should refer to the documentation of the
87QStyle functions to see the meaning of the arguments.
88<p> When calling QStyle functions from your own widgets, you must only
89pass the default QStyleOption or the argument that QStyle is
90documented to accept. For example, if the function expects
91QStyleOption(QMenuItem *, int), passing QStyleOption(QMenuItem *)
92leaves the optional integer argument uninitialized.
93<p> When subclassing QStyle, you must similarly only expect the
94default or documented arguments. The other arguments will have
95uninitialized values.
96<p> If you make your own <a href="qstyle.html">QStyle</a> subclasses and your own widgets, you
97can make a subclass of QStyleOption to pass additional arguments
98to your QStyle subclass. You will need to cast the "const
99QStyleOption&" argument to your subclass, so be sure your style
100has been called from your widget.
101<p>See also <a href="appearance.html">Widget Appearance and Style</a>.
102
103<hr><h2>Member Type Documentation</h2>
104<h3 class=fn><a name="StyleOptionDefault-enum"></a>QStyleOption::StyleOptionDefault</h3>
105
106<p> This enum value can be passed as the optional argument to any
107<a href="qstyle.html">QStyle</a> function.
108<ul>
109<li><tt>QStyleOption::Default</tt>
110</ul>
111<hr><h2>Member Function Documentation</h2>
112<h3 class=fn><a name="QStyleOption"></a>QStyleOption::QStyleOption ( <a href="qstyleoption.html#StyleOptionDefault-enum">StyleOptionDefault</a> = Default )
113</h3>
114
115<p> The default option. This can always be passed as the optional
116argument to <a href="qstyle.html">QStyle</a> functions.
117
118<h3 class=fn><a name="QStyleOption-2"></a>QStyleOption::QStyleOption ( int&nbsp;in1 )
119</h3>
120
121<p> Pass one integer, <em>in1</em>. For example, headerSection.
122
123<h3 class=fn><a name="QStyleOption-3"></a>QStyleOption::QStyleOption ( int&nbsp;in1, int&nbsp;in2 )
124</h3>
125
126<p> Pass two integers, <em>in1</em> and <em>in2</em>. For example, linewidth and
127midlinewidth.
128
129<h3 class=fn><a name="QStyleOption-4"></a>QStyleOption::QStyleOption ( int&nbsp;in1, int&nbsp;in2, int&nbsp;in3, int&nbsp;in4 )
130</h3>
131
132<p> Pass four integers, <em>in1</em>, <em>in2</em>, <em>in3</em> and <em>in4</em>.
133
134<h3 class=fn><a name="QStyleOption-5"></a>QStyleOption::QStyleOption ( QMenuItem&nbsp;*&nbsp;m )
135</h3>
136
137<p> Pass a menu item, <em>m</em>.
138
139<h3 class=fn><a name="QStyleOption-6"></a>QStyleOption::QStyleOption ( QMenuItem&nbsp;*&nbsp;m, int&nbsp;in1 )
140</h3>
141
142<p> Pass a menu item and an integer, <em>m</em> and <em>in1</em>.
143
144<h3 class=fn><a name="QStyleOption-7"></a>QStyleOption::QStyleOption ( QMenuItem&nbsp;*&nbsp;m, int&nbsp;in1, int&nbsp;in2 )
145</h3>
146
147<p> Pass a menu item and two integers, <em>m</em>, <em>in1</em> and <em>in2</em>.
148
149<h3 class=fn><a name="QStyleOption-8"></a>QStyleOption::QStyleOption ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp;&nbsp;c )
150</h3>
151
152<p> Pass a color, <em>c</em>.
153
154<h3 class=fn><a name="QStyleOption-9"></a>QStyleOption::QStyleOption ( <a href="qtab.html">QTab</a>&nbsp;*&nbsp;t )
155</h3>
156
157<p> Pass a <a href="qtab.html">QTab</a>, <em>t</em>.
158
159<h3 class=fn><a name="QStyleOption-a"></a>QStyleOption::QStyleOption ( <a href="qlistviewitem.html">QListViewItem</a>&nbsp;*&nbsp;i )
160</h3>
161
162<p> Pass a <a href="qlistviewitem.html">QListViewItem</a>, <em>i</em>.
163
164<h3 class=fn><a name="QStyleOption-b"></a>QStyleOption::QStyleOption ( <a href="qchecklistitem.html">QCheckListItem</a>&nbsp;*&nbsp;i )
165</h3>
166
167<p> Pass a <a href="qchecklistitem.html">QCheckListItem</a>, <em>i</em>.
168
169<h3 class=fn><a name="QStyleOption-c"></a>QStyleOption::QStyleOption ( <a href="qt.html#ArrowType-enum">Qt::ArrowType</a>&nbsp;a )
170</h3>
171
172<p> Pass an Qt::ArrowType, <em>a</em>.
173
174<h3 class=fn><a name="QStyleOption-d"></a>QStyleOption::QStyleOption ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )
175</h3>
176
177<p> Pass a <a href="qrect.html">QRect</a>, <em>r</em>.
178
179<h3 class=fn><a name="QStyleOption-e"></a>QStyleOption::QStyleOption ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )
180</h3>
181
182<p> Pass a <a href="qwidget.html">QWidget</a>, <em>w</em>.
183
184<h3 class=fn><a href="qt.html#ArrowType-enum">Qt::ArrowType</a> <a name="arrowType"></a>QStyleOption::arrowType () const
185</h3>
186
187<p> Returns an arrow type if the appropriate constructor was called;
188otherwise the return value is undefined.
189
190<h3 class=fn><a href="qchecklistitem.html">QCheckListItem</a>&nbsp;* <a name="checkListItem"></a>QStyleOption::checkListItem () const
191</h3>
192
193<p> Returns a check list item if the appropriate constructor was
194called; otherwise the return value is undefined.
195
196<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="color"></a>QStyleOption::color () const
197</h3>
198
199<p> Returns a color if the appropriate constructor was called;
200otherwise the return value is undefined.
201
202<h3 class=fn>int <a name="day"></a>QStyleOption::day () const
203</h3>
204
205<p> Returns the index of the day in the month if the appropriate
206constructor was called; otherwise the return value is undefined.
207
208<h3 class=fn>int <a name="frameShadow"></a>QStyleOption::frameShadow () const
209</h3>
210
211<p> Returns a QFrame::Shadow value if the appropriate constructor was
212called; otherwise the return value is undefined.
213
214<h3 class=fn>int <a name="frameShape"></a>QStyleOption::frameShape () const
215</h3>
216
217<p> Returns a QFrame::Shape value if the appropriate constructor was
218called; otherwise the return value is undefined.
219
220<h3 class=fn>int <a name="headerSection"></a>QStyleOption::headerSection () const
221</h3>
222
223<p> Returns the header section if the appropriate constructor was
224called; otherwise the return value is undefined.
225
226<h3 class=fn>bool <a name="isDefault"></a>QStyleOption::isDefault () const
227</h3>
228
229<p> Returns TRUE if the option was constructed with the default
230constructor; otherwise returns FALSE.
231
232<h3 class=fn>int <a name="lineWidth"></a>QStyleOption::lineWidth () const
233</h3>
234
235<p> Returns the line width if the appropriate constructor was called;
236otherwise the return value is undefined.
237
238<h3 class=fn><a href="qlistviewitem.html">QListViewItem</a>&nbsp;* <a name="listViewItem"></a>QStyleOption::listViewItem () const
239</h3>
240
241<p> Returns a <a href="qlistview.html">QListView</a> item if the appropriate constructor was
242called; otherwise the return value is undefined.
243
244<h3 class=fn>int <a name="maxIconWidth"></a>QStyleOption::maxIconWidth () const
245</h3>
246
247<p> Returns the maximum width of the menu item check area if the
248appropriate constructor was called; otherwise the return value is
249undefined.
250
251<h3 class=fn>QMenuItem * <a name="menuItem"></a>QStyleOption::menuItem () const
252</h3>
253
254<p> Returns a menu item if the appropriate constructor was called;
255otherwise the return value is undefined.
256
257<h3 class=fn>int <a name="midLineWidth"></a>QStyleOption::midLineWidth () const
258</h3>
259
260<p> Returns the mid-line width if the appropriate constructor was
261called; otherwise the return value is undefined.
262
263<h3 class=fn><a href="qrect.html">QRect</a> <a name="rect"></a>QStyleOption::rect () const
264</h3>
265
266<p> Returns a rectangle if the appropriate constructor was called;
267otherwise the return value is undefined.
268
269<h3 class=fn><a href="qtab.html">QTab</a>&nbsp;* <a name="tab"></a>QStyleOption::tab () const
270</h3>
271
272<p> Returns a <a href="qtabbar.html">QTabBar</a> tab if the appropriate constructor was called;
273otherwise the return value is undefined.
274
275<h3 class=fn>int <a name="tabWidth"></a>QStyleOption::tabWidth () const
276</h3>
277
278<p> Returns the tab indent width if the appropriate constructor was
279called; otherwise the return value is undefined.
280
281<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="widget"></a>QStyleOption::widget () const
282</h3>
283
284<p> Returns a pointer to a widget if the appropriate constructor was called;
285otherwise the return value is undefined.
286
287<!-- eof -->
288<hr><p>
289This file is part of the <a href="index.html">Qt toolkit</a>.
290Copyright &copy; 1995-2007
291<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
292<table width=100% cellspacing=0 border=0><tr>
293<td>Copyright &copy; 2007
294<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
295<td align=right><div align=right>Qt 3.3.8</div>
296</table></div></address></body>
297</html>
Note: See TracBrowser for help on using the repository browser.