Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The TQStyleOption class specifies optional parameters for TQStyle functions. More...
#include <qstyle.h>
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.
This enum value can be passed as the optional argument to any TQStyle function.
The default option. This can always be passed as the optional argument to TQStyle functions.
Pass one integer, in1. For example, headerSection.
Pass two integers, in1 and in2. For example, linewidth and midlinewidth.
Pass four integers, in1, in2, in3 and in4.
Pass a menu item, m.
Pass a menu item and an integer, m and in1.
Pass a menu item and two integers, m, in1 and in2.
Pass a color, c.
Pass a TQTab, t.
Pass a TQListViewItem, i.
Pass a TQCheckListItem, i.
Pass an TQt::ArrowType, a.
Pass a TQRect, r.
Pass a TQWidget, w.
Returns an arrow type if the appropriate constructor was called; otherwise the return value is undefined.
Returns a check list item if the appropriate constructor was called; otherwise the return value is undefined.
Returns a color if the appropriate constructor was called; otherwise the return value is undefined.
Returns the index of the day in the month if the appropriate constructor was called; otherwise the return value is undefined.
Returns a TQFrame::Shadow value if the appropriate constructor was called; otherwise the return value is undefined.
Returns a TQFrame::Shape value if the appropriate constructor was called; otherwise the return value is undefined.
Returns the header section if the appropriate constructor was called; otherwise the return value is undefined.
Returns TRUE if the option was constructed with the default constructor; otherwise returns FALSE.
Returns the line width if the appropriate constructor was called; otherwise the return value is undefined.
Returns a TQListView item if the appropriate constructor was called; otherwise the return value is undefined.
Returns the maximum width of the menu item check area if the appropriate constructor was called; otherwise the return value is undefined.
Returns a menu item if the appropriate constructor was called; otherwise the return value is undefined.
Returns the mid-line width if the appropriate constructor was called; otherwise the return value is undefined.
Returns a rectangle if the appropriate constructor was called; otherwise the return value is undefined.
Returns a TQTabBar tab if the appropriate constructor was called; otherwise the return value is undefined.
Returns the tab indent width if the appropriate constructor was called; otherwise the return value is undefined.
Returns a pointer to a widget if the appropriate constructor was called; otherwise the return value is undefined.
This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.
Copyright © 2007 Trolltech | Trademarks | TQt 3.3.8
|