Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1870

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/kernel/qstyle.cpp:233 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QStyle Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QStyle Class Reference</h1>

<p>The QStyle class specifies the look and feel of a GUI.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qstyle-h.html">qstyle.h</a>&gt;</tt>
<p>Inherits <a href="qobject.html">QObject</a>.
<p>Inherited by <a href="qcommonstyle.html">QCommonStyle</a>.
<p><a href="qstyle-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QStyle"><b>QStyle</b></a> ()</div></li>
<li><div class=fn>virtual <a href="#~QStyle"><b>~QStyle</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#polish"><b>polish</b></a> ( QWidget * )</div></li>
<li><div class=fn>virtual void <a href="#unPolish"><b>unPolish</b></a> ( QWidget * )</div></li>
<li><div class=fn>virtual void <a href="#polish-2"><b>polish</b></a> ( QApplication * )</div></li>
<li><div class=fn>virtual void <a href="#unPolish-2"><b>unPolish</b></a> ( QApplication * )</div></li>
<li><div class=fn>virtual void <a href="#polish-3"><b>polish</b></a> ( QPalette &amp; )</div></li>
<li><div class=fn>virtual void <a href="#polishPopupMenu"><b>polishPopupMenu</b></a> ( QPopupMenu * ) = 0</div></li>
<li><div class=fn>virtual QRect <a href="#itemRect"><b>itemRect</b></a> ( QPainter&nbsp;*&nbsp;p, const&nbsp;QRect&nbsp;&amp;&nbsp;r, int&nbsp;flags, bool&nbsp;enabled, const&nbsp;QPixmap&nbsp;*&nbsp;pixmap, const&nbsp;QString&nbsp;&amp;&nbsp;text, int&nbsp;len = -1 ) const</div></li>
<li><div class=fn>virtual void <a href="#drawItem"><b>drawItem</b></a> ( QPainter&nbsp;*&nbsp;p, const&nbsp;QRect&nbsp;&amp;&nbsp;r, int&nbsp;flags, const&nbsp;QColorGroup&nbsp;&amp;&nbsp;g, bool&nbsp;enabled, const&nbsp;QPixmap&nbsp;*&nbsp;pixmap, const&nbsp;QString&nbsp;&amp;&nbsp;text, int&nbsp;len = -1, const&nbsp;QColor&nbsp;*&nbsp;penColor = 0 ) const</div></li>
<li><div class=fn>enum <a href="#PrimitiveElement-enum"><b>PrimitiveElement</b></a> { PE_ButtonCommand, PE_ButtonDefault, PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect, PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft, PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus, PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask, PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask, PE_DockWindowHandle, PE_DockWindowSeparator, PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup, PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase, PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection, PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark, PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage, PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst, PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit, PE_PanelTabWidget, PE_WindowFrame, PE_CustomBase = 0xf000000 }</div></li>
<li><div class=fn>enum <a href="#StyleFlags-enum"><b>StyleFlags</b></a> { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }</div></li>
<li><div class=fn>virtual void <a href="#drawPrimitive"><b>drawPrimitive</b></a> ( PrimitiveElement&nbsp;pe, QPainter&nbsp;*&nbsp;p, const&nbsp;QRect&nbsp;&amp;&nbsp;r, const&nbsp;QColorGroup&nbsp;&amp;&nbsp;cg, SFlags&nbsp;flags = Style_Default, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>enum <a href="#ControlElement-enum"><b>ControlElement</b></a> { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual void <a href="#drawControl"><b>drawControl</b></a> ( ControlElement&nbsp;element, QPainter&nbsp;*&nbsp;p, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;r, const&nbsp;QColorGroup&nbsp;&amp;&nbsp;cg, SFlags&nbsp;how = Style_Default, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>virtual void <a href="#drawControlMask"><b>drawControlMask</b></a> ( ControlElement&nbsp;element, QPainter&nbsp;*&nbsp;p, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;r, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>enum <a href="#SubRect-enum"><b>SubRect</b></a> { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual QRect <a href="#subRect"><b>subRect</b></a> ( SubRect&nbsp;subrect, const&nbsp;QWidget&nbsp;*&nbsp;widget ) const = 0</div></li>
<li><div class=fn>enum <a href="#ComplexControl-enum"><b>ComplexControl</b></a> { CC_SpinWidget, CC_ComboBox, CC_ScrollBar, CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>enum <a href="#SubControl-enum"><b>SubControl</b></a> { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }</div></li>
<li><div class=fn>virtual void <a href="#drawComplexControl"><b>drawComplexControl</b></a> ( ComplexControl&nbsp;control, QPainter&nbsp;*&nbsp;p, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;r, const&nbsp;QColorGroup&nbsp;&amp;&nbsp;cg, SFlags&nbsp;how = Style_Default, SCFlags&nbsp;sub = SC_All, SCFlags&nbsp;subActive = SC_None, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>virtual void <a href="#drawComplexControlMask"><b>drawComplexControlMask</b></a> ( ComplexControl&nbsp;control, QPainter&nbsp;*&nbsp;p, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;r, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>virtual QRect <a href="#querySubControlMetrics"><b>querySubControlMetrics</b></a> ( ComplexControl&nbsp;control, const&nbsp;QWidget&nbsp;*&nbsp;widget, SubControl&nbsp;subcontrol, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>virtual SubControl <a href="#querySubControl"><b>querySubControl</b></a> ( ComplexControl&nbsp;control, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QPoint&nbsp;&amp;&nbsp;pos, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>enum <a href="#PixelMetric-enum"><b>PixelMetric</b></a> { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual int <a href="#pixelMetric"><b>pixelMetric</b></a> ( PixelMetric&nbsp;metric, const&nbsp;QWidget&nbsp;*&nbsp;widget = 0 ) const = 0</div></li>
<li><div class=fn>enum <a href="#ContentsType-enum"><b>ContentsType</b></a> { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual QSize <a href="#sizeFromContents"><b>sizeFromContents</b></a> ( ContentsType&nbsp;contents, const&nbsp;QWidget&nbsp;*&nbsp;widget, const&nbsp;QSize&nbsp;&amp;&nbsp;contentsSize, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>enum <a href="#StyleHint-enum"><b>StyleHint</b></a> { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual int <a href="#styleHint"><b>styleHint</b></a> ( StyleHint&nbsp;stylehint, const&nbsp;QWidget&nbsp;*&nbsp;widget = 0, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default, QStyleHintReturn&nbsp;*&nbsp;returnData = 0 ) const = 0</div></li>
<li><div class=fn>enum <a href="#StylePixmap-enum"><b>StylePixmap</b></a> { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_CustomBase = 0xf0000000 }</div></li>
<li><div class=fn>virtual QPixmap <a href="#stylePixmap"><b>stylePixmap</b></a> ( StylePixmap&nbsp;stylepixmap, const&nbsp;QWidget&nbsp;*&nbsp;widget = 0, const&nbsp;QStyleOption&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const = 0</div></li>
<li><div class=fn>int defaultFrameWidth () const &nbsp;<em>(obsolete)</em></div></li>
<li><div class=fn>void tabbarMetrics ( const&nbsp;QWidget&nbsp;*&nbsp;t, int&nbsp;&amp;&nbsp;hf, int&nbsp;&amp;&nbsp;vf, int&nbsp;&amp;&nbsp;ov ) const &nbsp;<em>(obsolete)</em></div></li>
<li><div class=fn>QSize scrollBarExtent () const &nbsp;<em>(obsolete)</em></div></li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li><div class=fn>QRect <a href="#visualRect"><b>visualRect</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;logical, const&nbsp;QWidget&nbsp;*&nbsp;w )</div></li>
<li><div class=fn>QRect <a href="#visualRect-2"><b>visualRect</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;logical, const&nbsp;QRect&nbsp;&amp;&nbsp;bounding )</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The QStyle class specifies the look and feel of a GUI.

<p> A large number of GUI elements are common to many widgets. The
QStyle class allows the look of these elements to be modified
across all widgets that use the QStyle functions.  It also
provides two feel options: Motif and Windows.
<p> Although it is not possible to fully enumerate the look of graphic elements
and the feel of widgets in a GUI, QStyle provides a considerable
amount of control and customisability.
<p> In Qt 1.x the look and feel option for widgets was specified by a
single value - the GUIStyle.  Starting with Qt 2.0, this notion has
been expanded to allow the look to be specified by virtual drawing
functions.
<p> Derived classes may reimplement some or all of the drawing functions
to modify the look of all widgets that use those functions.
<p> Languages written from right to left (such as Arabic and Hebrew)
usually also mirror the whole layout of widgets. If you design a
style, you should take special care when drawing asymmetric elements
to make sure that they also look correct in a mirrored layout. You can
start your application with -reverse to check the mirrored layout.
Also notice, that for a reversed layout, the light usually comes
from top right instead of top left.
<p> The actual reverse layout is performed automatically when possible.
However, for the sake of flexibility, the translation cannot be
performed everywhere.  The documentation for each function in the
QStyle API states whether the function expects/returns logical or
screen coordinates.  Using logical coordinates (in ComplexControls,
for example) provides great flexibility in controlling the look of a
widget.  Use <a href="#visualRect">visualRect</a>() when necessary to translate logical
coordinates into screen coordinates for drawing.
<p> In Qt versions prior to 3.0 if you wanted a low level route into
changing the appearance of a widget you would reimplement <a href="#polish">polish</a>().
With the new 3.0 style engine the recommended approach is to
reimplement the draw functions, for example <a href="#drawItem">drawItem</a>(),
<a href="#drawPrimitive">drawPrimitive</a>(), <a href="#drawControl">drawControl</a>(), <a href="#drawControlMask">drawControlMask</a>(),
<a href="#drawComplexControl">drawComplexControl</a>() and <a href="#drawComplexControlMask">drawComplexControlMask</a>(). Each of these
functions is called with a range of parameters that provide
information that you can use to determine how to draw them, e.g.
style flags, rectangle, color group, etc.
<p> For information on changing elements of an existing style or
creating your own style see the <a href="customstyles.html">Style
    overview</a>.
<p> Styles can also be created as <a href="plugins-howto.html">plugins</a>.
<p>See also <a href="appearance.html">Widget Appearance and Style</a>.

<hr><h2>Member Type Documentation</h2>
<h3 class=fn><a name="ComplexControl-enum"></a>QStyle::ComplexControl</h3>

<p> This enum represents a ComplexControl. ComplexControls have
different behaviour depending upon where the user clicks on them or
which keys are pressed.
<ul>
<li><tt>QStyle::CC_SpinWidget</tt>
<li><tt>QStyle::CC_ComboBox</tt>
<li><tt>QStyle::CC_ScrollBar</tt>
<li><tt>QStyle::CC_Slider</tt>
<li><tt>QStyle::CC_ToolButton</tt>
<li><tt>QStyle::CC_TitleBar</tt>
<li><tt>QStyle::CC_ListView</tt>
</ul><p> <ul>
<li><tt>QStyle::CC_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#SubControl-enum">SubControl</a> and <a href="#drawComplexControl">drawComplexControl</a>().

<h3 class=fn><a name="ContentsType-enum"></a>QStyle::ContentsType</h3>

<p> This enum represents a ContentsType.  It is used to calculate sizes
for the contents of various widgets.
<ul>
<li><tt>QStyle::CT_PushButton</tt>
<li><tt>QStyle::CT_CheckBox</tt>
<li><tt>QStyle::CT_RadioButton</tt>
<li><tt>QStyle::CT_ToolButton</tt>
<li><tt>QStyle::CT_ComboBox</tt>
<li><tt>QStyle::CT_Splitter</tt>
<li><tt>QStyle::CT_DockWindow</tt>
<li><tt>QStyle::CT_ProgressBar</tt>
<li><tt>QStyle::CT_PopupMenuItem</tt>
</ul><p> <ul>
<li><tt>QStyle::CT_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#sizeFromContents">sizeFromContents</a>().

<h3 class=fn><a name="ControlElement-enum"></a>QStyle::ControlElement</h3>

<p> This enum represents a ControlElement.  A ControlElement is part of
a widget that performs some action or display information to the user.
<p> <ul>
<li><tt>QStyle::CE_PushButton</tt> - the bevel and default indicator of a <a href="qpushbutton.html">QPushButton</a>.
<li><tt>QStyle::CE_PushButtonLabel</tt> - the label (iconset with text or pixmap) of a QPushButton.
</ul><p> <ul>
<li><tt>QStyle::CE_CheckBox</tt> - the indicator of a <a href="qcheckbox.html">QCheckBox</a>.
<li><tt>QStyle::CE_CheckBoxLabel</tt> - the label (text or pixmap) of a QCheckBox.
</ul><p> <ul>
<li><tt>QStyle::CE_RadioButton</tt> - the indicator of a <a href="qradiobutton.html">QRadioButton</a>.
<li><tt>QStyle::CE_RadioButtonLabel</tt> - the label (text or pixmap) of a QRadioButton.
</ul><p> <ul>
<li><tt>QStyle::CE_TabBarTab</tt> - the tab within a <a href="qtabbar.html">QTabBar</a> (a <a href="qtab.html">QTab</a>).
<li><tt>QStyle::CE_TabBarLabel</tt> - the label within a QTab.
</ul><p> <ul>
<li><tt>QStyle::CE_ProgressBarGroove</tt> - the groove where the progress indicator is drawn in
a <a href="qprogressbar.html">QProgressBar</a>.
<li><tt>QStyle::CE_ProgressBarContents</tt> - the progress indicator of a QProgressBar.
<li><tt>QStyle::CE_ProgressBarLabel</tt> - the text label of a QProgressBar.
</ul><p> <ul>
<li><tt>QStyle::CE_PopupMenuItem</tt> - a menu item in a <a href="qpopupmenu.html">QPopupMenu</a>.
</ul><p> <ul>
<li><tt>QStyle::CE_MenuBarItem</tt> - a menu item in a <a href="qmenubar.html">QMenuBar</a>.
<li><tt>QStyle::CE_ToolButtonLabel</tt> - a tool button's label.
</ul><p> <ul>
<li><tt>QStyle::CE_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#drawControl">drawControl</a>().

<h3 class=fn><a name="PixelMetric-enum"></a>QStyle::PixelMetric</h3>

<p> This enum represents a PixelMetric.  A PixelMetric is a style dependent size
represented as a single pixel value.
<ul>
<li><tt>QStyle::PM_ButtonMargin</tt> - amount of whitespace between pushbutton labels and the frame.
<li><tt>QStyle::PM_ButtonDefaultIndicator</tt> - width of the default-button indicator frame.
<li><tt>QStyle::PM_MenuButtonIndicator</tt> - width of the menu button indicator
proportional to the widget height.
<li><tt>QStyle::PM_ButtonShiftHorizontal</tt> - horizontal contents shift of a button when the
button is down.
<li><tt>QStyle::PM_ButtonShiftVertical</tt> - vertical contents shift of a button when the
button is down.
</ul><p> <ul>
<li><tt>QStyle::PM_DefaultFrameWidth</tt> - default frame width, usually 2.
<li><tt>QStyle::PM_SpinBoxFrameWidth</tt> - frame width of a spin box.
</ul><p> <ul>
<li><tt>QStyle::PM_MaximumDragDistance</tt> - Some feels require the scrollbar or
other sliders to jump back to the original position when the mouse
pointer is too far away while dragging.  A value of -1 disables this
behavior.
</ul><p> <ul>
<li><tt>QStyle::PM_ScrollBarExtent</tt> - width of a vertical scrollbar and the height of a
horizontal scrollbar.
<li><tt>QStyle::PM_ScrollBarSliderMin</tt> - the minimum height of a vertical scrollbar's slider
and the minimum width of a horiztonal scrollbar slider.
</ul><p> <ul>
<li><tt>QStyle::PM_SliderThickness</tt> - total slider thickness.
<li><tt>QStyle::PM_SliderControlThickness</tt> - thickness of the slider handle.
<li><tt>QStyle::PM_SliderLength</tt> - length of the slider.
<li><tt>QStyle::PM_SliderTickmarkOffset</tt> - the offset between the tickmarks and the slider.
<li><tt>QStyle::PM_SliderSpaceAvailable</tt> - the available space for the slider to move.
</ul><p> <ul>
<li><tt>QStyle::PM_DockWindowSeparatorExtent</tt> - width of a separator in a horiztonal dock window
and the height of a separator in a vertical dock window.
<li><tt>QStyle::PM_DockWindowHandleExtent</tt> - width of the handle in a horizontal dock window and
the height of the handle in a vertical dock window.
<li><tt>QStyle::PM_DockWindowFrameWidth</tt> - frame width of a dock window.
</ul><p> <ul>
<li><tt>QStyle::PM_MenuBarFrameWidth</tt> - frame width of a menubar.
</ul><p> <ul>
<li><tt>QStyle::PM_TabBarTabOverlap</tt> - number of pixels the tabs should overlap.
<li><tt>QStyle::PM_TabBarTabHSpace</tt> - extra space added to the tab width.
<li><tt>QStyle::PM_TabBarTabVSpace</tt> - extra space added to the tab height.
<li><tt>QStyle::PM_TabBarBaseHeight</tt> - height of the area between the tab bar and the tab pages.
<li><tt>QStyle::PM_TabBarBaseOverlap</tt> - number of pixels the tab bar overlaps the tab bar base.
</ul><p> <ul>
<li><tt>QStyle::PM_ProgressBarChunkWidth</tt> - width of a chunk in a progress bar indicator.
</ul><p> <ul>
<li><tt>QStyle::PM_SplitterWidth</tt> - width of a splitter.
<li><tt>QStyle::PM_TitleBarHeight</tt> - height of the title bar.
<li><tt>QStyle::PM_IndicatorWidth</tt> - width of a check box indicator.
<li><tt>QStyle::PM_IndicatorHeight</tt> - height of a checkbox indicator.
<li><tt>QStyle::PM_ExclusiveIndicatorWidth</tt> - width of a radio button indicator.
<li><tt>QStyle::PM_ExclusiveIndicatorHeight</tt> - height of a radio button indicator.
</ul><p> <ul>
<li><tt>QStyle::PM_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#pixelMetric">pixelMetric</a>().

<h3 class=fn><a name="PrimitiveElement-enum"></a>QStyle::PrimitiveElement</h3>

<p> This enum represents the PrimitiveElements of a style.  A
PrimitiveElement is a common GUI element, such as a checkbox
indicator or pushbutton bevel.
<ul>
<li><tt>QStyle::PE_ButtonCommand</tt> - button used to initiate an action, for
example, a <a href="qpushbutton.html">QPushButton</a>.
<li><tt>QStyle::PE_ButtonDefault</tt> - this button is the default button, e.g.
in a dialog.
<li><tt>QStyle::PE_ButtonBevel</tt> - generic button bevel.
<li><tt>QStyle::PE_ButtonTool</tt> - tool button, for example, a <a href="qtoolbutton.html">QToolButton</a>.
<li><tt>QStyle::PE_ButtonDropDown</tt> - drop down button, for example, a tool
button that displays a popup menu, for example, <a href="qpopupmenu.html">QPopupMenu</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_FocusRect</tt> - generic focus indicator.
</ul><p> <ul>
<li><tt>QStyle::PE_ArrowUp</tt> - up arrow.
<li><tt>QStyle::PE_ArrowDown</tt> - down arrow.
<li><tt>QStyle::PE_ArrowRight</tt> - right arrow.
<li><tt>QStyle::PE_ArrowLeft</tt> - left arrow.
</ul><p> <ul>
<li><tt>QStyle::PE_SpinWidgetUp</tt> - up symbol for a spin widget, for example a
<a href="qspinbox.html">QSpinBox</a>.
<li><tt>QStyle::PE_SpinWidgetDown</tt> - down symbol for a spin widget.
<li><tt>QStyle::PE_SpinWidgetPlus</tt> - increase symbol for a spin widget.
<li><tt>QStyle::PE_SpinWidgetMinus</tt> - decrease symbol for a spin widget.
</ul><p> <ul>
<li><tt>QStyle::PE_Indicator</tt> - on/off indicator, for example, a <a href="qcheckbox.html">QCheckBox</a>.
<li><tt>QStyle::PE_IndicatorMask</tt> - bitmap mask for an indicator.
<li><tt>QStyle::PE_ExclusiveIndicator</tt> - exclusive on/off indicator, for example, a <a href="qradiobutton.html">QRadioButton</a>.
<li><tt>QStyle::PE_ExclusiveIndicatorMask</tt> - bitmap mask for an exclusive indicator.
</ul><p> <ul>
<li><tt>QStyle::PE_DockWindowHandle</tt> - tear off handle for dock windows and toolbars, for example <a href="qdockwindow.html">QDockWindow</a>s and <a href="qtoolbar.html">QToolBar</a>s.
<li><tt>QStyle::PE_DockWindowSeparator</tt> - item separator for dock window and toolbar contents.
<li><tt>QStyle::PE_DockWindowResizeHandle</tt> - resize handle for dock windows.
<li><tt>QStyle::PE_Splitter</tt> - splitter handle; see also <a href="qsplitter.html">QSplitter</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_Panel</tt> - generic panel frame; see also <a href="qframe.html">QFrame</a>.
<li><tt>QStyle::PE_PanelPopup</tt> - panel frame for popup windows/menus; see also
<a href="qpopupmenu.html">QPopupMenu</a>.
<li><tt>QStyle::PE_PanelMenuBar</tt> - panel frame for menu bars.
<li><tt>QStyle::PE_PanelDockWindow</tt> - panel frame for dock windows and toolbars.
<li><tt>QStyle::PE_PanelTabWidget</tt> - panel frame for tab widgets.
<li><tt>QStyle::PE_PanelLineEdit</tt> - panel frame for line edits.
<li><tt>QStyle::PE_TabBarBase</tt> - area below tabs in a tab widget, for example,
<a href="qtab.html">QTab</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_HeaderSection</tt> - section of a list or table header; see also
<a href="qheader.html">QHeader</a>.
<li><tt>QStyle::PE_HeaderArrow</tt> - arrow used to indicate sorting on a list or table
header
<li><tt>QStyle::PE_StatusBarSection</tt> - section of a status bar; see also
<a href="qstatusbar.html">QStatusBar</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_GroupBoxFrame</tt> - frame around a group box; see also
<a href="qgroupbox.html">QGroupBox</a>.
<li><tt>QStyle::PE_WindowFrame</tt> - frame around a MDI or docking window
</ul><p> <ul>
<li><tt>QStyle::PE_Separator</tt> - generic separator.
</ul><p> <ul>
<li><tt>QStyle::PE_SizeGrip</tt> - window resize handle; see also <a href="qsizegrip.html">QSizeGrip</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_CheckMark</tt> - generic check mark; see also <a href="qcheckbox.html">QCheckBox</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_ScrollBarAddLine</tt> - scrollbar line increase indicator (i.e. scroll down); see also <a href="qscrollbar.html">QScrollBar</a>.
<li><tt>QStyle::PE_ScrollBarSubLine</tt> - scrollbar line decrease indicator (i.e. scroll up).
<li><tt>QStyle::PE_ScrollBarAddPage</tt> - scolllbar page increase indicator (i.e. page down).
<li><tt>QStyle::PE_ScrollBarSubPage</tt> - scrollbar page decrease indicator (i.e. page up).
<li><tt>QStyle::PE_ScrollBarSlider</tt> - scrollbar slider
<li><tt>QStyle::PE_ScrollBarFirst</tt> - scrollbar first line indicator (i.e. home).
<li><tt>QStyle::PE_ScrollBarLast</tt> - scrollbar last line indicator (i.e. end).
</ul><p> <ul>
<li><tt>QStyle::PE_ProgressBarChunk</tt> - section of a progress bar indicator; see
also <a href="qprogressbar.html">QProgressBar</a>.
</ul><p> <ul>
<li><tt>QStyle::PE_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#drawPrimitive">drawPrimitive</a>().

<h3 class=fn><a name="StyleFlags-enum"></a>QStyle::StyleFlags</h3>

<p> This enum represents flags for drawing PrimitiveElements.  Not all
primitives use all of these flags.  Note that these flags may mean
different things to different primitives. For an explanation of the
relationship between primitives and their flags, as well as the
different meanings of the flags, see the <a href="customstyles.html">Style overview</a>.
<ul>
<li><tt>QStyle::Style_Default</tt>
<li><tt>QStyle::Style_Enabled</tt>
<li><tt>QStyle::Style_Raised</tt>
<li><tt>QStyle::Style_Sunken</tt>
<li><tt>QStyle::Style_Off</tt>
<li><tt>QStyle::Style_NoChange</tt>
<li><tt>QStyle::Style_On</tt>
<li><tt>QStyle::Style_Down</tt>
<li><tt>QStyle::Style_Horizontal</tt>
<li><tt>QStyle::Style_HasFocus</tt>
<li><tt>QStyle::Style_Top</tt>
<li><tt>QStyle::Style_Bottom</tt>
<li><tt>QStyle::Style_FocusAtBorder</tt>
<li><tt>QStyle::Style_AutoRaise</tt>
<li><tt>QStyle::Style_MouseOver</tt>
<li><tt>QStyle::Style_Up</tt>
<li><tt>QStyle::Style_Selected</tt>
<li><tt>QStyle::Style_HasFocus</tt>
<li><tt>QStyle::Style_Active</tt>
<li><tt>QStyle::Style_ButtonDefault</tt>
</ul><p> <p>See also <a href="#drawPrimitive">drawPrimitive</a>().

<h3 class=fn><a name="StyleHint-enum"></a>QStyle::StyleHint</h3>

<p> This enum represents a StyleHint.  A StyleHint is a general look
and/or feel hint.
<ul>
<li><tt>QStyle::SH_EtchDisabledText</tt> - disabled text is "etched" like Windows.
<li><tt>QStyle::SH_GUIStyle</tt> - the GUI style to use.
<li><tt>QStyle::SH_ScrollBar_BackgroundMode</tt> - the background mode for a
<a href="qscrollbar.html">QScrollBar</a>.  Possible values are any of those in the <a href="qt.html#BackgroundMode-enum">BackgroundMode</a> enum.
<li><tt>QStyle::SH_ScrollBar_MiddleClickAbsolutePosition</tt> - a boolean value. If
TRUE, middle clicking on a scrollbar causes the slider to jump to
that position.  If FALSE, the middle clicking is ignored.
<li><tt>QStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl</tt> - a boolean value.
If TRUE, when clicking a scrollbar SubControl, holding the mouse
button down and moving the pointer outside the SubControl, the
scrollbar continues to scroll.  If FALSE, the scollbar stops
scrolling when the pointer leaves the SubControl.
</ul><p> <ul>
<li><tt>QStyle::SH_TabBar_Alignment</tt> - the alignment for tabs in a <a href="qtabwidget.html">QTabWidget</a>.
Possible values are Qt::AlignLeft, Qt::AlignCenter and
Qt::AlignRight.
<li><tt>QStyle::SH_Header_ArrowAlignment</tt> - the placement of the sorting
indicator may appear in list or table headers.
Possible values are Qt::Left or Qt::Right.
<li><tt>QStyle::SH_Slider_SnapToValue</tt> - sliders snap to values while moving,
like Windows
<li><tt>QStyle::SH_Slider_SloppyKeyEvents</tt> - key presses handled in a sloppy
manner, i.e. left on a vertical slider subtracts a line.
<li><tt>QStyle::SH_ProgressDialog_CenterCancelButton</tt> - center button on
progress dialogs, like Motif, otherwise right aligned.
<li><tt>QStyle::SH_ProgressDialog_TextLabelAlignment</tt> - Qt::AlignmentFlags --
text label alignment in progress dialogs; Center on windows,
Auto|VCenter otherwise.
<li><tt>QStyle::SH_PrintDialog_RightAlignButtons</tt> - right align buttons in
the print dialog, like Windows.
<li><tt>QStyle::SH_MainWindow_SpaceBelowMenuBar</tt> - 1 or 2 pixel space between
the menubar and the dockarea, like Windows.
<li><tt>QStyle::SH_FontDialog_SelectAssociatedText</tt> - select the text in the
line edit, or when selecting an item from the
listbox, or when the line edit receives focus, like Windows.
<li><tt>QStyle::SH_PopupMenu_AllowActiveAndDisabled</tt> - allows disabled menu
items to be active.
<li><tt>QStyle::SH_PopupMenu_SpaceActivatesItem</tt> - pressing Space activates
the item, like Motif.
<li><tt>QStyle::SH_PopupMenu_SubMenuPopupDelay</tt> - the number of milliseconds
to wait before opening a submenu; 256 on windows, 96 on Motif.
<li><tt>QStyle::SH_ScrollView_FrameOnlyAroundContents</tt> - whether scrollviews
draw their frame only around contents (like Motif), or around
contents, scrollbars and corner widgets (like Windows).
<li><tt>QStyle::SH_MenuBar_AltKeyNavigation</tt> - menubars items are navigable
by pressing Alt, followed by using the arrow keys to select the
desired item.
<li><tt>QStyle::SH_ComboBox_ListMouseTracking</tt> - mouse tracking in combobox
dropdown lists.
<li><tt>QStyle::SH_PopupMenu_MouseTracking</tt> - mouse tracking in popup menus.
<li><tt>QStyle::SH_MenuBar_MouseTracking</tt> - mouse tracking in menubars.
<li><tt>QStyle::SH_ItemView_ChangeHighlightOnFocus</tt> - gray out selected items
when losing focus.
<li><tt>QStyle::SH_Widget_ShareActivation</tt> - turn on sharing activation with
floating modeless dialogs.
<li><tt>QStyle::SH_TabBar_SelectMouseType</tt> - which type of mouse event should
cause a tab to be selected.
<li><tt>QStyle::SH_ComboBox_Popup</tt> - allows popups as a combobox dropdown menu.
<li><tt>QStyle::SH_Workspace_FillSpaceOnMaximize</tt> - the workspace should
maximize the client area.
<li><tt>QStyle::SH_TitleBar_NoBorder</tt> - the titlebar has no border
<li><tt>QStyle::SH_ScrollBar_StopMouseOverSlider</tt> - stops autorepeat when slider reaches mouse
<li><tt>QStyle::SH_BlinkCursorWhenTextSelected</tt> - whether cursor should blink when text is selected
<li><tt>QStyle::SH_RichText_FullWidthSelection</tt> - whether richtext selections should 
extend the full width of the document.
<li><tt>QStyle::SH_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#styleHint">styleHint</a>().

<h3 class=fn><a name="StylePixmap-enum"></a>QStyle::StylePixmap</h3>

<p> This enum represents a StylePixmap.  A StylePixmap is a pixmap that
can follow some existing GUI style or guideline.
<p> <ul>
<li><tt>QStyle::SP_TitleBarMinButton</tt> - minimize button on titlebars.  For example, in a
<a href="qworkspace.html">QWorkspace</a>.
<li><tt>QStyle::SP_TitleBarMaxButton</tt> - maximize button on titlebars.
<li><tt>QStyle::SP_TitleBarCloseButton</tt> - close button on titlebars.
<li><tt>QStyle::SP_TitleBarNormalButton</tt> - normal (restore) button on titlebars.
<li><tt>QStyle::SP_TitleBarShadeButton</tt> - shade button on titlebars.
<li><tt>QStyle::SP_TitleBarUnshadeButton</tt> - unshade button on titlebars.
<li><tt>QStyle::SP_MessageBoxInformation</tt> - the 'information' icon.
<li><tt>QStyle::SP_MessageBoxWarning</tt> - the 'warning' icon.
<li><tt>QStyle::SP_MessageBoxCritical</tt> - the 'critical' icon.
</ul><p> <ul>
<li><tt>QStyle::SP_DockWindowCloseButton</tt> - close button on dock windows;  see also <a href="qdockwindow.html">QDockWindow</a>.
</ul><p> <ul>
<li><tt>QStyle::SP_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#stylePixmap">stylePixmap</a>().

<h3 class=fn><a name="SubControl-enum"></a>QStyle::SubControl</h3>

<p> This enum represents a SubControl within a ComplexControl.
<ul>
<li><tt>QStyle::SC_None</tt> - special value that matches no other SubControl.
</ul><p> <ul>
<li><tt>QStyle::SC_ScrollBarAddLine</tt> - scrollbar add line (i.e. down/right arrow); see also QScrollbar.
<li><tt>QStyle::SC_ScrollBarSubLine</tt> - scrollbar sub line (i.e. up/left arrow).
<li><tt>QStyle::SC_ScrollBarAddPage</tt> - scrollbar add page (i.e. page down).
<li><tt>QStyle::SC_ScrollBarSubPage</tt> - scrollbar sub page (i.e. page up).
<li><tt>QStyle::SC_ScrollBarFirst</tt> - scrollbar first line (i.e. home).
<li><tt>QStyle::SC_ScrollBarLast</tt> - scrollbar last line (i.e. end).
<li><tt>QStyle::SC_ScrollBarSlider</tt> - scrollbar slider handle.
<li><tt>QStyle::SC_ScrollBarGroove</tt> - special subcontrol which contains the area in which the
slider handle may move.
</ul><p> <ul>
<li><tt>QStyle::SC_SpinWidgetUp</tt> - spinwidget up/increase; see also <a href="qspinbox.html">QSpinBox</a>.
<li><tt>QStyle::SC_SpinWidgetDown</tt> - spinwidget down/decrease.
<li><tt>QStyle::SC_SpinWidgetFrame</tt> - spinwidget frame.
<li><tt>QStyle::SC_SpinWidgetEditField</tt> - spinwidget edit field.
<li><tt>QStyle::SC_SpinWidgetButtonField</tt> - spinwidget button field.
</ul><p> <ul>
<li><tt>QStyle::SC_ComboBoxEditField</tt> - combobox edit field; see also <a href="qcombobox.html">QComboBox</a>.
<li><tt>QStyle::SC_ComboBoxArrow</tt> - combobox arrow
<li><tt>QStyle::SC_ComboBoxFrame</tt> - combobox frame
</ul><p> <ul>
<li><tt>QStyle::SC_SliderGroove</tt> - special subcontrol which contains the area in which the
slider handle may move.
<li><tt>QStyle::SC_SliderHandle</tt> - slider handle.
<li><tt>QStyle::SC_SliderTickmarks</tt> - slider tickmarks.
</ul><p> <ul>
<li><tt>QStyle::SC_ToolButton</tt> - tool button; see also QToolbutton.
<li><tt>QStyle::SC_ToolButtonMenu</tt> - subcontrol for opening a popup menu in a tool button; see also <a href="qpopupmenu.html">QPopupMenu</a>.
</ul><p> <ul>
<li><tt>QStyle::SC_TitleBarSysMenu</tt> - system menu button (i.e. restore, close, etc.).
<li><tt>QStyle::SC_TitleBarMinButton</tt> - minimize button.
<li><tt>QStyle::SC_TitleBarMaxButton</tt> - maximize button.
<li><tt>QStyle::SC_TitleBarCloseButton</tt> - close button.
<li><tt>QStyle::SC_TitleBarLabel</tt> - window title label.
<li><tt>QStyle::SC_TitleBarNormalButton</tt> - normal (restore) button.
<li><tt>QStyle::SC_TitleBarShadeButton</tt> - shade button.
<li><tt>QStyle::SC_TitleBarUnshadeButton</tt> - unshade button.
</ul><p> <ul>
<li><tt>QStyle::SC_ListView</tt> - the list view area.
<li><tt>QStyle::SC_ListViewBranch</tt> - (internal)
<li><tt>QStyle::SC_ListViewExpand</tt> - expand item (i.e. show/hide child items).
</ul><p> <ul>
<li><tt>QStyle::SC_All</tt> - special value that matches all SubControls.
</ul><p> <p>See also <a href="#ComplexControl-enum">ComplexControl</a>.

<h3 class=fn><a name="SubRect-enum"></a>QStyle::SubRect</h3>

<p> This enum represents a sub-area of a widget.  Style implementations
would use these areas to draw the different parts of a widget.
<ul>
<li><tt>QStyle::SR_PushButtonContents</tt> - area containing the label (iconset with text or pixmap).
<li><tt>QStyle::SR_PushButtonFocusRect</tt> - area for the focus rect (usually larger than the
contents rect).
<li><tt>QStyle::SR_CheckBoxIndicator</tt> - area for the state indicator (e.g. check mark).
<li><tt>QStyle::SR_CheckBoxContents</tt> - area for the label (text or pixmap).
<li><tt>QStyle::SR_CheckBoxFocusRect</tt> - area for the focus indicator.
</ul><p> <ul>
<li><tt>QStyle::SR_RadioButtonIndicator</tt> - area for the state indicator.
<li><tt>QStyle::SR_RadioButtonContents</tt> - area for the label.
<li><tt>QStyle::SR_RadioButtonFocusRect</tt> - area for the focus indicator.
</ul><p> <ul>
<li><tt>QStyle::SR_ComboBoxFocusRect</tt> - area for the focus indicator.
</ul><p> <ul>
<li><tt>QStyle::SR_SliderFocusRect</tt> - area for the focus indicator.
</ul><p> <ul>
<li><tt>QStyle::SR_DockWindowHandleRect</tt> - area for the tear-off handle.
</ul><p> <ul>
<li><tt>QStyle::SR_ProgressBarGroove</tt> - area for the groove.
<li><tt>QStyle::SR_ProgressBarContents</tt> - area for the progress indicator.
<li><tt>QStyle::SR_ProgressBarLabel</tt> - area for the text label.
</ul><p> <ul>
<li><tt>QStyle::SR_ToolButtonContents</tt> - area for the tool button's label.
</ul><p> <ul>
<li><tt>QStyle::SR_CustomBase</tt> - base value for custom ControlElements.  All values above
this are reserved for custom use.  Therefore, custom values must be
greater than this value.
</ul><p> <p>See also <a href="#subRect">subRect</a>().

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QStyle"></a>QStyle::QStyle ()
</h3>
Constructs a QStyle.

<h3 class=fn><a name="~QStyle"></a>QStyle::~QStyle ()<tt> [virtual]</tt>
</h3>
Destroys the style and frees all allocated resources.

<h3 class=fn>int <a name="defaultFrameWidth"></a>QStyle::defaultFrameWidth () const
</h3>

<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> 
<h3 class=fn>void <a name="drawComplexControl"></a>QStyle::drawComplexControl ( <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&nbsp;control, <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp;&nbsp;cg, SFlags&nbsp;how = Style_Default, SCFlags&nbsp;sub = SC_All, SCFlags&nbsp;subActive = SC_None, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Draws the ComplexControl <em>control</em> using the painter <em>p</em> in the
area <em>r</em>.  Colors are used from the color group <em>cg</em>.  The <em>sub</em>
argument specifies which SubControls to draw.  Multiple SubControls
can be OR'ed together.  The <em>subActive</em> argument specifies which
SubControl is active.
<p> The rect <em>r</em> should be in logical coordinates.  Reimplementations
of this function should use <a href="#visualRect">visualRect</a>() to change the logical
coordinates into screen coordinates when using <a href="#drawPrimitive">drawPrimitive</a>() and
<a href="#drawControl">drawControl</a>().
<p> The <em>how</em> argument is used to control how the ComplexControl is
drawn.  Multiple flags can OR'ed together. See the table below for
an explanation of which flags are used with the various ComplexControls.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>control</em>.  The <em>opt</em> argument can be used to pass
extra information required when drawing the ComplexControl.  Note
that <em>opt</em> may be the default value even for ComplexControls that
can make use of the extra options.  See the table below for the appropriate
<em>widget</em> and <em>opt</em> usage:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">ComplexControl &amp; Widget Cast
<th valign="top">Style Flags
<th valign="top">Notes
<th valign="top">Options
<th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ComplexControl-enum">CC_SpinWidget</a>(const QSpinWidget *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the spinwidget is enabled.
<td valign="top" colspan="1" rowspan="2"> Unused.
<td valign="top" colspan="1" rowspan="2"> &nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the spinwidget has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ComplexControl-enum">CC_ComboBox</a>(const <a href="qcombobox.html">QComboBox</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the combobox is enabled.
<td valign="top" colspan="1" rowspan="2"> Unused.
<td valign="top" colspan="1" rowspan="2"> &nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the combobox has input focus.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ComplexControl-enum">CC_ScrollBar</a>(const <a href="qscrollbar.html">QScrollBar</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the scrollbar is enabled.
<td valign="top" colspan="1" rowspan="2"> Unused.
<td valign="top" colspan="1" rowspan="2"> &nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the scrollbar has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ComplexControl-enum">CC_Slider</a>(const <a href="qslider.html">QSlider</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the slider is enabled.
<td valign="top" colspan="1" rowspan="2"> Unused.
<td valign="top" colspan="1" rowspan="2"> &nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the slider has input focus.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="6"> <a href="#ComplexControl-enum">CC_ToolButton</a>(const <a href="qtoolbutton.html">QToolButton</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the toolbutton is enabled.
<td valign="top" colspan="1" rowspan="6"> <a href="qstyleoption.html">QStyleOption</a> ( <a href="qt.html#ArrowType-enum">ArrowType</a> t )
<ul>
<li> opt.<a href="qstyleoption.html#arrowType">arrowType</a>()
</ul>
<td valign="top" colspan="1" rowspan="6"> When the tool button only contains an arrow, <em>t</em> is the
arrow's type.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the toolbutton has input focus.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the toolbutton is down (ie. mouse button or space pressed).
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_On</a> <td valign="top">Set if the toolbutton is a toggle button and is toggled on.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_AutoRaise</a> <td valign="top">Set if the toolbutton has auto-raise enabled.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Raised</a> <td valign="top">Set if the button is not down, not on and doesn't
contain the mouse when auto-raise is enabled.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#ComplexControl-enum">CC_TitleBar</a>(const <a href="qwidget.html">QWidget</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the titlebar is enabled.
<td valign="top">Unused.
<td valign="top">&nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ComplexControl-enum">CC_ListView</a>(const <a href="qlistview.html">QListView</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the titlebar is enabled.
<td valign="top"><a href="qstyleoption.html">QStyleOption</a> ( <a href="qlistviewitem.html">QListViewItem</a> *item )
<ul>
<li> opt.<a href="qstyleoption.html#listViewItem">listViewItem</a>()
</ul>
<td valign="top"><em>item</em> is the item that needs branches drawn
</table></center>
<p> <p>See also <a href="#ComplexControl-enum">ComplexControl</a> and <a href="#SubControl-enum">SubControl</a>.

<p>Examples: <a href="themes-example.html#x322">themes/metal.cpp</a> and <a href="themes-example.html#x263">themes/wood.cpp</a>.
<h3 class=fn>void <a name="drawComplexControlMask"></a>QStyle::drawComplexControlMask ( <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&nbsp;control, <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Draw a bitmask for the ComplexControl <em>control</em> using the painter
<em>p</em> in the area <em>r</em>.  See <a href="#drawComplexControl">drawComplexControl</a>() for an explanation
of the use of the <em>widget</em> and <em>opt</em> arguments.
<p> The rect <em>r</em> should be in logical coordinates.  Reimplementations
of this function should use <a href="#visualRect">visualRect</a>() to change the logical
corrdinates into screen coordinates when using <a href="#drawPrimitive">drawPrimitive</a>() and
<a href="#drawControl">drawControl</a>().
<p> <p>See also <a href="#drawComplexControl">drawComplexControl</a>() and <a href="#ComplexControl-enum">ComplexControl</a>.

<p>Example: <a href="themes-example.html#x264">themes/wood.cpp</a>.
<h3 class=fn>void <a name="drawControl"></a>QStyle::drawControl ( <a href="qstyle.html#ControlElement-enum">ControlElement</a>&nbsp;element, <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp;&nbsp;cg, SFlags&nbsp;how = Style_Default, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Draws the ControlElement <em>element</em> using the painter <em>p</em> in the
area <em>r</em>.  Colors are used from the color group <em>cg</em>.
<p> The rect <em>r</em> should be in screen coordinates.
<p> The <em>how</em> argument is used to control how the ControlElement is
drawn.  Multiple flags can be OR'ed together.  See the table below for
an explanation of which flags are used with the various ControlElements.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>element</em>. The <em>opt</em> argument can be used to pass
extra information required when drawing the ControlElement.  Note
that <em>opt</em> may be the default value even for ControlElements that can make use
of the extra options.  See the table below for the appropriate <em>widget</em> and <em>opt</em> usage:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">ControlElement &amp; Widget Cast
<th valign="top">Style Flags
<th valign="top">Notes
<th valign="top">Options
<th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="6"> <a href="#ControlElement-enum">CE_PushButton</a>(const <a href="qpushbutton.html">QPushButton</a> *)
<p> and
<p> <a href="#ControlElement-enum">CE_PushButtonLabel</a>(const <a href="qpushbutton.html">QPushButton</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the button is enabled.
<td valign="top" colspan="1" rowspan="6"> Unused.
<td valign="top" colspan="1" rowspan="6"> &nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the button has input focus.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Raised</a> <td valign="top">Set if the button is not down, not on and not flat.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_On</a> <td valign="top">Set if the button is a toggle button and toggled on.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the button is down (i.e., the mouse button or
space bar is pressed on the button).
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_ButtonDefault</a> <td valign="top">Set if the button a default button.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="6"> <a href="#ControlElement-enum">CE_CheckBox</a>(const <a href="qcheckbox.html">QCheckBox</a> *)
<p> and
<p> <a href="#ControlElement-enum">CE_CheckBoxLabel</a>(const <a href="qcheckbox.html">QCheckBox</a> *)
<p> <td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the checkbox is enabled.
<td valign="top" colspan="1" rowspan="6"> Unused.
<td valign="top" colspan="1" rowspan="6"> &nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the checkbox has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_On</a> <td valign="top">Set if the checkbox is checked.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Off</a> <td valign="top">Set if the checkbox is not checked.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_NoChange</a> <td valign="top">Set if the checkbox is in the NoChange state.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the checkbox is down (i.e., the mouse button or
space bar is pressed on the button).
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="5"> <a href="#ControlElement-enum">CE_RadioButton</a>(const <a href="qradiobutton.html">QRadioButton</a> *)
<p> and
<p> <a href="#ControlElement-enum">CE_RadioButtonLabel</a>(const QRadioButton *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the radiobutton is enabled.
<td valign="top" colspan="1" rowspan="5"> Unused.
<td valign="top" colspan="1" rowspan="5"> &nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the radiobutton has input focus.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_On</a> <td valign="top">Set if the radiobutton is checked.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Off</a> <td valign="top">Set if the radiobutton is not checked.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the radiobutton is down (i.e., the mouse
button or space bar is pressed on the radiobutton).
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ControlElement-enum">CE_TabBarTab</a>(const <a href="qtabbar.html">QTabBar</a> *)
<p> and
<p> <a href="#ControlElement-enum">CE_TabBarLabel</a>(const <a href="qtabbar.html">QTabBar</a> *)
<p> <td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the tabbar and tab is enabled.
<td valign="top" colspan="1" rowspan="2"> <a href="qstyleoption.html">QStyleOption</a> ( <a href="qtab.html">QTab</a> *t )
<ul>
<li> opt.<a href="qstyleoption.html#tab">tab</a>()
</ul>
<td valign="top" colspan="1" rowspan="2"> <em>t</em> is the <a href="qtab.html">QTab</a> being drawn.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Selected</a> <td valign="top">Set if the tab is the current tab.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="2"> <a href="#ControlElement-enum">CE_ProgressBarGroove</a>(const <a href="qprogressbar.html">QProgressBar</a> *)
<p> and
<p> <a href="#ControlElement-enum">CE_ProgressBarContents</a>(const QProgressBar *)
<p> and
<p> <a href="#ControlElement-enum">CE_ProgressBarLabel</a>(const QProgressBar *)
<p> <td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the progressbar is enabled.
<td valign="top" colspan="1" rowspan="2"> Unused.
<td valign="top" colspan="1" rowspan="2"> &nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the progressbar has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="3"> <a href="#ControlElement-enum">CE_PopupMenuItem</a>(const <a href="qpopupmenu.html">QPopupMenu</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the menuitem is enabled.
<td valign="top" colspan="1" rowspan="3"> <a href="qstyleoption.html">QStyleOption</a> ( QMenuItem *mi, int tabwidth, int maxpmwidth )
<ul>
<li> opt.<a href="qstyleoption.html#menuItem">menuItem</a>()
<li> opt.<a href="qstyleoption.html#tabWidth">tabWidth</a>()
<li> opt.<a href="qstyleoption.html#maxIconWidth">maxIconWidth</a>()
</ul>
<td valign="top"><em>mi</em> is the menu item being drawn. QMenuItem is currently an
internal class.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Active</a> <td valign="top">Set if the menuitem is the current item.
<td valign="top"><em>tabwidth</em> is the width of the tab column where key accelerators
are drawn.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the menuitem is down (i.e., the mouse button
or space bar is pressed).
<td valign="top"><em>maxpmwidth</em> is the maximum width of the check column where
checkmarks and iconsets are drawn.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="4"> <a href="#ControlElement-enum">CE_MenuBarItem</a>(const <a href="qmenubar.html">QMenuBar</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the menuitem is enabled
<td valign="top" colspan="1" rowspan="4"> <a href="qstyleoption.html">QStyleOption</a> ( QMenuItem *mi )
<ul>
<li> opt.<a href="qstyleoption.html#menuItem">menuItem</a>()
</ul>
<td valign="top" colspan="1" rowspan="4"> <em>mi</em> is the menu item being drawn.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Active</a> <td valign="top">Set if the menuitem is the current item.
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the menuitem is down (i.e., a mouse button or
the space bar is pressed).
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the menubar has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="7"> <a href="#ControlElement-enum">CE_ToolButtonLabel</a>(const <a href="qtoolbutton.html">QToolButton</a> *)
<td valign="top"><a href="#StyleFlags-enum">Style_Enabled</a> <td valign="top">Set if the toolbutton is enabled.
<td valign="top" colspan="1" rowspan="7"> <a href="qstyleoption.html">QStyleOption</a> ( <a href="qt.html#ArrowType-enum">ArrowType</a> t )
<ul>
<li> opt.<a href="qstyleoption.html#arrowType">arrowType</a>()
</ul>
<td valign="top" colspan="1" rowspan="7"> When the tool button only contains an arrow, <em>t</em> is the arrow's type.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_HasFocus</a> <td valign="top">Set if the toolbutton has input focus.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Down</a> <td valign="top">Set if the toolbutton is down (i.e., a mouse button or
the space is pressed).
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_On</a> <td valign="top">Set if the toolbutton is a toggle button and is toggled on.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_AutoRaise</a> <td valign="top">Set if the toolbutton has auto-raise enabled.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_MouseOver</a> <td valign="top">Set if the mouse pointer is over the toolbutton.
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StyleFlags-enum">Style_Raised</a> <td valign="top">Set if the button is not down, not on and doesn't
contain the mouse when auto-raise is enabled.
</table></center>
<p> <p>See also <a href="#ControlElement-enum">ControlElement</a> and <a href="#StyleFlags-enum">StyleFlags</a>.

<p>Examples: <a href="themes-example.html#x323">themes/metal.cpp</a> and <a href="themes-example.html#x265">themes/wood.cpp</a>.
<h3 class=fn>void <a name="drawControlMask"></a>QStyle::drawControlMask ( <a href="qstyle.html#ControlElement-enum">ControlElement</a>&nbsp;element, <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Draw a bitmask for the ControlElement <em>element</em> using the painter
<em>p</em> in the area <em>r</em>.  See <a href="#drawControl">drawControl</a>() for an
explanation of the use of the <em>widget</em> and <em>opt</em> arguments.
<p> The rect <em>r</em> should be in screen coordinates.
<p> <p>See also <a href="#drawControl">drawControl</a>() and <a href="#ControlElement-enum">ControlElement</a>.

<p>Example: <a href="themes-example.html#x266">themes/wood.cpp</a>.
<h3 class=fn>void <a name="drawItem"></a>QStyle::drawItem ( <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, int&nbsp;flags, const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp;&nbsp;g, bool&nbsp;enabled, const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;*&nbsp;pixmap, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, int&nbsp;len = -1, const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;*&nbsp;penColor = 0 ) const<tt> [virtual]</tt>
</h3>
Draws the <em>text</em> or <em>pixmap</em> in rectangle <em>r</em> using painter <em>p</em>
and color group <em>g</em>. The pen color is specified with <em>penColor</em>.
The <em>enabled</em> bool indicates whether or not the item is enabled;
when reimplementing this bool should influence how the item is
drawn. If <em>len</em> is -1 (the default) all the <em>text</em> is drawn;
otherwise only the first <em>len</em> characters of <em>text</em> are drawn. The
text is aligned and wrapped according to the alignment <em>flags</em> (see
<a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>).
<p> By default, if both the text and the pixmap are not null, the
pixmap is drawn and the text is ignored.

<h3 class=fn>void <a name="drawPrimitive"></a>QStyle::drawPrimitive ( <a href="qstyle.html#PrimitiveElement-enum">PrimitiveElement</a>&nbsp;pe, <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp;&nbsp;cg, SFlags&nbsp;flags = Style_Default, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Draws the style PrimitiveElement <em>pe</em> using the painter <em>p</em> in the
area <em>r</em>.  Colors are used from the color group <em>cg</em>.
<p> The rect <em>r</em> should be in screen coordinates.
<p> The <em>flags</em> argument is used to control how the PrimitiveElement is drawn.
Multiple flags can be OR'ed together.
<p> For example, a pressed button would be drawn with the flags <a href="#StyleFlags-enum">Style_Enabled</a> and <a href="#StyleFlags-enum">Style_Down</a>.
<p> The <em>opt</em> argument can be used to control how various
PrimitiveElements are drawn. Note that <em>opt</em> may be the default value
even for PrimitiveElements that make use of extra options. When <em>opt</em>
is non-default, it is used as follows:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">PrimitiveElement <th valign="top">Options <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PrimitiveElement-enum">PE_FocusRect</a>
<td valign="top"><a href="qstyleoption.html">QStyleOption</a> ( const <a href="qcolor.html">QColor</a> & bg )
<ul>
<li> opt.<a href="qstyleoption.html#color">color</a>()
</ul>
<td valign="top"><em>bg</em> is the background color on which the focus rect is being drawn.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="2"> <a href="#PrimitiveElement-enum">PE_Panel</a>
<td valign="top" colspan="1" rowspan="2"> <a href="qstyleoption.html">QStyleOption</a> ( int linewidth, int midlinewidth )
<ul>
<li> opt.<a href="qstyleoption.html#lineWidth">lineWidth</a>()
<li> opt.<a href="qstyleoption.html#midLineWidth">midLineWidth</a>()
</ul>
<td valign="top"><em>linewidth</em> is the line width for drawing the panel.
<tr bgcolor="#d0d0d0"> <td valign="top"><em>midlinewidth</em> is the mid-line width for drawing the panel.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="2"> <a href="#PrimitiveElement-enum">PE_PanelPopup</a>
<td valign="top" colspan="1" rowspan="2"> <a href="qstyleoption.html">QStyleOption</a> ( int linewidth, int midlinewidth )
<ul>
<li> opt.<a href="qstyleoption.html#lineWidth">lineWidth</a>()
<li> opt.<a href="qstyleoption.html#midLineWidth">midLineWidth</a>()
</ul>
<td valign="top"><em>linewidth</em> is the line width for drawing the panel.
<tr bgcolor="#f0f0f0"> <td valign="top"><em>midlinewidth</em> is the mid-line width for drawing the panel.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="2"> <a href="#PrimitiveElement-enum">PE_PanelMenuBar</a>
<td valign="top" colspan="1" rowspan="2"> <a href="qstyleoption.html">QStyleOption</a> ( int linewidth, int midlinewidth )
<ul>
<li> opt.<a href="qstyleoption.html#lineWidth">lineWidth</a>()
<li> opt.<a href="qstyleoption.html#midLineWidth">midLineWidth</a>()
</ul>
<td valign="top"><em>linewidth</em> is the line width for drawing the panel.
<tr bgcolor="#d0d0d0"> <td valign="top"><em>midlinewidth</em> is the mid-line width for drawing the panel.
<tr bgcolor="#f0f0f0"> <td valign="top" colspan="1" rowspan="2"> <a href="#PrimitiveElement-enum">PE_PanelDockWindow</a>
<td valign="top" colspan="1" rowspan="2"> <a href="qstyleoption.html">QStyleOption</a> ( int linewidth, int midlinewidth )
<ul>
<li> opt.<a href="qstyleoption.html#lineWidth">lineWidth</a>()
<li> opt.<a href="qstyleoption.html#midLineWidth">midLineWidth</a>()
</ul>
<td valign="top"><em>linewidth</em> is the line width for drawing the panel.
<tr bgcolor="#f0f0f0"> <td valign="top"><em>midlinewidth</em> is the mid-line width for drawing the panel.
<tr bgcolor="#d0d0d0"> <td valign="top" colspan="1" rowspan="4"> <a href="#PrimitiveElement-enum">PE_GroupBoxFrame</a>
<td valign="top" colspan="1" rowspan="4"> <a href="qstyleoption.html">QStyleOption</a> ( int linewidth, int midlinewidth, int shape, int shadow )
<ul>
<li> opt.<a href="qstyleoption.html#lineWidth">lineWidth</a>()
<li> opt.<a href="qstyleoption.html#midLineWidth">midLineWidth</a>()
<li> opt.<a href="qstyleoption.html#frameShape">frameShape</a>()
<li> opt.<a href="qstyleoption.html#frameShadow">frameShadow</a>()
</ul>
<td valign="top"><em>linewidth</em> is the line width for the group box.
<tr bgcolor="#d0d0d0"> <td valign="top"><em>midlinewidth</em> is the mid-line width for the group box.
<tr bgcolor="#d0d0d0"> <td valign="top"><em>shape</em> is the <a href="qframe.html#frameShape-prop">frame shape</a>
for the group box.
<tr bgcolor="#d0d0d0"> <td valign="top"><em>shadow</em> is the <a href="qframe.html#frameShadow-prop">frame shadow</a>
for the group box.
</table></center>
<p> For all other <a href="#PrimitiveElement-enum">PrimitiveElements</a>, <em>opt</em> is unused.
<p> <p>See also <a href="#StyleFlags-enum">StyleFlags</a>.

<p>Examples: <a href="themes-example.html#x324">themes/metal.cpp</a> and <a href="themes-example.html#x267">themes/wood.cpp</a>.
<h3 class=fn><a href="qrect.html">QRect</a> <a name="itemRect"></a>QStyle::itemRect ( <a href="qpainter.html">QPainter</a>&nbsp;*&nbsp;p, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, int&nbsp;flags, bool&nbsp;enabled, const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;*&nbsp;pixmap, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, int&nbsp;len = -1 ) const<tt> [virtual]</tt>
</h3>
Returns the appropriate area (see below) within rectangle <em>r</em> in
which to draw the <em>text</em> or <em>pixmap</em> using painter <em>p</em>. If <em>len</em>
is -1 (the default) all the <em>text</em> is drawn; otherwise only the
first <em>len</em> characters of <em>text</em> are drawn. The text is aligned
in accordance with the alignment <em>flags</em> (see <a href="qt.html#AlignmentFlags-enum">Qt::AlignmentFlags</a>).
The <em>enabled</em> bool indicates whether or not the item is enabled.
<p> If <em>r</em> is larger than the area needed to render the <em>text</em> the rectangle that is returned will be offset within <em>r</em> in
accordance with the alignment <em>flags</em>. For example if <em>flags</em> is
<a href="qt.html#AlignmentFlags-enum">AlignCenter</a> the returned rectangle will be
centered within <em>r</em>. If <em>r</em> is smaller than the area needed the
rectangle that is returned will be <em>larger</em> than <em>r</em> (the
smallest rectangle large enough to render the <em>text</em> or <em>pixmap</em>).
<p> By default, if both the text and the pixmap are not null, the
the text is ignored.

<h3 class=fn>int <a name="pixelMetric"></a>QStyle::pixelMetric ( <a href="qstyle.html#PixelMetric-enum">PixelMetric</a>&nbsp;metric, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget = 0 ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the pixel metric for <em>metric</em>.  The <em>widget</em> argument is a
pointer to a <a href="qwidget.html">QWidget</a> or one of its subclasses.  The widget can be
cast to the appropriate type based on the value of <em>metric</em>.  Note
that <em>widget</em> may be zero even for PixelMetrics that can make use
of <em>widget</em>. See the table below for the appropriate <em>widget</em>
casts:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">PixelMetric <th valign="top">Widget Cast
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PixelMetric-enum">PM_SliderControlThickness</a> <td valign="top">(const <a href="qslider.html">QSlider</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#PixelMetric-enum">PM_SliderLength</a> <td valign="top">(const <a href="qslider.html">QSlider</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PixelMetric-enum">PM_SliderTickmarkOffset</a> <td valign="top">(const <a href="qslider.html">QSlider</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#PixelMetric-enum">PM_SliderSpaceAvailable</a> <td valign="top">(const <a href="qslider.html">QSlider</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PixelMetric-enum">PM_TabBarTabOverlap</a> <td valign="top">(const <a href="qtabbar.html">QTabBar</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#PixelMetric-enum">PM_TabBarTabHSpace</a> <td valign="top">(const <a href="qtabbar.html">QTabBar</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PixelMetric-enum">PM_TabBarTabVSpace</a> <td valign="top">(const <a href="qtabbar.html">QTabBar</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#PixelMetric-enum">PM_TabBarBaseHeight</a> <td valign="top">(const <a href="qtabbar.html">QTabBar</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#PixelMetric-enum">PM_TabBarBaseOverlap</a> <td valign="top">(const <a href="qtabbar.html">QTabBar</a> *)
</table></center>

<p>Example: <a href="themes-example.html#x325">themes/metal.cpp</a>.
<h3 class=fn>void <a name="polish"></a>QStyle::polish ( <a href="qwidget.html">QWidget</a>&nbsp;* )<tt> [virtual]</tt>
</h3>
Initializes the appearance of a widget.
<p> This function is called for every widget at some point after it has
been fully created but just <em>before</em> it is shown the very first
time.
<p> Reasonable actions in this function might be to call
QWidget::setBackgroundMode for the widget. An example of highly
unreasonable use would be setting the geometry! Reimplementing this
function gives you a backdoor through which you can change the
appearance of a widget. With Qt 3.0's style engine you will rarely
need to write your own <a href="#polish">polish</a>(); instead reimplement <a href="#drawItem">drawItem</a>(),
<a href="#drawPrimitive">drawPrimitive</a>(), etc.
<p> The <a href="qobject.html#inherits">QWidget::inherits</a>() function may provide enough information to
allow class-specific customizations.  But be careful not to hard-code
things too much because new QStyle subclasses will be expected to work
reasonably with all current and <em>future</em> widgets.
<p> <p>See also <a href="#unPolish">unPolish</a>().

<p>Examples: <a href="themes-example.html#x326">themes/metal.cpp</a> and <a href="themes-example.html#x268">themes/wood.cpp</a>.
<h3 class=fn>void <a name="polish-2"></a>QStyle::polish ( <a href="qapplication.html">QApplication</a>&nbsp;* )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Late initialization of the <a href="qapplication.html">QApplication</a> object.
<p> <p>See also <a href="#unPolish">unPolish</a>().

<h3 class=fn>void <a name="polish-3"></a>QStyle::polish ( <a href="qpalette.html">QPalette</a>&nbsp;&amp; )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> The style may have certain requirements for color palettes.  In this
function it has the chance to change the palette according to these
requirements.
<p> <p>See also <a href="qpalette.html">QPalette</a> and <a href="qapplication.html#setPalette">QApplication::setPalette</a>().

<h3 class=fn>void <a name="polishPopupMenu"></a>QStyle::polishPopupMenu ( <a href="qpopupmenu.html">QPopupMenu</a>&nbsp;* )<tt> [pure virtual]</tt>
</h3>
Polishes the popup menu according to the GUI style. This usually means
setting the mouse tracking (<a href="qwidget.html#setMouseTracking">QPopupMenu::setMouseTracking</a>()) and whether
the menu is checkable by default (<a href="qpopupmenu.html#setCheckable">QPopupMenu::setCheckable</a>()).

<h3 class=fn><a href="qstyle.html#SubControl-enum">SubControl</a> <a name="querySubControl"></a>QStyle::querySubControl ( <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&nbsp;control, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the SubControl for <em>widget</em> at the point <em>pos</em>.  The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its subclasses.
The widget can be casted to the appropriate type based on the value of
<em>control</em>.  The <em>opt</em> argument can be used to pass extra
information required when drawing the ComplexControl.  Note that <em>opt</em> may be the default value even for ComplexControls that can make use of the
extra options. See <a href="#drawComplexControl">drawComplexControl</a>() for an explanation of the <em>widget</em> and <em>opt</em> arguments.
<p> Note that <em>pos</em> is passed in screen coordinates.  When using
<a href="#querySubControlMetrics">querySubControlMetrics</a>() to check for hits and misses, use
<a href="#visualRect">visualRect</a>() to change the logical coordinates into screen
coordinates.
<p> <p>See also <a href="#drawComplexControl">drawComplexControl</a>(), <a href="#ComplexControl-enum">ComplexControl</a>, <a href="#SubControl-enum">SubControl</a> and <a href="#querySubControlMetrics">querySubControlMetrics</a>().

<h3 class=fn><a href="qrect.html">QRect</a> <a name="querySubControlMetrics"></a>QStyle::querySubControlMetrics ( <a href="qstyle.html#ComplexControl-enum">ComplexControl</a>&nbsp;control, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, <a href="qstyle.html#SubControl-enum">SubControl</a>&nbsp;subcontrol, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the rect for the SubControl <em>subcontrol</em> for <em>widget</em> in
logical coordinates.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>control</em>. The <em>opt</em> argument can be used to pass
extra information required when drawing the ComplexControl.  Note
that <em>opt</em> may be the default value even for ComplexControls that can make use of
the extra options. See <a href="#drawComplexControl">drawComplexControl</a>() for an explanation of the
<em>widget</em> and <em>opt</em> arguments.
<p> <p>See also <a href="#drawComplexControl">drawComplexControl</a>(), <a href="#ComplexControl-enum">ComplexControl</a> and <a href="#SubControl-enum">SubControl</a>.

<p>Example: <a href="themes-example.html#x269">themes/wood.cpp</a>.
<h3 class=fn><a href="qsize.html">QSize</a> <a name="scrollBarExtent"></a>QStyle::scrollBarExtent () const
</h3>

<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> 
<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeFromContents"></a>QStyle::sizeFromContents ( <a href="qstyle.html#ContentsType-enum">ContentsType</a>&nbsp;contents, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp;&nbsp;contentsSize, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the size of <em>widget</em> based on the contents size <em>contentsSize</em>.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>contents</em>. The <em>opt</em> argument can be used to pass
extra information required when calculating the size.  Note that <em>opt</em> may be the default value even for ContentsTypes that can make use of the extra
options.  See the table below for the appropriate <em>widget</em> and <em>opt</em>
usage:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">ContentsType <th valign="top">Widget Cast <th valign="top">Options <th valign="top">Notes
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ContentsType-enum">CT_PushButton</a> <td valign="top">(const <a href="qpushbutton.html">QPushButton</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#ContentsType-enum">CT_CheckBox</a> <td valign="top">(const <a href="qcheckbox.html">QCheckBox</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ContentsType-enum">CT_RadioButton</a> <td valign="top">(const <a href="qradiobutton.html">QRadioButton</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#ContentsType-enum">CT_ToolButton</a> <td valign="top">(const <a href="qtoolbutton.html">QToolButton</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ContentsType-enum">CT_ComboBox</a> <td valign="top">(const <a href="qcombobox.html">QComboBox</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#ContentsType-enum">CT_Splitter</a> <td valign="top">(const <a href="qsplitter.html">QSplitter</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ContentsType-enum">CT_DockWindow</a> <td valign="top">(const <a href="qdockwindow.html">QDockWindow</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#ContentsType-enum">CT_ProgressBar</a> <td valign="top">(const <a href="qprogressbar.html">QProgressBar</a> *) <td valign="top">Unused. <td valign="top">&nbsp;
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#ContentsType-enum">CT_PopupMenuItem</a> <td valign="top">(const <a href="qpopupmenu.html">QPopupMenu</a> *)
<td valign="top"><a href="qstyleoption.html">QStyleOption</a> ( QMenuItem *mi )
<ul>
<li> opt.<a href="qstyleoption.html#menuItem">menuItem</a>()
</ul>
<td valign="top"><em>mi</em> is the menu item to use when calculating the size.
QMenuItem is currently an internal class.
</table></center>

<h3 class=fn>int <a name="styleHint"></a>QStyle::styleHint ( <a href="qstyle.html#StyleHint-enum">StyleHint</a>&nbsp;stylehint, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget = 0, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default, QStyleHintReturn&nbsp;*&nbsp;returnData = 0 ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the style hint <em>stylehint</em> for <em>widget</em>.  Currently, <em>widget</em>, <em>opt</em>, and <em>returnData</em> are unused, and are provided only for
future development considerations.
<p> For an explanation of the return value see <a href="#StyleHint-enum">StyleHint</a>.

<h3 class=fn><a href="qpixmap.html">QPixmap</a> <a name="stylePixmap"></a>QStyle::stylePixmap ( <a href="qstyle.html#StylePixmap-enum">StylePixmap</a>&nbsp;stylepixmap, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget = 0, const&nbsp;<a href="qstyleoption.html">QStyleOption</a>&nbsp;&amp;&nbsp;opt = QStyleOption::Default ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns a pixmap for <em>stylepixmap</em>.
<p> The <em>opt</em> argument can be used to pass extra information required
when drawing the ControlElement.  Note that <em>opt</em> may be the
default value even
for StylePixmaps that can make use of the extra options.  Currently,
the <em>opt</em> argument is unused.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>stylepixmap</em>. See the table below for the appropriate
<em>widget</em> casts:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">StylePixmap <th valign="top">Widget Cast
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarMinButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarMaxButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarCloseButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarNormalButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarShadeButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#StylePixmap-enum">SP_TitleBarUnshadeButton</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#StylePixmap-enum">SP_DockWindowCloseButton</a> <td valign="top">(const <a href="qdockwindow.html">QDockWindow</a> *)
</table></center>
<p> <p>See also <a href="#StylePixmap-enum">StylePixmap</a>.

<h3 class=fn><a href="qrect.html">QRect</a> <a name="subRect"></a>QStyle::subRect ( <a href="qstyle.html#SubRect-enum">SubRect</a>&nbsp;subrect, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget ) const<tt> [pure virtual]</tt>
</h3>

<p> Returns the sub-area <em>subrect</em> for the <em>widget</em> in logical
coordinates.
<p> The <em>widget</em> argument is a pointer to a <a href="qwidget.html">QWidget</a> or one of its
subclasses.  The widget can be cast to the appropriate type based on
the value of <em>subrect</em>.  See the table below for the appropriate <em>widget</em> casts:
<p> <center><table cellpadding="4" cellspacing="2" border="0">
<tr bgcolor="#a2c511"> <th valign="top">SubRect <th valign="top">Widget Cast
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_PushButtonContents</a> <td valign="top">(const <a href="qpushbutton.html">QPushButton</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_PushButtonFocusRect</a> <td valign="top">(const <a href="qpushbutton.html">QPushButton</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_CheckBoxIndicator</a> <td valign="top">(const <a href="qcheckbox.html">QCheckBox</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_CheckBoxContents</a> <td valign="top">(const <a href="qcheckbox.html">QCheckBox</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_CheckBoxFocusRect</a> <td valign="top">(const <a href="qcheckbox.html">QCheckBox</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_RadioButtonIndicator</a> <td valign="top">(const <a href="qradiobutton.html">QRadioButton</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_RadioButtonContents</a> <td valign="top">(const <a href="qradiobutton.html">QRadioButton</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_RadioButtonFocusRect</a> <td valign="top">(const <a href="qradiobutton.html">QRadioButton</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_ComboBoxFocusRect</a> <td valign="top">(const <a href="qcombobox.html">QComboBox</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_DockWindowHandleRect</a> <td valign="top">(const <a href="qwidget.html">QWidget</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_ProgressBarGroove</a> <td valign="top">(const <a href="qprogressbar.html">QProgressBar</a> *)
<tr bgcolor="#d0d0d0"> <td valign="top"><a href="#SubRect-enum">SR_ProgressBarContents</a> <td valign="top">(const <a href="qprogressbar.html">QProgressBar</a> *)
<tr bgcolor="#f0f0f0"> <td valign="top"><a href="#SubRect-enum">SR_ProgressBarLabel</a> <td valign="top">(const <a href="qprogressbar.html">QProgressBar</a> *)
</table></center>
<p> The tear-off handle (SR_DockWindowHandleRect) for <a href="qdockwindow.html">QDockWindow</a>
is a private class.  Use <a href="qwidget.html#parentWidget">QWidget::parentWidget</a>() to access the
QDockWindow:
<p> <pre>
    if ( !widget-&gt;parentWidget() )
        return;
    const <a href="qdockwindow.html">QDockWindow</a> *dw = (const <a href="qdockwindow.html">QDockWindow</a> *) widget-&gt;parentWidget();
  </pre>
 
<p> <p>See also <a href="#SubRect-enum">SubRect</a>.

<p>Example: <a href="themes-example.html#x270">themes/wood.cpp</a>.
<h3 class=fn>void <a name="tabbarMetrics"></a>QStyle::tabbarMetrics ( const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;t, int&nbsp;&amp;&nbsp;hf, int&nbsp;&amp;&nbsp;vf, int&nbsp;&amp;&nbsp;ov ) const
</h3>

<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> 
<h3 class=fn>void <a name="unPolish"></a>QStyle::unPolish ( <a href="qwidget.html">QWidget</a>&nbsp;* )<tt> [virtual]</tt>
</h3>
Undoes the initialization of a widget's appearance.
<p> This function is the counterpart to polish. It is called for every
polished widget when the style is dynamically changed. The former
style has to unpolish its settings before the new style can polish
them again.
<p> <p>See also <a href="#polish">polish</a>().

<p>Examples: <a href="themes-example.html#x327">themes/metal.cpp</a> and <a href="themes-example.html#x271">themes/wood.cpp</a>.
<h3 class=fn>void <a name="unPolish-2"></a>QStyle::unPolish ( <a href="qapplication.html">QApplication</a>&nbsp;* )<tt> [virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Undoes the application polish.
<p> <p>See also <a href="#polish">polish</a>().

<h3 class=fn><a href="qrect.html">QRect</a> <a name="visualRect"></a>QStyle::visualRect ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;logical, const&nbsp;<a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )<tt> [static]</tt>
</h3>

<p> Returns the rect <em>logical</em> in screen coordinates.  The bounding
rect for widget <em>w</em> is used to perform the translation.  This
function is provided to aid style implementors in supporting
right-to-left mode.
<p> <p>See also <a href="qapplication.html#reverseLayout">QApplication::reverseLayout</a>().

<h3 class=fn><a href="qrect.html">QRect</a> <a name="visualRect-2"></a>QStyle::visualRect ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;logical, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;bounding )<tt> [static]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Returns the rect <em>logical</em> in screen coordinates.  The rect <em>bounding</em>
is used to perform the translation.  This function is provided to aid style
implementors in supporting right-to-left mode.
<p> <p>See also <a href="qapplication.html#reverseLayout">QApplication::reverseLayout</a>().

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>