summaryrefslogtreecommitdiffstats
path: root/doc/html/tqstyleoption.html
blob: ec9266194805756a3631548b3c90bd659a6bb994 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQStyleOption 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&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;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>TQStyleOption Class Reference</h1>

<p>The TQStyleOption class specifies optional parameters for TQStyle functions.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="tqstyle-h.html">tqstyle.h</a>&gt;</tt>
<p><a href="tqstyleoption-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>enum <a href="#StyleOptionDefault-enum"><b>StyleOptionDefault</b></a> { Default }</li>
<li class=fn><a href="#TQStyleOption"><b>TQStyleOption</b></a> ( StyleOptionDefault = Default )</li>
<li class=fn><a href="#TQStyleOption-2"><b>TQStyleOption</b></a> ( int&nbsp;in1 )</li>
<li class=fn><a href="#TQStyleOption-3"><b>TQStyleOption</b></a> ( int&nbsp;in1, int&nbsp;in2 )</li>
<li class=fn><a href="#TQStyleOption-4"><b>TQStyleOption</b></a> ( int&nbsp;in1, int&nbsp;in2, int&nbsp;in3, int&nbsp;in4 )</li>
<li class=fn><a href="#TQStyleOption-5"><b>TQStyleOption</b></a> ( TQMenuItem&nbsp;*&nbsp;m )</li>
<li class=fn><a href="#TQStyleOption-6"><b>TQStyleOption</b></a> ( TQMenuItem&nbsp;*&nbsp;m, int&nbsp;in1 )</li>
<li class=fn><a href="#TQStyleOption-7"><b>TQStyleOption</b></a> ( TQMenuItem&nbsp;*&nbsp;m, int&nbsp;in1, int&nbsp;in2 )</li>
<li class=fn><a href="#TQStyleOption-8"><b>TQStyleOption</b></a> ( const&nbsp;TQColor&nbsp;&amp;&nbsp;c )</li>
<li class=fn><a href="#TQStyleOption-9"><b>TQStyleOption</b></a> ( TQTab&nbsp;*&nbsp;t )</li>
<li class=fn><a href="#TQStyleOption-a"><b>TQStyleOption</b></a> ( TQListViewItem&nbsp;*&nbsp;i )</li>
<li class=fn><a href="#TQStyleOption-b"><b>TQStyleOption</b></a> ( TQCheckListItem&nbsp;*&nbsp;i )</li>
<li class=fn><a href="#TQStyleOption-c"><b>TQStyleOption</b></a> ( TQt::ArrowType&nbsp;a )</li>
<li class=fn><a href="#TQStyleOption-d"><b>TQStyleOption</b></a> ( const&nbsp;TQRect&nbsp;&amp;&nbsp;r )</li>
<li class=fn><a href="#TQStyleOption-e"><b>TQStyleOption</b></a> ( TQWidget&nbsp;*&nbsp;w )</li>
<li class=fn>bool <a href="#isDefault"><b>isDefault</b></a> () const</li>
<li class=fn>int <a href="#day"><b>day</b></a> () const</li>
<li class=fn>int <a href="#lineWidth"><b>lineWidth</b></a> () const</li>
<li class=fn>int <a href="#midLineWidth"><b>midLineWidth</b></a> () const</li>
<li class=fn>int <a href="#frameShape"><b>frameShape</b></a> () const</li>
<li class=fn>int <a href="#frameShadow"><b>frameShadow</b></a> () const</li>
<li class=fn>int <a href="#headerSection"><b>headerSection</b></a> () const</li>
<li class=fn>TQMenuItem * <a href="#menuItem"><b>menuItem</b></a> () const</li>
<li class=fn>int <a href="#maxIconWidth"><b>maxIconWidth</b></a> () const</li>
<li class=fn>int <a href="#tabWidth"><b>tabWidth</b></a> () const</li>
<li class=fn>const TQColor &amp; <a href="#color"><b>color</b></a> () const</li>
<li class=fn>TQTab * <a href="#tab"><b>tab</b></a> () const</li>
<li class=fn>TQCheckListItem * <a href="#checkListItem"><b>checkListItem</b></a> () const</li>
<li class=fn>TQListViewItem * <a href="#listViewItem"><b>listViewItem</b></a> () const</li>
<li class=fn>TQt::ArrowType <a href="#arrowType"><b>arrowType</b></a> () const</li>
<li class=fn>TQRect <a href="#rect"><b>rect</b></a> () const</li>
<li class=fn>TQWidget * <a href="#widget"><b>widget</b></a> () const</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The TQStyleOption class specifies optional parameters for <a href="tqstyle.html">TQStyle</a> functions.

<p> Some TQStyle functions take an optional argument specifying extra
information that is required for a paritical primitive or control.
So that the TQStyle class can be extended, TQStyleOption is used to
provide a variable-argument for these options.
<p> The TQStyleOption class has constructors for each type of optional
argument, and this set of constructors may be extended in future
TQt releases. There are also corresponding access functions that
return the optional arguments: these too may be extended.
<p> For each constructor, you should refer to the documentation of the
TQStyle functions to see the meaning of the arguments.
<p> When calling TQStyle functions from your own widgets, you must only
pass the default TQStyleOption or the argument that TQStyle is
documented to accept. For example, if the function expects
TQStyleOption(TQMenuItem *, int), passing TQStyleOption(TQMenuItem *)
leaves the optional integer argument uninitialized.
<p> When subclassing TQStyle, you must similarly only expect the
default or documented arguments. The other arguments will have
uninitialized values.
<p> If you make your own <a href="tqstyle.html">TQStyle</a> subclasses and your own widgets, you
can make a subclass of TQStyleOption to pass additional arguments
to your TQStyle subclass. You will need to cast the "const
TQStyleOption&" argument to your subclass, so be sure your style
has been called from your widget.
<p>See also <a href="appearance.html">Widget Appearance and Style</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="StyleOptionDefault-enum"></a>TQStyleOption::StyleOptionDefault</h3>

<p> This enum value can be passed as the optional argument to any
<a href="tqstyle.html">TQStyle</a> function.
<ul>
<li><tt>TQStyleOption::Default</tt>
</ul>
<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="TQStyleOption"></a>TQStyleOption::TQStyleOption ( <a href="tqstyleoption.html#StyleOptionDefault-enum">StyleOptionDefault</a> = Default )
</h3>

<p> The default option. This can always be passed as the optional
argument to <a href="tqstyle.html">TQStyle</a> functions.

<h3 class=fn><a name="TQStyleOption-2"></a>TQStyleOption::TQStyleOption ( int&nbsp;in1 )
</h3>

<p> Pass one integer, <em>in1</em>. For example, headerSection.

<h3 class=fn><a name="TQStyleOption-3"></a>TQStyleOption::TQStyleOption ( int&nbsp;in1, int&nbsp;in2 )
</h3>

<p> Pass two integers, <em>in1</em> and <em>in2</em>. For example, linewidth and
midlinewidth.

<h3 class=fn><a name="TQStyleOption-4"></a>TQStyleOption::TQStyleOption ( int&nbsp;in1, int&nbsp;in2, int&nbsp;in3, int&nbsp;in4 )
</h3>

<p> Pass four integers, <em>in1</em>, <em>in2</em>, <em>in3</em> and <em>in4</em>.

<h3 class=fn><a name="TQStyleOption-5"></a>TQStyleOption::TQStyleOption ( TQMenuItem&nbsp;*&nbsp;m )
</h3>

<p> Pass a menu item, <em>m</em>.

<h3 class=fn><a name="TQStyleOption-6"></a>TQStyleOption::TQStyleOption ( TQMenuItem&nbsp;*&nbsp;m, int&nbsp;in1 )
</h3>

<p> Pass a menu item and an integer, <em>m</em> and <em>in1</em>.

<h3 class=fn><a name="TQStyleOption-7"></a>TQStyleOption::TQStyleOption ( TQMenuItem&nbsp;*&nbsp;m, int&nbsp;in1, int&nbsp;in2 )
</h3>

<p> Pass a menu item and two integers, <em>m</em>, <em>in1</em> and <em>in2</em>.

<h3 class=fn><a name="TQStyleOption-8"></a>TQStyleOption::TQStyleOption ( const&nbsp;<a href="tqcolor.html">TQColor</a>&nbsp;&amp;&nbsp;c )
</h3>

<p> Pass a color, <em>c</em>.

<h3 class=fn><a name="TQStyleOption-9"></a>TQStyleOption::TQStyleOption ( <a href="tqtab.html">TQTab</a>&nbsp;*&nbsp;t )
</h3>

<p> Pass a <a href="tqtab.html">TQTab</a>, <em>t</em>.

<h3 class=fn><a name="TQStyleOption-a"></a>TQStyleOption::TQStyleOption ( <a href="tqlistviewitem.html">TQListViewItem</a>&nbsp;*&nbsp;i )
</h3>

<p> Pass a <a href="tqlistviewitem.html">TQListViewItem</a>, <em>i</em>.

<h3 class=fn><a name="TQStyleOption-b"></a>TQStyleOption::TQStyleOption ( <a href="tqchecklistitem.html">TQCheckListItem</a>&nbsp;*&nbsp;i )
</h3>

<p> Pass a <a href="tqchecklistitem.html">TQCheckListItem</a>, <em>i</em>.

<h3 class=fn><a name="TQStyleOption-c"></a>TQStyleOption::TQStyleOption ( <a href="tqt.html#ArrowType-enum">TQt::ArrowType</a>&nbsp;a )
</h3>

<p> Pass an TQt::ArrowType, <em>a</em>.

<h3 class=fn><a name="TQStyleOption-d"></a>TQStyleOption::TQStyleOption ( const&nbsp;<a href="tqrect.html">TQRect</a>&nbsp;&amp;&nbsp;r )
</h3>

<p> Pass a <a href="tqrect.html">TQRect</a>, <em>r</em>.

<h3 class=fn><a name="TQStyleOption-e"></a>TQStyleOption::TQStyleOption ( <a href="tqwidget.html">TQWidget</a>&nbsp;*&nbsp;w )
</h3>

<p> Pass a <a href="tqwidget.html">TQWidget</a>, <em>w</em>.

<h3 class=fn><a href="tqt.html#ArrowType-enum">TQt::ArrowType</a> <a name="arrowType"></a>TQStyleOption::arrowType () const
</h3>

<p> Returns an arrow type if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn><a href="tqchecklistitem.html">TQCheckListItem</a>&nbsp;* <a name="checkListItem"></a>TQStyleOption::checkListItem () const
</h3>

<p> Returns a check list item if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn>const&nbsp;<a href="tqcolor.html">TQColor</a>&nbsp;&amp; <a name="color"></a>TQStyleOption::color () const
</h3>

<p> Returns a color if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn>int <a name="day"></a>TQStyleOption::day () const
</h3>

<p> Returns the index of the day in the month if the appropriate
constructor was called; otherwise the return value is undefined.

<h3 class=fn>int <a name="frameShadow"></a>TQStyleOption::frameShadow () const
</h3>

<p> Returns a TQFrame::Shadow value if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn>int <a name="frameShape"></a>TQStyleOption::frameShape () const
</h3>

<p> Returns a TQFrame::Shape value if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn>int <a name="headerSection"></a>TQStyleOption::headerSection () const
</h3>

<p> Returns the header section if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn>bool <a name="isDefault"></a>TQStyleOption::isDefault () const
</h3>

<p> Returns TRUE if the option was constructed with the default
constructor; otherwise returns FALSE.

<h3 class=fn>int <a name="lineWidth"></a>TQStyleOption::lineWidth () const
</h3>

<p> Returns the line width if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn><a href="tqlistviewitem.html">TQListViewItem</a>&nbsp;* <a name="listViewItem"></a>TQStyleOption::listViewItem () const
</h3>

<p> Returns a <a href="tqlistview.html">TQListView</a> item if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn>int <a name="maxIconWidth"></a>TQStyleOption::maxIconWidth () const
</h3>

<p> Returns the maximum width of the menu item check area if the
appropriate constructor was called; otherwise the return value is
undefined.

<h3 class=fn>TQMenuItem * <a name="menuItem"></a>TQStyleOption::menuItem () const
</h3>

<p> Returns a menu item if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn>int <a name="midLineWidth"></a>TQStyleOption::midLineWidth () const
</h3>

<p> Returns the mid-line width if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn><a href="tqrect.html">TQRect</a> <a name="rect"></a>TQStyleOption::rect () const
</h3>

<p> Returns a rectangle if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn><a href="tqtab.html">TQTab</a>&nbsp;* <a name="tab"></a>TQStyleOption::tab () const
</h3>

<p> Returns a <a href="tqtabbar.html">TQTabBar</a> tab if the appropriate constructor was called;
otherwise the return value is undefined.

<h3 class=fn>int <a name="tabWidth"></a>TQStyleOption::tabWidth () const
</h3>

<p> Returns the tab indent width if the appropriate constructor was
called; otherwise the return value is undefined.

<h3 class=fn><a href="tqwidget.html">TQWidget</a>&nbsp;* <a name="widget"></a>TQStyleOption::widget () const
</h3>

<p> Returns a pointer to a widget if the appropriate constructor was called;
otherwise the return value is undefined.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 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 &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>