You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
8.7 KiB
223 lines
8.7 KiB
'\" t
|
|
.TH QStyleOption 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
|
|
QStyleOption \- Optional parameters for QStyle functions
|
|
.SH SYNOPSIS
|
|
\fC#include <ntqstyle.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-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 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 (tqstyleoption.3qt) and the Qt
|
|
version (3.3.8).
|