1QStyleOption(3qt)                                            QStyleOption(3qt)
2
3
4

NAME

6       QStyleOption - Optional parameters for QStyle functions
7

SYNOPSIS

9       #include <qstyle.h>
10
11   Public Members
12       enum StyleOptionDefault { Default }
13       QStyleOption ( StyleOptionDefault = Default )
14       QStyleOption ( int in1 )
15       QStyleOption ( int in1, int in2 )
16       QStyleOption ( int in1, int in2, int in3, int in4 )
17       QStyleOption ( QMenuItem * m )
18       QStyleOption ( QMenuItem * m, int in1 )
19       QStyleOption ( QMenuItem * m, int in1, int in2 )
20       QStyleOption ( const QColor & c )
21       QStyleOption ( QTab * t )
22       QStyleOption ( QListViewItem * i )
23       QStyleOption ( QCheckListItem * i )
24       QStyleOption ( Qt::ArrowType a )
25       QStyleOption ( const QRect & r )
26       QStyleOption ( QWidget * w )
27       bool isDefault () const
28       int day () const
29       int lineWidth () const
30       int midLineWidth () const
31       int frameShape () const
32       int frameShadow () const
33       int headerSection () const
34       QMenuItem * menuItem () const
35       int maxIconWidth () const
36       int tabWidth () const
37       const QColor & color () const
38       QTab * tab () const
39       QCheckListItem * checkListItem () const
40       QListViewItem * listViewItem () const
41       Qt::ArrowType arrowType () const
42       QRect rect () const
43       QWidget * widget () const
44

DESCRIPTION

46       The QStyleOption class specifies optional parameters for QStyle
47       functions.
48
49       Some QStyle functions take an optional argument specifying extra
50       information that is required for a paritical primitive or control. So
51       that the QStyle class can be extended, QStyleOption is used to provide
52       a variable-argument for these options.
53
54       The QStyleOption class has constructors for each type of optional
55       argument, and this set of constructors may be extended in future Qt
56       releases. There are also corresponding access functions that return the
57       optional arguments: these too may be extended.
58
59       For each constructor, you should refer to the documentation of the
60       QStyle functions to see the meaning of the arguments.
61
62       When calling QStyle functions from your own widgets, you must only pass
63       the default QStyleOption or the argument that QStyle is documented to
64       accept. For example, if the function expects QStyleOption(QMenuItem *,
65       int), passing QStyleOption(QMenuItem *) leaves the optional integer
66       argument uninitialized.
67
68       When subclassing QStyle, you must similarly only expect the default or
69       documented arguments. The other arguments will have uninitialized
70       values.
71
72       If you make your own QStyle subclasses and your own widgets, you can
73       make a subclass of QStyleOption to pass additional arguments to your
74       QStyle subclass. You will need to cast the "const QStyleOption&"
75       argument to your subclass, so be sure your style has been called from
76       your widget.
77
78       See also Widget Appearance and Style.
79
80   Member Type Documentation

QStyleOption::StyleOptionDefault

82       This enum value can be passed as the optional argument to any QStyle
83       function.
84
85       QStyleOption::Default
86

MEMBER FUNCTION DOCUMENTATION

QStyleOption::QStyleOption ( StyleOptionDefault = Default )

89       The default option. This can always be passed as the optional argument
90       to QStyle functions.
91

QStyleOption::QStyleOption ( int in1 )

93       Pass one integer, in1. For example, headerSection.
94

QStyleOption::QStyleOption ( int in1, int in2 )

96       Pass two integers, in1 and in2. For example, linewidth and
97       midlinewidth.
98

QStyleOption::QStyleOption ( int in1, int in2, int in3, int in4 )

100       Pass four integers, in1, in2, in3 and in4.
101

QStyleOption::QStyleOption ( QMenuItem * m )

103       Pass a menu item, m.
104

QStyleOption::QStyleOption ( QMenuItem * m, int in1 )

106       Pass a menu item and an integer, m and in1.
107

QStyleOption::QStyleOption ( QMenuItem * m, int in1, int in2 )

109       Pass a menu item and two integers, m, in1 and in2.
110

QStyleOption::QStyleOption ( const QColor & c )

112       Pass a color, c.
113

QStyleOption::QStyleOption ( QTab * t )

115       Pass a QTab, t.
116

QStyleOption::QStyleOption ( QListViewItem * i )

118       Pass a QListViewItem, i.
119

QStyleOption::QStyleOption ( QCheckListItem * i )

121       Pass a QCheckListItem, i.
122

QStyleOption::QStyleOption ( Qt::ArrowType a )

124       Pass an Qt::ArrowType, a.
125

QStyleOption::QStyleOption ( const QRect & r )

127       Pass a QRect, r.
128

QStyleOption::QStyleOption ( QWidget * w )

130       Pass a QWidget, w.
131

Qt::ArrowType QStyleOption::arrowType () const

133       Returns an arrow type if the appropriate constructor was called;
134       otherwise the return value is undefined.
135

QCheckListItem * QStyleOption::checkListItem () const

137       Returns a check list item if the appropriate constructor was called;
138       otherwise the return value is undefined.
139

const QColor & QStyleOption::color () const

141       Returns a color if the appropriate constructor was called; otherwise
142       the return value is undefined.
143

int QStyleOption::day () const

145       Returns the index of the day in the month if the appropriate
146       constructor was called; otherwise the return value is undefined.
147

int QStyleOption::frameShadow () const

149       Returns a QFrame::Shadow value if the appropriate constructor was
150       called; otherwise the return value is undefined.
151

int QStyleOption::frameShape () const

153       Returns a QFrame::Shape value if the appropriate constructor was
154       called; otherwise the return value is undefined.
155

int QStyleOption::headerSection () const

157       Returns the header section if the appropriate constructor was called;
158       otherwise the return value is undefined.
159

bool QStyleOption::isDefault () const

161       Returns TRUE if the option was constructed with the default
162       constructor; otherwise returns FALSE.
163

int QStyleOption::lineWidth () const

165       Returns the line width if the appropriate constructor was called;
166       otherwise the return value is undefined.
167

QListViewItem * QStyleOption::listViewItem () const

169       Returns a QListView item if the appropriate constructor was called;
170       otherwise the return value is undefined.
171

int QStyleOption::maxIconWidth () const

173       Returns the maximum width of the menu item check area if the
174       appropriate constructor was called; otherwise the return value is
175       undefined.
176

QMenuItem * QStyleOption::menuItem () const

178       Returns a menu item if the appropriate constructor was called;
179       otherwise the return value is undefined.
180

int QStyleOption::midLineWidth () const

182       Returns the mid-line width if the appropriate constructor was called;
183       otherwise the return value is undefined.
184

QRect QStyleOption::rect () const

186       Returns a rectangle if the appropriate constructor was called;
187       otherwise the return value is undefined.
188

QTab * QStyleOption::tab () const

190       Returns a QTabBar tab if the appropriate constructor was called;
191       otherwise the return value is undefined.
192

int QStyleOption::tabWidth () const

194       Returns the tab indent width if the appropriate constructor was called;
195       otherwise the return value is undefined.
196

QWidget * QStyleOption::widget () const

198       Returns a pointer to a widget if the appropriate constructor was
199       called; otherwise the return value is undefined.
200
201

SEE ALSO

203       http://doc.trolltech.com/qstyleoption.html
204       http://www.trolltech.com/faq/tech.html
205
207       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
208       license file included in the distribution for a complete license
209       statement.
210

AUTHOR

212       Generated automatically from the source code.
213

BUGS

215       If you find a bug in Qt, please report it as described in
216       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
217       help you. Thank you.
218
219       The definitive Qt documentation is provided in HTML format; it is
220       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
221       web browser. This man page is provided as a convenience for those users
222       who prefer man pages, although this format is not officially supported
223       by Trolltech.
224
225       If you find errors in this manual page, please report them to qt-
226       bugs@trolltech.com.  Please include the name of the manual page
227       (qstyleoption.3qt) and the Qt version (3.3.8).
228
229
230
231Trolltech AS                    2 February 2007              QStyleOption(3qt)
Impressum