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

« back to all changes in this revision

Viewing changes to doc/html/qstylehintreturn.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/styles/qstyleoption.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QStyleHintReturn Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<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="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<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">QStyleHintReturn Class Reference</h1>
 
21
<p>The QStyleHintReturn class provides style hints that return more than basic data types. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QStyleHintReturn&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherited by <a href="qstylehintreturnmask.html">QStyleHintReturnMask</a>.</p>
 
24
<ul>
 
25
<li><a href="qstylehintreturn-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-types"></a>
 
28
<h3>Public Types</h3>
 
29
<ul>
 
30
<li><div class="fn"/>enum <b><a href="qstylehintreturn.html#HintReturnType-enum">HintReturnType</a></b> { SH_Default, SH_Mask }</li>
 
31
</ul>
 
32
<a name="public-functions"></a>
 
33
<h3>Public Functions</h3>
 
34
<ul>
 
35
<li><div class="fn"/><b><a href="qstylehintreturn.html#QStyleHintReturn">QStyleHintReturn</a></b> ( int <i>version</i> = QStyleOption::Version, int <i>type</i> = SH_Default )</li>
 
36
</ul>
 
37
<a name="public-variables"></a>
 
38
<h3>Public Variables</h3>
 
39
<ul>
 
40
<li><div class="fn"/>int <b><a href="qstylehintreturn.html#type-varx">type</a></b></li>
 
41
<li><div class="fn"/>int <b><a href="qstylehintreturn.html#version-varx">version</a></b></li>
 
42
</ul>
 
43
<a name="static-public-members"></a>
 
44
<h3>Static Public Members</h3>
 
45
<ul>
 
46
<li><div class="fn"/>const int <b><a href="qstylehintreturn.html#Type-var">Type</a></b></li>
 
47
<li><div class="fn"/>const int <b><a href="qstylehintreturn.html#Version-var">Version</a></b></li>
 
48
</ul>
 
49
<a name="related-non-members"></a>
 
50
<h3>Related Non-Members</h3>
 
51
<ul>
 
52
<li><div class="fn"/>T <b><a href="qstylehintreturn.html#qstyleoption_cast-2">qstyleoption_cast</a></b> ( const QStyleHintReturn * <i>hint</i> )</li>
 
53
<li><div class="fn"/>T <b><a href="qstylehintreturn.html#qstyleoption_cast-4">qstyleoption_cast</a></b> ( QStyleHintReturn * <i>hint</i> )</li>
 
54
</ul>
 
55
<a name="details"></a>
 
56
<hr />
 
57
<h2>Detailed Description</h2>
 
58
<p>The QStyleHintReturn class provides style hints that return more than basic data types.</p>
 
59
<p>QStyleHintReturn and its subclasses are used to pass information from a style back to the querying widget. This is most useful when the return value from <a href="qstyle.html#styleHint">QStyle::styleHint</a>() does not provide enough detail; for example, when a mask is to be returned.</p>
 
60
<hr />
 
61
<h2>Member Type Documentation</h2>
 
62
<h3 class="fn"><a name="HintReturnType-enum"></a>enum QStyleHintReturn::HintReturnType</h3>
 
63
<table border="1" cellpadding="2" cellspacing="1" width="100%">
 
64
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
65
<tr><td valign="top"><tt>QStyleHintReturn::SH_Default</tt></td><td align="center" valign="top"><tt>0xf000</tt></td><td valign="top"><a href="qstylehintreturn.html">QStyleHintReturn</a></td></tr>
 
66
<tr><td valign="top"><tt>QStyleHintReturn::SH_Mask</tt></td><td align="center" valign="top">&nbsp;</td><td valign="top"><a href="qstyle.html#StyleHint-enum">QStyle::SH_RubberBand_Mask</a> <a href="qstyle.html#StyleHint-enum">QStyle::SH_FocusFrame_Mask</a></td></tr>
 
67
</table>
 
68
<hr />
 
69
<h2>Member Function Documentation</h2>
 
70
<h3 class="fn"><a name="QStyleHintReturn"></a>QStyleHintReturn::QStyleHintReturn ( int <i>version</i> = QStyleOption::Version, int <i>type</i> = SH_Default )</h3>
 
71
<p>Constructs a <a href="qstylehintreturn.html">QStyleHintReturn</a> with version <i>version</i> and type <i>type</i>.</p>
 
72
<p>The version has no special meaning for <a href="qstylehintreturn.html">QStyleHintReturn</a>; it can be used by subclasses to distinguish between different version of the same hint type.</p>
 
73
<p>See also <a href="qstyleoption.html#version-varx">QStyleOption::version</a> and <a href="qstyleoption.html#type-varx">QStyleOption::type</a>.</p>
 
74
<hr />
 
75
<h2>Member Variable Documentation</h2>
 
76
<h3 class="fn"><a name="Type-var"></a>const int QStyleHintReturn::Type</h3>
 
77
<p>Equals <a href="qstylehintreturn.html#HintReturnType-enum">SH_Default</a>.</p>
 
78
<h3 class="fn"><a name="Version-var"></a>const int QStyleHintReturn::Version</h3>
 
79
<p>Equals 1.</p>
 
80
<h3 class="fn"><a name="type-varx"></a>int QStyleHintReturn::type</h3>
 
81
<p>This variable holds the type of the style hint container.</p>
 
82
<p>See also <a href="qstylehintreturn.html#HintReturnType-enum">HintReturnType</a>.</p>
 
83
<h3 class="fn"><a name="version-varx"></a>int QStyleHintReturn::version</h3>
 
84
<p>This variable holds the version of the style hint return container.</p>
 
85
<p>This value can be used by subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast&lt;T&gt;(), you normally don't need to check it.</p>
 
86
<hr />
 
87
<h2>Related Non-Members</h2>
 
88
<h3 class="fn"><a name="qstyleoption_cast-2"></a>T qstyleoption_cast ( const QStyleHintReturn * <i>hint</i> )</h3>
 
89
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
90
<p>Returns a T or 0 depending on the <a href="qstylehintreturn.html#type-varx">type</a> and <a href="qstylehintreturn.html#version-varx">version</a> of <i>hint</i>.</p>
 
91
<p>Example:</p>
 
92
<pre>&nbsp;   int MyStyle::styleHint(StyleHint stylehint, const QStyleOption *opt,
 
93
                           const QWidget *widget, QStyleHintReturn* returnData) const;
 
94
    {
 
95
        if (stylehint == SH_RubberBand_Mask) {
 
96
            const QStyleHintReturnMask *maskReturn =
 
97
                    qstyleoption_cast&lt;const QStyleHintReturnMask *&gt;(hint);
 
98
            if (maskReturn) {
 
99
                ...
 
100
            }
 
101
        }
 
102
        ...
 
103
    }</pre>
 
104
<p>See also <a href="qstylehintreturn.html#type-varx">QStyleHintReturn::type</a> and <a href="qstylehintreturn.html#version-varx">QStyleHintReturn::version</a>.</p>
 
105
<h3 class="fn"><a name="qstyleoption_cast-4"></a>T qstyleoption_cast ( QStyleHintReturn * <i>hint</i> )</h3>
 
106
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
107
<p>Returns a T or 0 depending on the type of <i>hint</i>.</p>
 
108
<p /><address><hr /><div align="center">
 
109
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
110
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
111
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
112
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
113
</tr></table></div></address></body>
 
114
</html>