<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QStyleOptionToolBoxV2 Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QStyleOptionToolBoxV2 Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above. <a href="#details">More...</a></p> <p>Inherits <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">SelectedPosition</a></b> { NotAdjacent, NextIsSelected, PreviousIsSelected }</li><li><div class="fn" />enum <b><a href="qstyleoptiontoolboxv2.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</li><li><div class="fn" />enum <b><a href="qstyleoptiontoolboxv2.html#TabPosition-enum">TabPosition</a></b> { Beginning, Middle, End, OnlyOneTab }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2-2">__init__</a></b> (<i>self</i>, QStyleOptionToolBoxV2 <i>other</i>)</li><li><div class="fn" /><b><a href="qstyleoptiontoolboxv2.html#QStyleOptionToolBoxV2-3">__init__</a></b> (<i>self</i>, QStyleOptionToolBox <i>other</i>)</li></ul><h3>Members</h3><ul><li><div class="fn" />TabPosition <b><a href="qstyleoptiontoolboxv2.html#position-var">position</a></b></li><li><div class="fn" />SelectedPosition <b><a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a></b></li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above.</p> <p>QStyleOptionToolBoxV2 inherits <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> which is used for drawing the tabs in a <a href="qtoolbox.html">QToolBox</a>.</p> <p>An instance of the QStyleOptionToolBoxV2 class has <a href="qstyleoption.html#type-varx">type</a> <a href="qstyleoption.html#OptionType-enum">SO_ToolBox</a> and <a href="qstyleoption.html#version-var">version</a> 2. The type is used internally by <a href="qstyleoption.html">QStyleOption</a>, its subclasses, and <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() 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</a> subclass and your own styles. The version is used by <a href="qstyleoption.html">QStyleOption</a> subclasses to implement extensions without breaking compatibility. If you use <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>(), you normally do not need to check it.</p> <p>If you create your own <a href="qstyle.html">QStyle</a> subclass, you should handle both <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> and QStyleOptionToolBoxV2.</p> <hr /><h2>Type Documentation</h2><h3 class="fn"><a name="SelectedPosition-enum" />QStyleOptionToolBoxV2.SelectedPosition</h3><p>This enum describes the position of the selected tab. Some styles need to draw a tab differently depending on whether or not it is adjacent to the selected tab.</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"> <tt>QStyleOptionToolBoxV2.NotAdjacent</tt></td> <td class="topAlign"><tt>0</tt></td> <td class="topAlign">The tab is not adjacent to a selected tab (or is the selected tab).</td> </tr> <tr> <td class="topAlign"> <tt>QStyleOptionToolBoxV2.NextIsSelected</tt></td> <td class="topAlign"><tt>1</tt></td> <td class="topAlign">The next tab (typically the tab on the right) is selected.</td> </tr> <tr> <td class="topAlign"> <tt>QStyleOptionToolBoxV2.PreviousIsSelected</tt></td> <td class="topAlign"><tt>2</tt></td> <td class="topAlign">The previous tab (typically the tab on the left) is selected.</td> </tr> </table> <p><b>See also</b> <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a>.</p> <h3 class="fn"><a name="StyleOptionVersion-enum" />QStyleOptionToolBoxV2.StyleOptionVersion</h3><p>This enum holds the version of this style option</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"><tt>QStyleOptionToolBoxV2.Version</tt></td> <td class="topAlign"><tt>2</tt></td> <td class="topAlign">2</td> </tr> </table> <h3 class="fn"><a name="TabPosition-enum" />QStyleOptionToolBoxV2.TabPosition</h3><p>This enum describes tab positions relative to other tabs.</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"><tt>QStyleOptionToolBoxV2.Beginning</tt></td> <td class="topAlign"><tt>0</tt></td> <td class="topAlign">The tab is the first (i.e., top-most) tab in the toolbox.</td> </tr> <tr> <td class="topAlign"><tt>QStyleOptionToolBoxV2.Middle</tt></td> <td class="topAlign"><tt>1</tt></td> <td class="topAlign">The tab is placed in the middle of the toolbox.</td> </tr> <tr> <td class="topAlign"><tt>QStyleOptionToolBoxV2.End</tt></td> <td class="topAlign"><tt>2</tt></td> <td class="topAlign">The tab is placed at the bottom of the toolbox.</td> </tr> <tr> <td class="topAlign"> <tt>QStyleOptionToolBoxV2.OnlyOneTab</tt></td> <td class="topAlign"><tt>3</tt></td> <td class="topAlign">There is only one tab in the toolbox.</td> </tr> </table> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStyleOptionToolBoxV2" />QStyleOptionToolBoxV2.__init__ (<i>self</i>)</h3><p>Contsructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> object.</p> <h3 class="fn"><a name="QStyleOptionToolBoxV2-2" />QStyleOptionToolBoxV2.__init__ (<i>self</i>, <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> <i>other</i>)</h3><p>Constructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> copy of the <i>other</i> style option.</p> <h3 class="fn"><a name="QStyleOptionToolBoxV2-3" />QStyleOptionToolBoxV2.__init__ (<i>self</i>, <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> <i>other</i>)</h3><p>Constructs a <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> copy of the <i>other</i> style option which can be either of the <a href="qstyleoptiontoolboxv2.html">QStyleOptionToolBoxV2</a> or <a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a> types.</p> <p>If the <i>other</i> style option's version is 1, the new style option's <a href="qstyleoptiontab.html#position-var">position</a> value is set to <a href="qstyleoptiontoolboxv2.html#TabPosition-enum">QStyleOptionToolBoxV2.Beginning</a> and <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a> is set to <a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">QStyleOptionToolBoxV2.NotAdjacent</a>. If its version is 2, the <a href="qstyleoptiontab.html#position-var">position</a> <a href="qstyleoptiontoolboxv2.html#selectedPosition-var">selectedPosition</a> values are simply copied to the new style option.</p> <p><b>See also</b> <a href="qstyleoption.html#version-var">version</a>.</p> <hr /><h2>Member Documentation</h2><h3 class="fn"><a name="position-var" /><a href="qstyleoptiontoolboxv2.html#TabPosition-enum">TabPosition</a> position</h3><h3 class="fn"><a name="selectedPosition-var" /><a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">SelectedPosition</a> selectedPosition</h3><p>This variable holds the position of the selected tab in relation to this tab.</p> <p>The default value is <a href="qstyleoptiontoolboxv2.html#SelectedPosition-enum">NotAdjacent</a>, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>