~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qstyleoptiontabv2.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-10-12 23:14:14 UTC
  • mto: (15.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20061012231414-y2oqbom5dy389os0
Tags: upstream-4.2.0
ImportĀ upstreamĀ versionĀ 4.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /tmp/qt-4.1.4-harald-1150713676011/qt-x11-opensource-src-4.1.4/src/gui/styles/qstyleoption.cpp -->
6
 
<!-- /tmp/qt-4.1.4-harald-1150713676011/qt-x11-opensource-src-4.1.4/src/gui/styles/qstyleoption.cpp -->
 
5
<!-- /tmp/qt-4.2.0-qt-1159540607313/qt-x11-opensource-src-4.2.0/src/gui/styles/qstyleoption.cpp -->
7
6
<head>
8
 
    <title>Qt 4.1: QStyleOptionTabV2 Class Reference</title>
9
 
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
10
 
a:link { color: #004faf; text-decoration: none }
11
 
a:visited { color: #672967; text-decoration: none }
12
 
td.postheader { font-family: sans-serif }
13
 
tr.address { font-family: sans-serif }
14
 
body { background: #ffffff; color: black; }</style>
 
7
  <title>Qt 4.2: QStyleOptionTabV2 Class Reference</title>
 
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
15
9
</head>
16
10
<body>
17
11
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
12
<tr>
19
 
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
13
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
20
14
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
21
 
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QStyleOptionTabV2 Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
 
15
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QStyleOptionTabV2 Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
22
16
<p>The QStyleOptionTabV2 class is used to describe the parameters necessary for drawing a tabs in Qt 4.1 or above. <a href="#details">More...</a></p>
23
 
<pre>#include &lt;QStyleOptionTabV2&gt;</pre><p>Inherits <a href="qstyleoptiontab.html">QStyleOptionTab</a>.</p>
 
17
<pre> #include &lt;QStyleOptionTabV2&gt;</pre><p>Inherits <a href="qstyleoptiontab.html">QStyleOptionTab</a>.</p>
24
18
<p>This class was introduced in Qt 4.1.</p>
25
19
<ul>
26
20
<li><a href="qstyleoptiontabv2-members.html">List of all members, including inherited members</a></li>
27
21
</ul>
 
22
<a name="public-types"></a>
 
23
<h3>Public Types</h3>
 
24
<ul>
 
25
<li><div class="fn"/>enum <b><a href="qstyleoptiontabv2.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</li>
 
26
</ul>
28
27
<a name="public-functions"></a>
29
28
<h3>Public Functions</h3>
30
29
<ul>
45
44
<li><div class="fn"/>7 public variables inherited from <a href="qstyleoptiontab.html#public-variables">QStyleOptionTab</a></li>
46
45
<li><div class="fn"/>7 public variables inherited from <a href="qstyleoption.html#public-variables">QStyleOption</a></li>
47
46
</ul>
48
 
<h3>Additional Inherited Members</h3>
49
 
<ul>
50
 
<li><div class="fn"/>2 static public members inherited from <a href="qstyleoptiontab.html#static-public-members">QStyleOptionTab</a></li>
51
 
<li><div class="fn"/>2 static public members inherited from <a href="qstyleoption.html#static-public-members">QStyleOption</a></li>
52
 
</ul>
53
47
<a name="details"></a>
54
48
<hr />
55
49
<h2>Detailed Description</h2>
56
50
<p>The QStyleOptionTabV2 class is used to describe the parameters necessary for drawing a tabs in Qt 4.1 or above.</p>
57
 
<p>An instance of the QStyleOptionTabV2 class has type <a href="qstyleoption.html#OptionType-enum">SO_Tab</a> and <a href="qstyleoption.html#version-varx">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 don't need to check it.</p>
 
51
<p>An instance of the QStyleOptionTabV2 class has type <a href="qstyleoption.html#OptionType-enum">SO_Tab</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 don't need to check it.</p>
58
52
<p>If you create your own <a href="qstyle.html">QStyle</a> subclass, you should handle both <a href="qstyleoptiontab.html">QStyleOptionTab</a> and QStyleOptionTabV2. One way to achieve this is to use the QStyleOptionTabV2 copy constructor. For example:</p>
59
 
<pre>&nbsp;   if (const QStyleOptionTab *tabOption =
60
 
           qstyleoption_cast&lt;const QStyleOptionTab *&gt;(option)) {
61
 
        QStyleOptionTabV2 tabV2(*tabOption);
 
53
<pre>     if (const QStyleOptionTab *tabOption =
 
54
            qstyleoption_cast&lt;const QStyleOptionTab *&gt;(option)) {
 
55
         QStyleOptionTabV2 tabV2(*tabOption);
62
56
 
63
 
        // draw the tab using tabV2
 
57
         <span class="comment">// draw the tab using tabV2</span>
64
58
    }</pre>
65
 
<p>in the example above: If <tt>tabOption</tt>'s version is 1, the extra member (<a href="qstyleoptiontabv2.html#iconSize-var">iconSize</a>) will be set to an invalid size for <tt>tabV2</tt>. If <tt>tabOption</tt>'s version is 2, the constructor will simply copy the <tt>tab</tt>'s <a href="qstyleoptiontabv2.html#iconSize-var">iconSize</a>.</p>
 
59
<p>In the example above: If <tt>tabOption</tt>'s version is 1, the extra member (<a href="qstyleoptiontabv2.html#iconSize-var">iconSize</a>) will be set to an invalid size for <tt>tabV2</tt>. If <tt>tabOption</tt>'s version is 2, the constructor will simply copy the <tt>tab</tt>'s <a href="qstyleoptiontabv2.html#iconSize-var">iconSize</a>.</p>
66
60
<p>For an example demonstrating how style options can be used, see the <a href="widgets-styles.html">Styles</a> example.</p>
67
61
<p>See also <a href="qstyleoptiontab.html">QStyleOptionTab</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>
68
62
<hr />
 
63
<h2>Member Type Documentation</h2>
 
64
<h3 class="fn"><a name="StyleOptionVersion-enum"></a>enum QStyleOptionTabV2::StyleOptionVersion</h3>
 
65
<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>
 
66
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
 
67
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
68
<tr><td valign="top"><tt>QStyleOptionTabV2::Version</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">2</td></tr>
 
69
</table></p>
 
70
<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 don't need to check it.</p>
 
71
<p>See also <a href="qstyleoptiontab.html#StyleOptionType-enum">StyleOptionType</a>.</p>
 
72
<hr />
69
73
<h2>Member Function Documentation</h2>
70
74
<h3 class="fn"><a name="QStyleOptionTabV2"></a>QStyleOptionTabV2::QStyleOptionTabV2 ()</h3>
71
75
<p>Constructs a <a href="qstyleoptiontabv2.html">QStyleOptionTabV2</a>.</p>
80
84
<hr />
81
85
<h2>Member Variable Documentation</h2>
82
86
<h3 class="fn"><a name="iconSize-var"></a><a href="qsize.html">QSize</a> QStyleOptionTabV2::iconSize</h3>
83
 
<p>The size for the icons. If this size is invalid and you need an icon size, you can use <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>() to find the default icon size for tab bars.</p>
84
 
<p>See also <a href="qtabbar.html#iconSize-prop">QTabBar::iconSize</a>() and <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>().</p>
 
87
<p>This variable holds the size for the icons.</p>
 
88
<p>The default value is <a href="qsize.html">QSize</a>(-1, -1), i.e. an invalid size; use <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>() to find the default icon size for tab bars.</p>
 
89
<p>See also <a href="qtabbar.html#iconSize-prop">QTabBar::iconSize</a>().</p>
85
90
<p /><address><hr /><div align="center">
86
91
<table width="100%" cellspacing="0" border="0"><tr class="address">
87
92
<td width="30%">Copyright &copy; 2006 <a href="trolltech.html">Trolltech</a></td>
88
93
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
89
 
<td width="30%" align="right"><div align="right">Qt 4.1.4</div></td>
 
94
<td width="30%" align="right"><div align="right">Qt 4.2.0</div></td>
90
95
</tr></table></div></address></body>
91
96
</html>