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 QStyleOption 3qt "21 January 2005" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QStyleOption \- Optional parameters for QStyle functions
.SH SYNOPSIS
\fC#include <qstyle.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum \fBStyleOptionDefault\fR { Default }"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( StyleOptionDefault = Default )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( int in1 )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( int in1, int in2 )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( int in1, int in2, int in3, int in4 )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QMenuItem * m )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QMenuItem * m, int in1 )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QMenuItem * m, int in1, int in2 )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( const QColor & c )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QTab * t )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QListViewItem * i )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QCheckListItem * i )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( Qt::ArrowType a )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( const QRect & r )"
.br
.ti -1c
.BI "\fBQStyleOption\fR ( QWidget * 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 "QMenuItem * \fBmenuItem\fR () const"
.br
.ti -1c
.BI "int \fBmaxIconWidth\fR () const"
.br
.ti -1c
.BI "int \fBtabWidth\fR () const"
.br
.ti -1c
.BI "const QColor & \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 "Qt::ArrowType \fBarrowType\fR () const"
.br
.ti -1c
.BI "QRect \fBrect\fR () const"
.br
.ti -1c
.BI "QWidget * \fBwidget\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QStyleOption class specifies optional parameters for QStyle functions.
.PP
Some QStyle functions take an optional argument specifying extra information that is required for a paritical primitive or control. So that the QStyle class can be extended, QStyleOption is used to provide a variable-argument for these options.
.PP
The QStyleOption class has constructors for each type of optional argument, and this set of constructors may be extended in future Qt 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 QStyle functions to see the meaning of the arguments.
.PP
When calling QStyle functions from your own widgets, you must only pass the default QStyleOption or the argument that QStyle is documented to accept. For example, if the function expects QStyleOption(QMenuItem *, int), passing QStyleOption(QMenuItem *) leaves the optional integer argument uninitialized.
.PP
When subclassing QStyle, you must similarly only expect the default or documented arguments. The other arguments will have uninitialized values.
.PP
If you make your own QStyle subclasses and your own widgets, you can make a subclass of QStyleOption to pass additional arguments to your QStyle subclass. You will need to cast the "const QStyleOption&" 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 "QStyleOption::StyleOptionDefault"
This enum value can be passed as the optional argument to any QStyle function.
.TP
\fCQStyleOption::Default\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QStyleOption::QStyleOption ( StyleOptionDefault = Default )"
The default option. This can always be passed as the optional argument to QStyle functions.
.SH "QStyleOption::QStyleOption ( int in1 )"
Pass one integer, \fIin1\fR. For example, headerSection.
.SH "QStyleOption::QStyleOption ( int in1, int in2 )"
Pass two integers, \fIin1\fR and \fIin2\fR. For example, linewidth and midlinewidth.
.SH "QStyleOption::QStyleOption ( int in1, int in2, int in3, int in4 )"
Pass four integers, \fIin1\fR, \fIin2\fR, \fIin3\fR and \fIin4\fR.
.SH "QStyleOption::QStyleOption ( QMenuItem * m )"
Pass a menu item, \fIm\fR.
.SH "QStyleOption::QStyleOption ( QMenuItem * m, int in1 )"
Pass a menu item and an integer, \fIm\fR and \fIin1\fR.
.SH "QStyleOption::QStyleOption ( QMenuItem * m, int in1, int in2 )"
Pass a menu item and two integers, \fIm\fR, \fIin1\fR and \fIin2\fR.
.SH "QStyleOption::QStyleOption ( const QColor & c )"
Pass a color, \fIc\fR.
.SH "QStyleOption::QStyleOption ( QTab * t )"
Pass a QTab, \fIt\fR.
.SH "QStyleOption::QStyleOption ( QListViewItem * i )"
Pass a QListViewItem, \fIi\fR.
.SH "QStyleOption::QStyleOption ( QCheckListItem * i )"
Pass a QCheckListItem, \fIi\fR.
.SH "QStyleOption::QStyleOption ( Qt::ArrowType a )"
Pass an Qt::ArrowType, \fIa\fR.
.SH "QStyleOption::QStyleOption ( const QRect & r )"
Pass a QRect, \fIr\fR.
.SH "QStyleOption::QStyleOption ( QWidget * w )"
Pass a QWidget, \fIw\fR.
.SH "Qt::ArrowType QStyleOption::arrowType () const"
Returns an arrow type if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QCheckListItem * QStyleOption::checkListItem () const"
Returns a check list item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "const QColor & QStyleOption::color () const"
Returns a color if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::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 QStyleOption::frameShadow () const"
Returns a QFrame::Shadow value if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::frameShape () const"
Returns a QFrame::Shape value if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::headerSection () const"
Returns the header section if the appropriate constructor was called; otherwise the return value is undefined.
.SH "bool QStyleOption::isDefault () const"
Returns TRUE if the option was constructed with the default constructor; otherwise returns FALSE.
.SH "int QStyleOption::lineWidth () const"
Returns the line width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QListViewItem * QStyleOption::listViewItem () const"
Returns a QListView item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::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 "QMenuItem * QStyleOption::menuItem () const"
Returns a menu item if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::midLineWidth () const"
Returns the mid-line width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QRect QStyleOption::rect () const"
Returns a rectangle if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QTab * QStyleOption::tab () const"
Returns a QTabBar tab if the appropriate constructor was called; otherwise the return value is undefined.
.SH "int QStyleOption::tabWidth () const"
Returns the tab indent width if the appropriate constructor was called; otherwise the return value is undefined.
.SH "QWidget * QStyleOption::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/qstyleoption.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2001 Trolltech AS, 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 Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt 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 (qstyleoption.3qt) and the Qt
version (3.3.4).
|