TQStyleOption(3qt)

NAME
TQStyleOption - Optional parameters for TQStyle functions

SYNOPSIS
#include <tqstyle.h>

  Public Members
enum StyleOptionDefault { Default }
TQStyleOption ( StyleOptionDefault = Default )
TQStyleOption ( int in1 )
TQStyleOption ( int in1, int in2 )
TQStyleOption ( int in1, int in2, int in3, int in4 )
TQStyleOption ( TQMenuItem * m )
TQStyleOption ( TQMenuItem * m, int in1 )
TQStyleOption ( TQMenuItem * m, int in1, int in2 )
TQStyleOption ( const TQColor & c )
TQStyleOption ( TQTab * t )
TQStyleOption ( TQListViewItem * i )
TQStyleOption ( TQCheckListItem * i )
TQStyleOption ( TQt::ArrowType a )
TQStyleOption ( const TQRect & r )
TQStyleOption ( TQWidget * w )
bool isDefault () const
int day () const
int lineWidth () const
int midLineWidth () const
int frameShape () const
int frameShadow () const
int headerSection () const
TQMenuItem * menuItem () const
int maxIconWidth () const
int tabWidth () const
const TQColor & color () const
TQTab * tab () const
TQCheckListItem * checkListItem () const
TQListViewItem * listViewItem () const
TQt::ArrowType arrowType () const
TQRect rect () const
TQWidget * widget () const

DESCRIPTION
The TQStyleOption class specifies optional parameters for TQStyle functions.

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.

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.

For each constructor, you should refer to the documentation of the TQStyle functions to see the meaning of the arguments.

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.

When subclassing TQStyle, you must similarly only expect the default or documented arguments. The other arguments will have uninitialized values.

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.

See also Widget Appearance and Style.

  Member Type Documentation

TQStyleOption::StyleOptionDefault
This enum value can be passed as the optional argument to any TQStyle function.

TQStyleOption::Default

MEMBER FUNCTION DOCUMENTATION

TQStyleOption::TQStyleOption ( StyleOptionDefault = Default )
The default option. This can always be passed as the optional argument to TQStyle functions.

TQStyleOption::TQStyleOption ( int in1 )
Pass one integer, in1. For example, headerSection.

TQStyleOption::TQStyleOption ( int in1, int in2 )
Pass two integers, in1 and in2. For example, linewidth and midlinewidth.

TQStyleOption::TQStyleOption ( int in1, int in2, int in3, int in4 )
Pass four integers, in1, in2, in3 and in4.

TQStyleOption::TQStyleOption ( TQMenuItem * m )
Pass a menu item, m.

TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1 )
Pass a menu item and an integer, m and in1.

TQStyleOption::TQStyleOption ( TQMenuItem * m, int in1, int in2 )
Pass a menu item and two integers, m, in1 and in2.

TQStyleOption::TQStyleOption ( const TQColor & c )
Pass a color, c.

TQStyleOption::TQStyleOption ( TQTab * t )
Pass a TQTab, t.

TQStyleOption::TQStyleOption ( TQListViewItem * i )
Pass a TQListViewItem, i.

TQStyleOption::TQStyleOption ( TQCheckListItem * i )
Pass a TQCheckListItem, i.

TQStyleOption::TQStyleOption ( TQt::ArrowType a )
Pass an TQt::ArrowType, a.

TQStyleOption::TQStyleOption ( const TQRect & r )
Pass a TQRect, r.

TQStyleOption::TQStyleOption ( TQWidget * w )
Pass a TQWidget, w.

TQt::ArrowType TQStyleOption::arrowType () const
Returns an arrow type if the appropriate constructor was called; otherwise the return value is undefined.

TQCheckListItem * TQStyleOption::checkListItem () const
Returns a check list item if the appropriate constructor was called; otherwise the return value is undefined.

const TQColor & TQStyleOption::color () const
Returns a color if the appropriate constructor was called; otherwise the return value is undefined.

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.

int TQStyleOption::frameShadow () const
Returns a TQFrame::Shadow value if the appropriate constructor was called; otherwise the return value is undefined.

int TQStyleOption::frameShape () const
Returns a TQFrame::Shape value if the appropriate constructor was called; otherwise the return value is undefined.

int TQStyleOption::headerSection () const
Returns the header section if the appropriate constructor was called; otherwise the return value is undefined.

bool TQStyleOption::isDefault () const
Returns true if the option was constructed with the default constructor; otherwise returns false.

int TQStyleOption::lineWidth () const
Returns the line width if the appropriate constructor was called; otherwise the return value is undefined.

TQListViewItem * TQStyleOption::listViewItem () const
Returns a TQListView item if the appropriate constructor was called; otherwise the return value is undefined.

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.

TQMenuItem * TQStyleOption::menuItem () const
Returns a menu item if the appropriate constructor was called; otherwise the return value is undefined.

int TQStyleOption::midLineWidth () const
Returns the mid-line width if the appropriate constructor was called; otherwise the return value is undefined.

TQRect TQStyleOption::rect () const
Returns a rectangle if the appropriate constructor was called; otherwise the return value is undefined.

TQTab * TQStyleOption::tab () const
Returns a TQTabBar tab if the appropriate constructor was called; otherwise the return value is undefined.

int TQStyleOption::tabWidth () const
Returns the tab indent width if the appropriate constructor was called; otherwise the return value is undefined.

TQWidget * TQStyleOption::widget () const
Returns a pointer to a widget if the appropriate constructor was called; otherwise the return value is undefined.

SEE ALSO
http://doc.trolltech.com/tqstyleoption.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you.

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.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqstyleoption.3qt) and the Qt version (3.3.8).