<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 17:04:24 CEST 2007 --> <TITLE> QStyleOption </TITLE> <META NAME="keywords" CONTENT="com.trolltech.qt.gui.QStyleOption class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="QStyleOption"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QStyleHintReturnVariant.StyleOptionVersion.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QStyleOption.OptionType.html" title="enum in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QStyleOption.html" target="_top"><B>FRAMES</B></A> <A HREF="QStyleOption.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.trolltech.qt.gui</FONT> <BR> Class QStyleOption</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.gui.QStyleOption</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/trolltech/qt/gui/QStyleOptionButton.html" title="class in com.trolltech.qt.gui">QStyleOptionButton</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionComplex.html" title="class in com.trolltech.qt.gui">QStyleOptionComplex</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionDockWidget.html" title="class in com.trolltech.qt.gui">QStyleOptionDockWidget</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionFocusRect.html" title="class in com.trolltech.qt.gui">QStyleOptionFocusRect</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionFrame.html" title="class in com.trolltech.qt.gui">QStyleOptionFrame</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionGraphicsItem.html" title="class in com.trolltech.qt.gui">QStyleOptionGraphicsItem</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionHeader.html" title="class in com.trolltech.qt.gui">QStyleOptionHeader</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionMenuItem.html" title="class in com.trolltech.qt.gui">QStyleOptionMenuItem</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionProgressBar.html" title="class in com.trolltech.qt.gui">QStyleOptionProgressBar</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionRubberBand.html" title="class in com.trolltech.qt.gui">QStyleOptionRubberBand</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionTab.html" title="class in com.trolltech.qt.gui">QStyleOptionTab</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionTabBarBase.html" title="class in com.trolltech.qt.gui">QStyleOptionTabBarBase</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionTabWidgetFrame.html" title="class in com.trolltech.qt.gui">QStyleOptionTabWidgetFrame</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionToolBar.html" title="class in com.trolltech.qt.gui">QStyleOptionToolBar</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionToolBox.html" title="class in com.trolltech.qt.gui">QStyleOptionToolBox</A>, <A HREF="../../../../com/trolltech/qt/gui/QStyleOptionViewItem.html" title="class in com.trolltech.qt.gui">QStyleOptionViewItem</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>QStyleOption</B><DT>extends <A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></DL> </PRE> <P> <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., using the <tt>.</tt> or <tt>-></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()->drawControl(QStyle::CE_PushButton, &option, &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<const QStyleOptionFocusRect *>(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> <P> <P> <DL> <DT><B>See Also:</B><DD><a href="QStyle.html"><tt>QStyle</tt></a>, <a href="QStylePainter.html"><tt>QStylePainter</tt></a></DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <A NAME="nested_class_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Nested Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.OptionType.html" title="enum in com.trolltech.qt.gui">QStyleOption.OptionType</A></B></CODE> <BR> 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.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.StyleOptionType.html" title="enum in com.trolltech.qt.gui">QStyleOption.StyleOptionType</A></B></CODE> <BR> 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.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.StyleOptionVersion.html" title="enum in com.trolltech.qt.gui">QStyleOption.StyleOptionVersion</A></B></CODE> <BR> 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.</TD> </TR> </TABLE> <A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A><<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#QStyleOption()">QStyleOption</A></B>()</CODE> <BR> Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(QStyleOption::Version, SO_Default).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#QStyleOption(int)">QStyleOption</A></B>(int version)</CODE> <BR> Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(<tt>version</tt>, SO_Default).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#QStyleOption(int, int)">QStyleOption</A></B>(int version, int type)</CODE> <BR> Constructs a <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> with the specified <tt>version</tt> and <tt>type</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#QStyleOption(com.trolltech.qt.gui.QStyleOption)">QStyleOption</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A> other)</CODE> <BR> Constructs a copy of <tt>other</tt>.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/Qt.LayoutDirection.html" title="enum in com.trolltech.qt.core">Qt.LayoutDirection</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#direction()">direction</A></B>()</CODE> <BR> Returns the text layout direction that should be used when drawing text in the control.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QFontMetrics.html" title="class in com.trolltech.qt.gui">QFontMetrics</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#fontMetrics()">fontMetrics</A></B>()</CODE> <BR> Returns the font metrics that should be used when drawing text in the control.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</CODE> <BR> This function returns the QStyleOption instance pointed to by nativePointer</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)">initFrom</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QWidget.html" title="class in com.trolltech.qt.gui">QWidget</A> w)</CODE> <BR> 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>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#nativePointerArray(com.trolltech.qt.gui.QStyleOption[])">nativePointerArray</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A>[] array)</CODE> <BR> This function returns a QNativePointer that is pointing to the specified QStyleOption array.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QPalette.html" title="class in com.trolltech.qt.gui">QPalette</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#palette()">palette</A></B>()</CODE> <BR> Returns the palette that should be used when painting the control.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#rect()">rect</A></B>()</CODE> <BR> Returns the area that should be used for various calculations and painting.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setDirection(com.trolltech.qt.core.Qt.LayoutDirection)">setDirection</A></B>(<A HREF="../../../../com/trolltech/qt/core/Qt.LayoutDirection.html" title="enum in com.trolltech.qt.core">Qt.LayoutDirection</A> direction)</CODE> <BR> Sets the text layout direction that should be used when drawing text in the control to <tt>direction</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setFontMetrics(com.trolltech.qt.gui.QFontMetrics)">setFontMetrics</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QFontMetrics.html" title="class in com.trolltech.qt.gui">QFontMetrics</A> fontMetrics)</CODE> <BR> Sets the font metrics that should be used when drawing text in the control to <tt>fontMetrics</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setPalette(com.trolltech.qt.gui.QPalette)">setPalette</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QPalette.html" title="class in com.trolltech.qt.gui">QPalette</A> palette)</CODE> <BR> Sets the palette that should be used when painting the control to <tt>palette</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setRect(com.trolltech.qt.core.QRect)">setRect</A></B>(<A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> rect)</CODE> <BR> Sets the area that should be used for various calculations and painting to <tt>rect</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setState(com.trolltech.qt.gui.QStyle.State)">setState</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QStyle.State.html" title="class in com.trolltech.qt.gui">QStyle.State</A> state)</CODE> <BR> Sets the style flags that are used when drawing the control to <tt>state</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setState(com.trolltech.qt.gui.QStyle.StateFlag...)">setState</A></B>(<A HREF="../../../../com/trolltech/qt/gui/QStyle.StateFlag.html" title="enum in com.trolltech.qt.gui">QStyle.StateFlag</A>... state)</CODE> <BR> Sets the style flags that are used when drawing the control to <tt>state</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setType(int)">setType</A></B>(int type)</CODE> <BR> Sets the option type of the style option to <tt>type</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#setVersion(int)">setVersion</A></B>(int version)</CODE> <BR> Sets the version of the style option to <tt>version</tt>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../com/trolltech/qt/gui/QStyle.State.html" title="class in com.trolltech.qt.gui">QStyle.State</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#state()">state</A></B>()</CODE> <BR> Returns the style flags that are used when drawing the control.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#type()">type</A></B>()</CODE> <BR> Returns the option type of the style option.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html#version()">version</A></B>()</CODE> <BR> Returns the version of the style option.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#thread()">thread</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="QStyleOption(com.trolltech.qt.gui.QStyleOption)"><!-- --></A><H3> QStyleOption</H3> <PRE> public <B>QStyleOption</B>(<A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A> other)</PRE> <DL> <DD><p>Constructs a copy of <tt>other</tt>.</p> <P> </DL> <HR> <A NAME="QStyleOption(int)"><!-- --></A><H3> QStyleOption</H3> <PRE> public <B>QStyleOption</B>(int version)</PRE> <DL> <DD><p>Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(<tt>version</tt>, SO_Default). <P> </DL> <HR> <A NAME="QStyleOption()"><!-- --></A><H3> QStyleOption</H3> <PRE> public <B>QStyleOption</B>()</PRE> <DL> <DD><p>Equivalent to <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>(QStyleOption::Version, SO_Default). <P> </DL> <HR> <A NAME="QStyleOption(int, int)"><!-- --></A><H3> QStyleOption</H3> <PRE> public <B>QStyleOption</B>(int version, int type)</PRE> <DL> <DD><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> <P> <DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#version()">version</tt></a>, <a href="QStyleOption.html#type()">type</tt></a></DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="initFrom(com.trolltech.qt.gui.QWidget)"><!-- --></A><H3> initFrom</H3> <PRE> public final void <B>initFrom</B>(<A HREF="../../../../com/trolltech/qt/gui/QWidget.html" title="class in com.trolltech.qt.gui">QWidget</A> w)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><tt>QWidget::layoutDirection</tt>, <tt>QWidget::rect</tt>, <tt>QWidget::palette</tt>, <tt>QWidget::fontMetrics</tt></DL> </DD> </DL> <HR> <A NAME="setPalette(com.trolltech.qt.gui.QPalette)"><!-- --></A><H3> setPalette</H3> <PRE> public final void <B>setPalette</B>(<A HREF="../../../../com/trolltech/qt/gui/QPalette.html" title="class in com.trolltech.qt.gui">QPalette</A> palette)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#palette()"><tt>palette</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="palette()"><!-- --></A><H3> palette</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QPalette.html" title="class in com.trolltech.qt.gui">QPalette</A> <B>palette</B>()</PRE> <DL> <DD><p>Returns the palette that should be used when painting the control.</p> <p>By default, the application's default palette is used.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setPalette(com.trolltech.qt.gui.QPalette)"><tt>setPalette</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="setVersion(int)"><!-- --></A><H3> setVersion</H3> <PRE> public final void <B>setVersion</B>(int version)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#version()"><tt>version</tt></a></DL> </DD> </DL> <HR> <A NAME="version()"><!-- --></A><H3> version</H3> <PRE> public final int <B>version</B>()</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setVersion(int)"><tt>setVersion</tt></a></DL> </DD> </DL> <HR> <A NAME="setDirection(com.trolltech.qt.core.Qt.LayoutDirection)"><!-- --></A><H3> setDirection</H3> <PRE> public final void <B>setDirection</B>(<A HREF="../../../../com/trolltech/qt/core/Qt.LayoutDirection.html" title="enum in com.trolltech.qt.core">Qt.LayoutDirection</A> direction)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#direction()"><tt>direction</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="direction()"><!-- --></A><H3> direction</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/core/Qt.LayoutDirection.html" title="enum in com.trolltech.qt.core">Qt.LayoutDirection</A> <B>direction</B>()</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setDirection(com.trolltech.qt.core.Qt.LayoutDirection)"><tt>setDirection</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="setRect(com.trolltech.qt.core.QRect)"><!-- --></A><H3> setRect</H3> <PRE> public final void <B>setRect</B>(<A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> rect)</PRE> <DL> <DD><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. a rectangle with both the width and the height set to 0.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#rect()"><tt>rect</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="rect()"><!-- --></A><H3> rect</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/core/QRect.html" title="class in com.trolltech.qt.core">QRect</A> <B>rect</B>()</PRE> <DL> <DD><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. a rectangle with both the width and the height set to 0.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setRect(com.trolltech.qt.core.QRect)"><tt>setRect</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="setType(int)"><!-- --></A><H3> setType</H3> <PRE> public final void <B>setType</B>(int type)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#type()"><tt>type</tt></a>, <a href="QStyleOption.html#OptionType-enum"><tt>OptionType</tt></a></DL> </DD> </DL> <HR> <A NAME="type()"><!-- --></A><H3> type</H3> <PRE> public final int <B>type</B>()</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setType(int)"><tt>setType</tt></a>, <a href="QStyleOption.html#OptionType-enum"><tt>OptionType</tt></a></DL> </DD> </DL> <HR> <A NAME="setState(com.trolltech.qt.gui.QStyle.StateFlag...)"><!-- --></A><H3> setState</H3> <PRE> public final void <B>setState</B>(<A HREF="../../../../com/trolltech/qt/gui/QStyle.StateFlag.html" title="enum in com.trolltech.qt.gui">QStyle.StateFlag</A>... state)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#state()"><tt>state</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a>, <tt>QStyle::drawPrimitive</tt>, <tt>QStyle::drawControl</tt>, <tt>QStyle::drawComplexControl</tt>, <tt>QStyle::State</tt></DL> </DD> </DL> <HR> <A NAME="setState(com.trolltech.qt.gui.QStyle.State)"><!-- --></A><H3> setState</H3> <PRE> public final void <B>setState</B>(<A HREF="../../../../com/trolltech/qt/gui/QStyle.State.html" title="class in com.trolltech.qt.gui">QStyle.State</A> state)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#state()"><tt>state</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a>, <tt>QStyle::drawPrimitive</tt>, <tt>QStyle::drawControl</tt>, <tt>QStyle::drawComplexControl</tt>, <tt>QStyle::State</tt></DL> </DD> </DL> <HR> <A NAME="state()"><!-- --></A><H3> state</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QStyle.State.html" title="class in com.trolltech.qt.gui">QStyle.State</A> <B>state</B>()</PRE> <DL> <DD><p>Returns the style flags that are used when drawing the control.</p> <p>The default value is QStyle::State_None.</p> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setState(com.trolltech.qt.gui.QStyle.State)"><tt>setState</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a>, <tt>QStyle::drawPrimitive</tt>, <tt>QStyle::drawControl</tt>, <tt>QStyle::drawComplexControl</tt>, <tt>QStyle::State</tt></DL> </DD> </DL> <HR> <A NAME="setFontMetrics(com.trolltech.qt.gui.QFontMetrics)"><!-- --></A><H3> setFontMetrics</H3> <PRE> public final void <B>setFontMetrics</B>(<A HREF="../../../../com/trolltech/qt/gui/QFontMetrics.html" title="class in com.trolltech.qt.gui">QFontMetrics</A> fontMetrics)</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#fontMetrics()"><tt>fontMetrics</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="fontMetrics()"><!-- --></A><H3> fontMetrics</H3> <PRE> public final <A HREF="../../../../com/trolltech/qt/gui/QFontMetrics.html" title="class in com.trolltech.qt.gui">QFontMetrics</A> <B>fontMetrics</B>()</PRE> <DL> <DD><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> <P> <DD><DL> <DT><B>See Also:</B><DD><a href="QStyleOption.html#setFontMetrics(com.trolltech.qt.gui.QFontMetrics)"><tt>setFontMetrics</tt></a>, <a href="QStyleOption.html#initFrom(com.trolltech.qt.gui.QWidget)"><tt>initFrom</tt></a></DL> </DD> </DL> <HR> <A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3> fromNativePointer</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> nativePointer)</PRE> <DL> <DD>This function returns the QStyleOption instance pointed to by nativePointer <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL> </DD> </DL> <HR> <A NAME="nativePointerArray(com.trolltech.qt.gui.QStyleOption[])"><!-- --></A><H3> nativePointerArray</H3> <PRE> public static <A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A> <B>nativePointerArray</B>(<A HREF="../../../../com/trolltech/qt/gui/QStyleOption.html" title="class in com.trolltech.qt.gui">QStyleOption</A>[] array)</PRE> <DL> <DD>This function returns a QNativePointer that is pointing to the specified QStyleOption array. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>array</CODE> - the array that the returned pointer will point to. <DT><B>Returns:</B><DD>a QNativePointer that is pointing to the specified array.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../com/trolltech/qt/gui/QStyleHintReturnVariant.StyleOptionVersion.html" title="enum in com.trolltech.qt.gui"><B>PREV CLASS</B></A> <A HREF="../../../../com/trolltech/qt/gui/QStyleOption.OptionType.html" title="enum in com.trolltech.qt.gui"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?com/trolltech/qt/gui/QStyleOption.html" target="_top"><B>FRAMES</B></A> <A HREF="QStyleOption.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>