1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qstyleoption.cpp -->
<title>Qt 4.8: QStyleOptionTab Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QStyleOptionTab</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-variables">Public Variables</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QStyleOptionTab Class Reference</h1>
<!-- $$$QStyleOptionTab-brief -->
<p>The QStyleOptionTab class is used to describe the parameters for drawing a tab bar. <a href="#details">More...</a></p>
<!-- @@@QStyleOptionTab -->
<pre class="cpp"> <span class="preprocessor">#include <QStyleOptionTab></span></pre><p><b>Inherits: </b><a href="qstyleoption.html">QStyleOption</a>.</p>
<p><b>Inherited by: </b><a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a>.</p>
<ul>
<li><a href="qstyleoptiontab-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#CornerWidget-enum">CornerWidget</a></b> { NoCornerWidgets, LeftCornerWidget, RightCornerWidget }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#CornerWidget-enum">CornerWidgets</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#SelectedPosition-enum">SelectedPosition</a></b> { NotAdjacent, NextIsSelected, PreviousIsSelected }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#StyleOptionType-enum">StyleOptionType</a></b> { Type }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#TabPosition-enum">TabPosition</a></b> { Beginning, Middle, End, OnlyOneTab }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#QStyleOptionTab">QStyleOptionTab</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#QStyleOptionTab-2">QStyleOptionTab</a></b> ( const QStyleOptionTab & <i>other</i> )</td></tr>
</table>
<ul>
<li class="fn">2 public functions inherited from <a href="qstyleoption.html#public-functions">QStyleOption</a></li>
</ul>
<a name="public-variables"></a>
<h2>Public Variables</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> CornerWidgets </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#cornerWidgets-var">cornerWidgets</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#icon-var">icon</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TabPosition </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#position-var">position</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#row-var">row</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SelectedPosition </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#selectedPosition-var">selectedPosition</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTabBar::Shape </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#shape-var">shape</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstyleoptiontab.html#text-var">text</a></b></td></tr>
</table>
<ul>
<li class="fn">7 public variables inherited from <a href="qstyleoption.html#public-variables">QStyleOption</a></li>
</ul>
<a name="details"></a>
<!-- $$$QStyleOptionTab-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QStyleOptionTab class is used to describe the parameters for drawing a tab bar.</p>
<p>The QStyleOptionTab class is used for drawing several built-in Qt widgets including <a href="qtabbar.html">QTabBar</a> and the panel for <a href="qtabwidget.html">QTabWidget</a>. Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the <a href="qstyleoptionframev2.html">QStyleOptionFrameV2</a> subclass.</p>
<p>An instance of the QStyleOptiontabV2 class has <a href="qstyleoption.html#type-var">type</a> <a href="qstyleoption.html#OptionType-enum">SO_Tab</a> and <a href="qstyleoption.html#version-var">version</a> 1. 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 QStyleOptionTab and <a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a>.</p>
<p>For an example demonstrating how style options can be used, see the <a href="widgets-styles.html">Styles</a> example.</p>
</div>
<p><b>See also </b><a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>
<!-- @@@QStyleOptionTab -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CornerWidget$$$NoCornerWidgets$$$LeftCornerWidget$$$RightCornerWidget -->
<h3 class="flags"><a name="CornerWidget-enum"></a>enum QStyleOptionTab::<span class="name">CornerWidget</span><br/>flags QStyleOptionTab::<span class="name">CornerWidgets</span></h3>
<p>These flags indicate the corner widgets in a tab.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::NoCornerWidgets</tt></td><td class="topAlign"><tt>0x00</tt></td><td class="topAlign">There are no corner widgets</td></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::LeftCornerWidget</tt></td><td class="topAlign"><tt>0x01</tt></td><td class="topAlign">Left corner widget</td></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::RightCornerWidget</tt></td><td class="topAlign"><tt>0x02</tt></td><td class="topAlign">Right corner widget</td></tr>
</table>
<p>The CornerWidgets type is a typedef for <a href="qflags.html">QFlags</a><CornerWidget>. It stores an OR combination of CornerWidget values.</p>
<p><b>See also </b><a href="qstyleoptiontab.html#cornerWidgets-var">cornerWidgets</a>.</p>
<!-- @@@CornerWidget -->
<!-- $$$SelectedPosition$$$NotAdjacent$$$NextIsSelected$$$PreviousIsSelected -->
<h3 class="fn"><a name="SelectedPosition-enum"></a>enum QStyleOptionTab::<span class="name">SelectedPosition</span></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 valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::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>QStyleOptionTab::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>QStyleOptionTab::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="qstyleoptiontab.html#selectedPosition-var">selectedPosition</a>.</p>
<!-- @@@SelectedPosition -->
<!-- $$$StyleOptionType$$$Type -->
<h3 class="fn"><a name="StyleOptionType-enum"></a>enum QStyleOptionTab::<span class="name">StyleOptionType</span></h3>
<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</a> subclass.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::Type</tt></td><td class="topAlign"><tt>SO_Tab</tt></td><td class="topAlign">The type of style option provided (<a href="qstyleoption.html#OptionType-enum">SO_Tab</a> for this class).</td></tr>
</table>
<p>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.</p>
<p><b>See also </b><a href="qstyleoptiontab.html#StyleOptionVersion-enum">StyleOptionVersion</a>.</p>
<!-- @@@StyleOptionType -->
<!-- $$$StyleOptionVersion$$$Version -->
<h3 class="fn"><a name="StyleOptionVersion-enum"></a>enum QStyleOptionTab::<span class="name">StyleOptionVersion</span></h3>
<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</a> subclass.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::Version</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">1</td></tr>
</table>
<p>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><b>See also </b><a href="qstyleoptiontab.html#StyleOptionType-enum">StyleOptionType</a>.</p>
<!-- @@@StyleOptionVersion -->
<!-- $$$TabPosition$$$Beginning$$$Middle$$$End$$$OnlyOneTab -->
<h3 class="fn"><a name="TabPosition-enum"></a>enum QStyleOptionTab::<span class="name">TabPosition</span></h3>
<p>This enum describes the position of the tab.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::Beginning</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The tab is the first tab in the tab bar.</td></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::Middle</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The tab is neither the first nor the last tab in the tab bar.</td></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::End</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The tab is the last tab in the tab bar.</td></tr>
<tr><td class="topAlign"><tt>QStyleOptionTab::OnlyOneTab</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The tab is both the first and the last tab in the tab bar.</td></tr>
</table>
<p><b>See also </b><a href="qstyleoptiontab.html#position-var">position</a>.</p>
<!-- @@@TabPosition -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QStyleOptionTab[overload1]$$$QStyleOptionTab -->
<h3 class="fn"><a name="QStyleOptionTab"></a>QStyleOptionTab::<span class="name">QStyleOptionTab</span> ()</h3>
<p>Constructs a <a href="qstyleoptiontab.html">QStyleOptionTab</a> object, initializing the members variables to their default values.</p>
<!-- @@@QStyleOptionTab -->
<!-- $$$QStyleOptionTab$$$QStyleOptionTabconstQStyleOptionTab& -->
<h3 class="fn"><a name="QStyleOptionTab-2"></a>QStyleOptionTab::<span class="name">QStyleOptionTab</span> ( const <span class="type">QStyleOptionTab</span> & <i>other</i> )</h3>
<p>Constructs a copy of the <i>other</i> style option.</p>
<!-- @@@QStyleOptionTab -->
</div>
<div class="vars">
<h2>Member Variable Documentation</h2>
<!-- $$$cornerWidgets -->
<h3 class="fn"><a name="cornerWidgets-var"></a><span class="type"><a href="qstyleoptiontab.html#CornerWidget-enum">CornerWidgets</a></span> QStyleOptionTab::<span class="name">cornerWidgets</span></h3>
<p>This variable holds an OR combination of CornerWidget values indicating the corner widgets of the tab bar.</p>
<p>The default value is <a href="qstyleoptiontab.html#CornerWidget-enum">NoCornerWidgets</a>.</p>
<p><b>See also </b><a href="qstyleoptiontab.html#CornerWidget-enum">CornerWidget</a>.</p>
<!-- @@@cornerWidgets -->
<!-- $$$icon -->
<h3 class="fn"><a name="icon-var"></a><span class="type"><a href="qicon.html">QIcon</a></span> QStyleOptionTab::<span class="name">icon</span></h3>
<p>This variable holds the icon for the tab.</p>
<p>The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.</p>
<!-- @@@icon -->
<!-- $$$position -->
<h3 class="fn"><a name="position-var"></a><span class="type"><a href="qstyleoptiontab.html#TabPosition-enum">TabPosition</a></span> QStyleOptionTab::<span class="name">position</span></h3>
<p>This variable holds the position of the tab in the tab bar.</p>
<p>The default value is <a href="qstyleoptiontab.html#TabPosition-enum">Beginning</a>, i.e. the tab is the first tab in the tab bar.</p>
<!-- @@@position -->
<!-- $$$row -->
<h3 class="fn"><a name="row-var"></a><span class="type">int</span> QStyleOptionTab::<span class="name">row</span></h3>
<p>This variable holds which row the tab is currently in.</p>
<p>The default value is 0, indicating the front row. Currently this property can only be 0.</p>
<!-- @@@row -->
<!-- $$$selectedPosition -->
<h3 class="fn"><a name="selectedPosition-var"></a><span class="type"><a href="qstyleoptiontab.html#SelectedPosition-enum">SelectedPosition</a></span> QStyleOptionTab::<span class="name">selectedPosition</span></h3>
<p>This variable holds the position of the selected tab in relation to this tab.</p>
<p>The default value is <a href="qstyleoptiontab.html#SelectedPosition-enum">NotAdjacent</a>, i.e. the tab is not adjacent to a selected tab nor is it the selected tab.</p>
<!-- @@@selectedPosition -->
<!-- $$$shape -->
<h3 class="fn"><a name="shape-var"></a><span class="type"><a href="qtabbar.html#Shape-enum">QTabBar::Shape</a></span> QStyleOptionTab::<span class="name">shape</span></h3>
<p>This variable holds the tab shape used to draw the tab; by default QTabBar::RoundedNorth.</p>
<p><b>See also </b><a href="qtabbar.html#Shape-enum">QTabBar::Shape</a>.</p>
<!-- @@@shape -->
<!-- $$$text -->
<h3 class="fn"><a name="text-var"></a><span class="type"><a href="qstring.html">QString</a></span> QStyleOptionTab::<span class="name">text</span></h3>
<p>This variable holds the text of the tab.</p>
<p>The default value is an empty string.</p>
<!-- @@@text -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|