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
|
'\" t
.TH TQStyleOption 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQStyleOption \- Optional parameters for TQStyle functions
.SH SYNOPSIS
\fC#include <tqstyle.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBStyleOptionDefault\fR { Default }"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( StyleOptionDefault = Default )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( int in1 )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( int in1, int in2 )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( int in1, int in2, int in3, int in4 )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( TQMenuItem * m )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( TQMenuItem * m, int in1 )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( TQMenuItem * m, int in1, int in2 )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( const TQColor & c )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( QTab * t )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( QListViewItem * i )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( QCheckListItem * i )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( TQt::ArrowType a )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( const TQRect & r )"
.br
.ti -1c
.BI "\fBTQStyleOption\fR ( TQWidget * w )"
.br
.ti -1c
.BI "bool \fBisDefault\fR () const"
.br
.ti -1c
.BI "int \fBday\fR () const"
.br
.ti -1c
.BI "int \fBlineWidth\fR () const"
.br
.ti -1c
.BI "int \fBmidLineWidth\fR () const"
.br
.ti -1c
.BI "int \fBframeShape\fR () const"
.br
.ti -1c
.BI "int \fBframeShadow\fR () const"
.br
.ti -1c
.BI "int \fBheaderSection\fR () const"
.br
.ti -1c
.BI "TQMenuItem * \fBmenuItem\fR () const"
.br
.ti -1c
.BI "int \fBmaxIconWidth\fR () const"
.br
.ti -1c
.BI "int \fBtabWidth\fR () const"
.br
.ti -1c
.BI "const TQColor & \fBcolor\fR () const"
.br
.ti -1c
.BI "QTab * \fBtab\fR () const"
.br
.ti -1c
.BI "QCheckListItem * \fBcheckListItem\fR () const"
.br
.ti -1c
.BI "QListViewItem * \fBlistViewItem\fR () const"
.br
.ti -1c
.BI "TQt::ArrowType \fBarrowType\fR () const"
.br
.ti -1c
.BI "TQRect \fBrect\fR () const"
.br
.ti -1c
.BI "TQWidget * \fBwidget\fR () const"
.br
.in -1c
.SH DESCRIPTION
The TQStyleOption class specifies optional parameters for TQStyle functions.
.PP
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.
.PP
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.
.PP
For each constructor, you should refer to the documentation of the TQStyle functions to see the meaning of the arguments.
.PP
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.
.PP
When subclassing TQStyle, you must similarly only expect the default or documented arguments. The other arguments will have uninitialized values.
.PP
If you make your own TQStyle 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.
.PP
See also Widget Appearance and Style.
.SS "Member Type Documentation"
.SH "TQStyleOption::StyleOptionDefault"
This enum value can be passed as the optional argument to any TQStyle function.
.TP
\fCTQStyleOption::Default\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQStyleOption::TQStyleOption ( StyleOptionDefault = Default )"
The default option. This can always be passed as the optional argument to TQStyle functions.
.SH "TQStyleOption::TQStyleOption ( int in1 )"
Pass one integer, \fIin1\fR. For example, headerSection.
.SH "TQStyleOption::TQStyleOption ( int in1, int in2 )"
Pass two integers, \fIin1\fR and \fIin2\fR. For example, linewidth and midlinewidth.
.SH "TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 )"
Pass four integers, \fIin1\fR, \fIin2\fR, \fIin3\fR and \fIin4\fR.
.SH "TQStyleOption::TQStyleOption ( TQMenuItem * m )"
Pass a menu item, \fIm\fR.
.SH "TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1 )"
Pass a menu item and an integer, \fIm\fR and \fIin1\fR.
.SH "TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1, int in2 )"
Pass a menu item and two integers, \fIm\fR, \fIin1\fR and \fIin2\fR.
.SH "TQStyleOption::TQStyleOption ( const TQColor & c )"
Pass a color, \fIc\fR.
.SH "TQStyleOption::TQStyleOption ( QTab * t )"
Pass a QTab, \fIt\fR.
.SH "TQStyleOption::TQStyleOption ( QListViewItem * i )"
Pass a QListViewItem, \fIi\fR.
.SH "TQStyleOption::TQStyleOption ( QCheckListItem * i )"
Pass a QCheckListItem, \fIi\fR.
.SH "TQStyleOption::TQStyleOption ( TQt::ArrowType a )"
Pass an TQt::ArrowType, \fIa\fR.
.SH "TQStyleOption::TQStyleOption ( const TQRect & r )"
Pass a TQRect, \fIr\fR.
.SH "TQStyleOption::TQStyleOption ( TQWidget * w )"
Pass a TQWidget, \fIw\fR.
.SH "TQt::ArrowType TQStyleOption::arrowType () const"
Returns an arrow type if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QCheckListItem * TQStyleOption::checkListItem () const"
Returns a check list item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "const TQColor & TQStyleOption::color () const"
Returns a color if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::day () const"
Returns the index of the day in the month if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::frameShadow () const"
Returns a QFrame::Shadow value if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::frameShape () const"
Returns a QFrame::Shape value if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::headerSection () const"
Returns the header section if the appropriate constructor was called; otherwise the return value is undefined.
.SH "bool TQStyleOption::isDefault () const"
Returns TRUE if the option was constructed with the default constructor; otherwise returns FALSE.
.SH "int TQStyleOption::lineWidth () const"
Returns the line width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QListViewItem * TQStyleOption::listViewItem () const"
Returns a QListView item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::maxIconWidth () const"
Returns the maximum width of the menu item check area if the appropriate constructor was called; otherwise the return value is undefined.
.SH "TQMenuItem * TQStyleOption::menuItem () const"
Returns a menu item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::midLineWidth () const"
Returns the mid-line width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "TQRect TQStyleOption::rect () const"
Returns a rectangle if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QTab * TQStyleOption::tab () const"
Returns a QTabBar tab if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int TQStyleOption::tabWidth () const"
Returns the tab indent width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "TQWidget * TQStyleOption::widget () const"
Returns a pointer to a widget if the appropriate constructor was called;
otherwise the return value is undefined.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqstyleoption.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqstyleoption.3qt) and the Qt
version (3.3.8).
|