<class name="QStyleOption" doc="/** <p>The <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> class stores the parameters used by <a href="QStyle.html"><tt>QStyle</tt></a> functions.</p> <p><a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> and its subclasses contain all the information that <a href="QStyle.html"><tt>QStyle</tt></a> functions need to draw a graphical element.</p> <p>For performance reasons, there are few member functions and the access to the member variables is direct (i.e&#x2e;, using the <tt>.</tt> or <tt>-&gt;</tt> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.</p> <p>The caller of a <a href="QStyle.html"><tt>QStyle</tt></a> function usually creates <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> objects on the stack. This combined with Qt's extensive use of implicit sharing</tt> for types such as <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a>, <a href="QPalette.html"><tt>QPalette</tt></a>, and <a href="QColor.html"><tt>QColor</tt></a> ensures that no memory allocation needlessly takes place.</p> <p>The following code snippet shows how to use a specific <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass to paint a push button:</p> <pre> void MyPushButton::paintEvent(QPaintEvent *) { QStyleOptionButton option; option.initFrom(this); option.state = isDown() ? QStyle::State_Sunken : QStyle::State_Raised; if (isDefault()) option.features |= QStyleOptionButton::DefaultButton; option.text = text(); option.icon = icon(); QPainter painter(this); style()-&gt;drawControl(QStyle::CE_PushButton, &amp;option, &amp;painter, this); }</pre> <p>In our example, the control is a QStyle::CE_PushButton, and according to the QStyle::drawControl() documentation the corresponding class is <a href="QStyleOptionButton.html"><tt>QStyleOptionButton</tt></a>.</p> <p>When reimplementing <a href="QStyle.html"><tt>QStyle</tt></a> functions that take a <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> parameter, you often need to cast the <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> to a subclass. For safety, you can use qstyleoption_cast() to ensure that the pointer type is correct. For example:</p> <pre> void MyStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) { if (element == PE_FrameFocusRect) { const QStyleOptionFocusRect *focusRectOption = qstyleoption_cast&lt;const QStyleOptionFocusRect *&gt;(option); if (focusRectOption) { <span class="comment">// ...</span> } } <span class="comment">// ...</span> }</pre> <p>The qstyleoption_cast() function will return 0 if the object to which <tt>option</tt> points is not of the correct type.</p> <p>For an example demonstrating how style options can be used, see the Styles</tt> example.</p> @see <a href="QStyle.html"><tt>QStyle</tt></a> @see <a href="QStylePainter.html"><tt>QStylePainter</tt></a> */"> <method name="public QStyleOption(com.trolltech.qt.gui.QStyleOption other)" doc="/** <p>Constructs a copy of <tt>other</tt>.</p> */"/> <method name="public QStyleOption(int version, int type)" doc="/** <p>Constructs a <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> with the specified <tt>version</tt> and <tt>type</tt>.</p> <p>The version has no special meaning for <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>; it can be used by subclasses to distinguish between different version of the same option type.</p> <p>The <a href="QStyleOption.html#state()">state</tt></a> member variable is initialized to QStyle::State_None.</p> @see <a href="QStyleOption.html#version()">version</tt></a> @see <a href="QStyleOption.html#type()">type</tt></a> */"/> <method name="public QStyleOption(int version)" doc="/** <p>Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(<tt>version</tt>, SO_Default). */"/> <method name="public QStyleOption()" doc="/** <p>Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(QStyleOption::Version, SO_Default). */"/> <method name="public final void initFrom(com.trolltech.qt.gui.QWidget w)" doc="/** <p>Initializes the <a href="QStyleOption.html#state()">state</tt></a>, <a href="QStyleOption.html#direction()">direction</tt></a>, <a href="QStyleOption.html#rect()">rect</tt></a>, <a href="QStyleOption.html#palette()">palette</tt></a>, and <a href="QStyleOption.html#fontMetrics()"><tt>fontMetrics</tt></a> member variables based on the specified <tt>w</tt>.</p> <p>This is a convenience function; the member variables can also be initialized manually.</p> @see <tt>QWidget::layoutDirection</tt> @see <tt>QWidget::rect</tt> @see <tt>QWidget::palette</tt> @see <tt>QWidget::fontMetrics</tt> */"/> <enum name="StyleOptionVersion" doc="/** <p>This enum is used to hold information about the version of the style option, and is defined for each <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass.</p> <p>The version is used by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.</p> @see <a href="QStyleOption.html#StyleOptionType-enum"><tt>StyleOptionType</tt></a> */"> <enum-value name="Version" doc="/** <p>1</p> */"/> </enum> <enum name="StyleOptionType" doc="/** <p>This enum is used to hold information about the type of the style option, and is defined for each <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass.</p> <p>The type is used internally by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass and your own styles.</p> @see <a href="QStyleOption.html#StyleOptionVersion-enum"><tt>StyleOptionVersion</tt></a> */"> <enum-value name="Type" doc="/** <p>The type of style option provided (<a href="QStyleOption.html#OptionType-enum"><tt>SO_Default</tt></a> for this class).</p> */"/> </enum> <enum name="OptionType" doc="/** <p>This enum is used internally by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass and your own styles.</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>SO_Button</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top"><a href="QStyleOptionButton.html"><tt>QStyleOptionButton</tt></a></td></tr> <tr><td valign="top"><tt>SO_ComboBox</tt></td><td align="center" valign="top"><tt>983044</tt></td><td valign="top"><a href="QStyleOptionComboBox.html"><tt>QStyleOptionComboBox</tt></a></td></tr> <tr><td valign="top"><tt>SO_Complex</tt></td><td align="center" valign="top"><tt>983040</tt></td><td valign="top"><a href="QStyleOptionComplex.html"><tt>QStyleOptionComplex</tt></a></td></tr> <tr><td valign="top"><tt>SO_Default</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top"><a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a></td></tr> <tr><td valign="top"><tt>SO_DockWidget</tt></td><td align="center" valign="top"><tt>10</tt></td><td valign="top"><a href="QStyleOptionDockWidget.html"><tt>QStyleOptionDockWidget</tt></a></td></tr> <tr><td valign="top"><tt>SO_FocusRect</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top"><a href="QStyleOptionFocusRect.html"><tt>QStyleOptionFocusRect</tt></a></td></tr> <tr><td valign="top"><tt>SO_Frame</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top"><a href="QStyleOptionFrame.html"><tt>QStyleOptionFrame</tt></a> <a href="QStyleOptionFrameV2.html"><tt>QStyleOptionFrameV2</tt></a></td></tr> <tr><td valign="top"><tt>SO_GraphicsItem</tt></td><td align="center" valign="top"><tt>17</tt></td><td valign="top"><a href="QStyleOptionGraphicsItem.html"><tt>QStyleOptionGraphicsItem</tt></a></td></tr> <tr><td valign="top"><tt>SO_GroupBox</tt></td><td align="center" valign="top"><tt>983047</tt></td><td valign="top"><a href="QStyleOptionGroupBox.html"><tt>QStyleOptionGroupBox</tt></a></td></tr> <tr><td valign="top"><tt>SO_Header</tt></td><td align="center" valign="top"><tt>8</tt></td><td valign="top"><a href="QStyleOptionHeader.html"><tt>QStyleOptionHeader</tt></a></td></tr> <tr><td valign="top"><tt>SO_MenuItem</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top"><a href="QStyleOptionMenuItem.html"><tt>QStyleOptionMenuItem</tt></a></td></tr> <tr><td valign="top"><tt>SO_ProgressBar</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top"><a href="QStyleOptionProgressBar.html"><tt>QStyleOptionProgressBar</tt></a> <a href="QStyleOptionProgressBarV2.html"><tt>QStyleOptionProgressBarV2</tt></a></td></tr> <tr><td valign="top"><tt>SO_RubberBand</tt></td><td align="center" valign="top"><tt>15</tt></td><td valign="top"><a href="QStyleOptionRubberBand.html"><tt>QStyleOptionRubberBand</tt></a></td></tr> <tr><td valign="top"><tt>SO_SizeGrip</tt></td><td align="center" valign="top"><tt>983048</tt></td><td valign="top"><a href="QStyleOptionSizeGrip.html"><tt>QStyleOptionSizeGrip</tt></a></td></tr> <tr><td valign="top"><tt>SO_Slider</tt></td><td align="center" valign="top"><tt>983041</tt></td><td valign="top"><a href="QStyleOptionSlider.html"><tt>QStyleOptionSlider</tt></a></td></tr> <tr><td valign="top"><tt>SO_SpinBox</tt></td><td align="center" valign="top"><tt>983042</tt></td><td valign="top"><a href="QStyleOptionSpinBox.html"><tt>QStyleOptionSpinBox</tt></a></td></tr> <tr><td valign="top"><tt>SO_Tab</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top"><a href="QStyleOptionTab.html"><tt>QStyleOptionTab</tt></a></td></tr> <tr><td valign="top"><tt>SO_TabBarBase</tt></td><td align="center" valign="top"><tt>14</tt></td><td valign="top"><a href="QStyleOptionTabBarBase.html"><tt>QStyleOptionTabBarBase</tt></a></td></tr> <tr><td valign="top"><tt>SO_TabWidgetFrame</tt></td><td align="center" valign="top"><tt>13</tt></td><td valign="top"><a href="QStyleOptionTabWidgetFrame.html"><tt>QStyleOptionTabWidgetFrame</tt></a></td></tr> <tr><td valign="top"><tt>SO_TitleBar</tt></td><td align="center" valign="top"><tt>983046</tt></td><td valign="top"><a href="QStyleOptionTitleBar.html"><tt>QStyleOptionTitleBar</tt></a></td></tr> <tr><td valign="top"><tt>SO_ToolBar</tt></td><td align="center" valign="top"><tt>16</tt></td><td valign="top"><a href="QStyleOptionToolBar.html"><tt>QStyleOptionToolBar</tt></a></td></tr> <tr><td valign="top"><tt>SO_ToolBox</tt></td><td align="center" valign="top"><tt>7</tt></td><td valign="top"><a href="QStyleOptionToolBox.html"><tt>QStyleOptionToolBox</tt></a></td></tr> <tr><td valign="top"><tt>SO_ToolButton</tt></td><td align="center" valign="top"><tt>983043</tt></td><td valign="top"><a href="QStyleOptionToolButton.html"><tt>QStyleOptionToolButton</tt></a></td></tr> <tr><td valign="top"><tt>SO_ViewItem</tt></td><td align="center" valign="top"><tt>12</tt></td><td valign="top"><a href="QStyleOptionViewItem.html"><tt>QStyleOptionViewItem</tt></a> (used in Interviews)</td></tr> </table></p> <p>The following values are used for custom controls:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>SO_CustomBase</tt></td><td align="center" valign="top"><tt>3840</tt></td><td valign="top">Reserved for custom QStyleOptions; all custom controls values must be above this value</td></tr> <tr><td valign="top"><tt>SO_ComplexCustomBase</tt></td><td align="center" valign="top"><tt>251658240</tt></td><td valign="top">Reserved for custom QStyleOptions; all custom complex controls values must be above this value</td></tr> </table></p> <p>Some style options are defined for various Qt3Support controls:</p> <p><table border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>SO_Q3DockWindow</tt></td><td align="center" valign="top"><tt>9</tt></td><td valign="top"><tt>QStyleOptionQ3DockWindow</tt></td></tr> <tr><td valign="top"><tt>SO_Q3ListView</tt></td><td align="center" valign="top"><tt>983045</tt></td><td valign="top"><tt>QStyleOptionQ3ListView</tt></td></tr> <tr><td valign="top"><tt>SO_Q3ListViewItem</tt></td><td align="center" valign="top"><tt>11</tt></td><td valign="top"><tt>QStyleOptionQ3ListViewItem</tt></td></tr> </table></p> @see <a href="QStyleOption.html#type()">type</tt></a> */"> <enum-value name="SO_Default" doc="/** <p><a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a></p> */"/> <enum-value name="SO_FocusRect" doc="/** <p><a href="QStyleOptionFocusRect.html"><tt>QStyleOptionFocusRect</tt></a></p> */"/> <enum-value name="SO_Button" doc="/** <p><a href="QStyleOptionButton.html"><tt>QStyleOptionButton</tt></a></p> */"/> <enum-value name="SO_Tab" doc="/** <p><a href="QStyleOptionTab.html"><tt>QStyleOptionTab</tt></a></p> */"/> <enum-value name="SO_MenuItem" doc="/** <p><a href="QStyleOptionMenuItem.html"><tt>QStyleOptionMenuItem</tt></a></p> */"/> <enum-value name="SO_Frame" doc="/** <p><a href="QStyleOptionFrame.html"><tt>QStyleOptionFrame</tt></a> <a href="QStyleOptionFrameV2.html"><tt>QStyleOptionFrameV2</tt></a></p> */"/> <enum-value name="SO_ProgressBar" doc="/** <p><a href="QStyleOptionProgressBar.html"><tt>QStyleOptionProgressBar</tt></a> <a href="QStyleOptionProgressBarV2.html"><tt>QStyleOptionProgressBarV2</tt></a></p> */"/> <enum-value name="SO_ToolBox" doc="/** <p><a href="QStyleOptionToolBox.html"><tt>QStyleOptionToolBox</tt></a></p> */"/> <enum-value name="SO_Header" doc="/** <p><a href="QStyleOptionHeader.html"><tt>QStyleOptionHeader</tt></a></p> */"/> <enum-value name="SO_Q3DockWindow" doc="/** <p><tt>QStyleOptionQ3DockWindow</tt></p> */"/> <enum-value name="SO_DockWidget" doc="/** <p><a href="QStyleOptionDockWidget.html"><tt>QStyleOptionDockWidget</tt></a></p> */"/> <enum-value name="SO_Q3ListViewItem" doc="/** <p><tt>QStyleOptionQ3ListViewItem</tt></p> */"/> <enum-value name="SO_ViewItem" doc="/** <p><a href="QStyleOptionViewItem.html"><tt>QStyleOptionViewItem</tt></a> (used in Interviews)</p> */"/> <enum-value name="SO_TabWidgetFrame" doc="/** <p><a href="QStyleOptionTabWidgetFrame.html"><tt>QStyleOptionTabWidgetFrame</tt></a></p> */"/> <enum-value name="SO_TabBarBase" doc="/** <p><a href="QStyleOptionTabBarBase.html"><tt>QStyleOptionTabBarBase</tt></a></p> */"/> <enum-value name="SO_RubberBand" doc="/** <p><a href="QStyleOptionRubberBand.html"><tt>QStyleOptionRubberBand</tt></a></p> */"/> <enum-value name="SO_ToolBar" doc="/** <p><a href="QStyleOptionToolBar.html"><tt>QStyleOptionToolBar</tt></a></p> */"/> <enum-value name="SO_GraphicsItem" doc="/** <p><a href="QStyleOptionGraphicsItem.html"><tt>QStyleOptionGraphicsItem</tt></a></p> */"/> <enum-value name="SO_Complex" doc="/** <p><a href="QStyleOptionComplex.html"><tt>QStyleOptionComplex</tt></a></p> */"/> <enum-value name="SO_Slider" doc="/** <p><a href="QStyleOptionSlider.html"><tt>QStyleOptionSlider</tt></a></p> */"/> <enum-value name="SO_SpinBox" doc="/** <p><a href="QStyleOptionSpinBox.html"><tt>QStyleOptionSpinBox</tt></a></p> */"/> <enum-value name="SO_ToolButton" doc="/** <p><a href="QStyleOptionToolButton.html"><tt>QStyleOptionToolButton</tt></a></p> */"/> <enum-value name="SO_ComboBox" doc="/** <p><a href="QStyleOptionComboBox.html"><tt>QStyleOptionComboBox</tt></a></p> */"/> <enum-value name="SO_Q3ListView" doc="/** <p><tt>QStyleOptionQ3ListView</tt></p> */"/> <enum-value name="SO_TitleBar" doc="/** <p><a href="QStyleOptionTitleBar.html"><tt>QStyleOptionTitleBar</tt></a></p> */"/> <enum-value name="SO_GroupBox" doc="/** <p><a href="QStyleOptionGroupBox.html"><tt>QStyleOptionGroupBox</tt></a></p> */"/> <enum-value name="SO_SizeGrip" doc="/** <p><a href="QStyleOptionSizeGrip.html"><tt>QStyleOptionSizeGrip</tt></a></p> */"/> <enum-value name="SO_CustomBase" doc="/** <p>Reserved for custom QStyleOptions; all custom controls values must be above this value</p> */"/> <enum-value name="SO_ComplexCustomBase" doc="/** <p>Reserved for custom QStyleOptions; all custom complex controls values must be above this value</p> */"/> </enum> <method name="public final com.trolltech.qt.gui.QPalette palette()" doc="/** <p>Returns the palette that should be used when painting the control.</p> <p>By default, the application's default palette is used.</p> @see <a href="QStyleOption.html#setPalette(com.trolltech.qt.gui.QPalette)"><tt>setPalette</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final void setPalette(com.trolltech.qt.gui.QPalette palette)" doc="/** <p>Sets the palette that should be used when painting the control to <tt>palette</tt>.</p> <p>By default, the application's default palette is used.</p> @see <a href="QStyleOption.html#palette()"><tt>palette</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final int version()" doc="/** <p>Returns the version of the style option.</p> <p>This value can be used by subclasses to implement extensions without breaking compatibility. If you use the qstyleoption_cast() function, you normally don't need to check it.</p> <p>The default value is 1.</p> @see <a href="QStyleOption.html#setVersion(int)"><tt>setVersion</tt></a> */"/> <method name="public final void setVersion(int version)" doc="/** <p>Sets the version of the style option to <tt>version</tt>.</p> <p>This value can be used by subclasses to implement extensions without breaking compatibility. If you use the qstyleoption_cast() function, you normally don't need to check it.</p> <p>The default value is 1.</p> @see <a href="QStyleOption.html#version()"><tt>version</tt></a> */"/> <method name="public final com.trolltech.qt.core.Qt.LayoutDirection direction()" doc="/** <p>Returns the text layout direction that should be used when drawing text in the control.</p> <p>By default, the layout direction is Qt::LeftToRight.</p> @see <a href="QStyleOption.html#setDirection(com.trolltech.qt.core.Qt.LayoutDirection)"><tt>setDirection</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final void setDirection(com.trolltech.qt.core.Qt.LayoutDirection direction)" doc="/** <p>Sets the text layout direction that should be used when drawing text in the control to <tt>direction</tt>.</p> <p>By default, the layout direction is Qt::LeftToRight.</p> @see <a href="QStyleOption.html#direction()"><tt>direction</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect rect()" doc="/** <p>Returns the area that should be used for various calculations and painting.</p> <p>This can have different meanings for different types of elements. For example, for a <tt>QStyle::CE_PushButton</tt> element it would be the rectangle for the entire button, while for a <tt>QStyle::CE_PushButtonLabel</tt> element it would be just the area for the push button label.</p> <p>The default value is a null rectangle, i.e&#x2e; a rectangle with both the width and the height set to 0.</p> @see <a href="QStyleOption.html#setRect(com.trolltech.qt.core.QRect)"><tt>setRect</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final void setRect(com.trolltech.qt.core.QRect rect)" doc="/** <p>Sets the area that should be used for various calculations and painting to <tt>rect</tt>.</p> <p>This can have different meanings for different types of elements. For example, for a <tt>QStyle::CE_PushButton</tt> element it would be the rectangle for the entire button, while for a <tt>QStyle::CE_PushButtonLabel</tt> element it would be just the area for the push button label.</p> <p>The default value is a null rectangle, i.e&#x2e; a rectangle with both the width and the height set to 0.</p> @see <a href="QStyleOption.html#rect()"><tt>rect</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final int type()" doc="/** <p>Returns the option type of the style option.</p> <p>The default value is <a href="QStyleOption.html#OptionType-enum"><tt>SO_Default</tt></a>.</p> @see <a href="QStyleOption.html#setType(int)"><tt>setType</tt></a> @see <a href="QStyleOption.html#OptionType-enum"><tt>OptionType</tt></a> */"/> <method name="public final void setType(int type)" doc="/** <p>Sets the option type of the style option to <tt>type</tt>.</p> <p>The default value is <a href="QStyleOption.html#OptionType-enum"><tt>SO_Default</tt></a>.</p> @see <a href="QStyleOption.html#type()"><tt>type</tt></a> @see <a href="QStyleOption.html#OptionType-enum"><tt>OptionType</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QStyle.State state()" doc="/** <p>Returns the style flags that are used when drawing the control.</p> <p>The default value is QStyle::State_None.</p> @see <a href="QStyleOption.html#setState(com.trolltech.qt.gui.QStyle.State)"><tt>setState</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> @see <tt>QStyle::drawPrimitive</tt> @see <tt>QStyle::drawControl</tt> @see <tt>QStyle::drawComplexControl</tt> @see <tt>QStyle::State</tt> */"/> <method name="public final void setState(com.trolltech.qt.gui.QStyle.State state)" doc="/** <p>Sets the style flags that are used when drawing the control to <tt>state</tt>.</p> <p>The default value is QStyle::State_None.</p> @see <a href="QStyleOption.html#state()"><tt>state</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> @see <tt>QStyle::drawPrimitive</tt> @see <tt>QStyle::drawControl</tt> @see <tt>QStyle::drawComplexControl</tt> @see <tt>QStyle::State</tt> */"/> <method name="public final com.trolltech.qt.gui.QFontMetrics fontMetrics()" doc="/** <p>Returns the font metrics that should be used when drawing text in the control.</p> <p>By default, the application's default font is used.</p> @see <a href="QStyleOption.html#setFontMetrics(com.trolltech.qt.gui.QFontMetrics)"><tt>setFontMetrics</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> <method name="public final void setFontMetrics(com.trolltech.qt.gui.QFontMetrics fontMetrics)" doc="/** <p>Sets the font metrics that should be used when drawing text in the control to <tt>fontMetrics</tt>.</p> <p>By default, the application's default font is used.</p> @see <a href="QStyleOption.html#fontMetrics()"><tt>fontMetrics</tt></a> @see <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a> */"/> </class>