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
|
<?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: QStyleHintReturn 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>QStyleHintReturn</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="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QStyleHintReturn Class Reference</h1>
<!-- $$$QStyleHintReturn-brief -->
<p>The QStyleHintReturn class provides style hints that return more than basic data types. <a href="#details">More...</a></p>
<!-- @@@QStyleHintReturn -->
<pre class="cpp"> <span class="preprocessor">#include <QStyleHintReturn></span></pre><p><b>Inherited by: </b><a href="qstylehintreturnmask.html">QStyleHintReturnMask</a> and <a href="qstylehintreturnvariant.html">QStyleHintReturnVariant</a>.</p>
<ul>
<li><a href="qstylehintreturn-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="qstylehintreturn.html#HintReturnType-enum">HintReturnType</a></b> { SH_Default, SH_Mask, SH_Variant }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#StyleOptionType-enum">StyleOptionType</a></b> { Type }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#StyleOptionVersion-enum">StyleOptionVersion</a></b> { Version }</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="qstylehintreturn.html#QStyleHintReturn">QStyleHintReturn</a></b> ( int <i>version</i> = QStyleOption::Version, int <i>type</i> = SH_Default )</td></tr>
</table>
<a name="public-variables"></a>
<h2>Public Variables</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#type-var">type</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#version-var">version</a></b></td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#qstyleoption_cast-2">qstyleoption_cast</a></b> ( const QStyleHintReturn * <i>hint</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T </td><td class="memItemRight bottomAlign"><b><a href="qstylehintreturn.html#qstyleoption_cast-4">qstyleoption_cast</a></b> ( QStyleHintReturn * <i>hint</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QStyleHintReturn-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QStyleHintReturn class provides style hints that return more than basic data types.</p>
<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>
</div>
<!-- @@@QStyleHintReturn -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$HintReturnType$$$SH_Default$$$SH_Mask$$$SH_Variant -->
<h3 class="fn"><a name="HintReturnType-enum"></a>enum QStyleHintReturn::<span class="name">HintReturnType</span></h3>
<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>QStyleHintReturn::SH_Default</tt></td><td class="topAlign"><tt>0xf000</tt></td><td class="topAlign"><a href="qstylehintreturn.html">QStyleHintReturn</a></td></tr>
<tr><td class="topAlign"><tt>QStyleHintReturn::SH_Mask</tt></td><td class="topAlign">?</td><td class="topAlign"><a href="qstyle.html#StyleHint-enum">QStyle::SH_RubberBand_Mask</a> <a href="qstyle.html#StyleHint-enum">QStyle::SH_FocusFrame_Mask</a></td></tr>
<tr><td class="topAlign"><tt>QStyleHintReturn::SH_Variant</tt></td><td class="topAlign">?</td><td class="topAlign"><a href="qstyle.html#StyleHint-enum">QStyle::SH_TextControl_FocusIndicatorTextCharFormat</a></td></tr>
</table>
<!-- @@@HintReturnType -->
<!-- $$$StyleOptionType$$$Type -->
<h3 class="fn"><a name="StyleOptionType-enum"></a>enum QStyleHintReturn::<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="qstylehintreturn.html">QStyleHintReturn</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>QStyleHintReturn::Type</tt></td><td class="topAlign"><tt>SH_Default</tt></td><td class="topAlign">The type of style option provided (<a href="qstylehintreturn.html#HintReturnType-enum">SH_Default</a> for this class).</td></tr>
</table>
<p>The type is used internally by <a href="qstylehintreturn.html">QStyleHintReturn</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="qstylehintreturn.html">QStyleHintReturn</a> subclass and your own styles.</p>
<p><b>See also </b><a href="qstylehintreturn.html#StyleOptionVersion-enum">StyleOptionVersion</a>.</p>
<!-- @@@StyleOptionType -->
<!-- $$$StyleOptionVersion$$$Version -->
<h3 class="fn"><a name="StyleOptionVersion-enum"></a>enum QStyleHintReturn::<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="qstylehintreturn.html">QStyleHintReturn</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>QStyleHintReturn::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="qstylehintreturn.html">QStyleHintReturn</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="qstylehintreturn.html#StyleOptionType-enum">StyleOptionType</a>.</p>
<!-- @@@StyleOptionVersion -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QStyleHintReturn[overload1]$$$QStyleHintReturnintint -->
<h3 class="fn"><a name="QStyleHintReturn"></a>QStyleHintReturn::<span class="name">QStyleHintReturn</span> ( <span class="type">int</span> <i>version</i> = QStyleOption::Version, <span class="type">int</span> <i>type</i> = SH_Default )</h3>
<p>Constructs a <a href="qstylehintreturn.html">QStyleHintReturn</a> with version <i>version</i> and type <i>type</i>.</p>
<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>
<p><b>See also </b><a href="qstyleoption.html#version-var">QStyleOption::version</a> and <a href="qstyleoption.html#type-var">QStyleOption::type</a>.</p>
<!-- @@@QStyleHintReturn -->
</div>
<div class="vars">
<h2>Member Variable Documentation</h2>
<!-- $$$type -->
<h3 class="fn"><a name="type-var"></a><span class="type">int</span> QStyleHintReturn::<span class="name">type</span></h3>
<p>This variable holds the type of the style hint container.</p>
<p><b>See also </b><a href="qstylehintreturn.html#HintReturnType-enum">HintReturnType</a>.</p>
<!-- @@@type -->
<!-- $$$version -->
<h3 class="fn"><a name="version-var"></a><span class="type">int</span> QStyleHintReturn::<span class="name">version</span></h3>
<p>This variable holds the version of the style hint return container.</p>
<p>This value can be used by subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast<T>(), you normally do not need to check it.</p>
<!-- @@@version -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$qstyleoption_cast$$$qstyleoption_castconstQStyleHintReturn* -->
<h3 class="fn"><a name="qstyleoption_cast-2"></a><span class="type">T</span> <span class="name">qstyleoption_cast</span> ( const <span class="type">QStyleHintReturn</span> * <i>hint</i> )</h3>
<p>Returns a T or 0 depending on the <a href="qstylehintreturn.html#type-var">type</a> and <a href="qstylehintreturn.html#version-var">version</a> of <i>hint</i>.</p>
<p>Example:</p>
<pre class="cpp"> <span class="type">int</span> MyStyle<span class="operator">::</span>styleHint(StyleHint stylehint<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> <span class="operator">*</span>opt<span class="operator">,</span>
<span class="keyword">const</span> <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget<span class="operator">,</span> <span class="type"><a href="qstylehintreturn.html">QStyleHintReturn</a></span><span class="operator">*</span> returnData) <span class="keyword">const</span>;
{
<span class="keyword">if</span> (stylehint <span class="operator">=</span><span class="operator">=</span> SH_RubberBand_Mask) {
<span class="keyword">const</span> <span class="type"><a href="qstylehintreturnmask.html">QStyleHintReturnMask</a></span> <span class="operator">*</span>maskReturn <span class="operator">=</span>
qstyleoption_cast<span class="operator"><</span><span class="keyword">const</span> <span class="type"><a href="qstylehintreturnmask.html">QStyleHintReturnMask</a></span> <span class="operator">*</span><span class="operator">></span>(hint);
<span class="keyword">if</span> (maskReturn) {
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
}
}
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
}</pre>
<p><b>See also </b><a href="qstylehintreturn.html#type-var">QStyleHintReturn::type</a> and <a href="qstylehintreturn.html#version-var">QStyleHintReturn::version</a>.</p>
<!-- @@@qstyleoption_cast -->
<!-- $$$qstyleoption_cast$$$qstyleoption_castQStyleHintReturn* -->
<h3 class="fn"><a name="qstyleoption_cast-4"></a><span class="type">T</span> <span class="name">qstyleoption_cast</span> ( <span class="type">QStyleHintReturn</span> * <i>hint</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns a T or 0 depending on the type of <i>hint</i>.</p>
<!-- @@@qstyleoption_cast -->
</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>
|