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
|
<?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" />
<!-- qicon.cpp -->
<title>Qt 4.8: Qt 3 Support Members for QIcon</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>QIcon</li>
</ul>
</div>
</div>
<div class="content mainContent">
<h1 class="title">Qt 3 Support Members for QIcon</h1>
<p><b>The following class members are part of the <a href="qt3support.html">Qt 3 support layer</a>.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
<p><ul><li><a href="qicon.html">QIcon class reference</a></li></ul></p>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#Size-enum">Size</a></b> { Small, Large, Automatic }</td></tr>
</table>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#pixmap-2">pixmap</a></b> ( Size <i>size</i>, Mode <i>mode</i>, State <i>state</i> = Off ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#pixmap-3">pixmap</a></b> ( Size <i>size</i>, bool <i>enabled</i>, State <i>state</i> = Off ) const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#pixmap-4">pixmap</a></b> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#reset">reset</a></b> ( const QPixmap & <i>pixmap</i>, Size <i>size</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#setPixmap">setPixmap</a></b> ( const QPixmap & <i>pixmap</i>, Size <i>size</i>, Mode <i>mode</i> = Normal, State <i>state</i> = Off )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#setPixmap-2">setPixmap</a></b> ( const QString & <i>fileName</i>, Size <i>size</i>, Mode <i>mode</i> = Normal, State <i>state</i> = Off )</td></tr>
</table>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#pixmapSize">pixmapSize</a></b> ( Size <i>which</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qicon-qt3.html#setPixmapSize">setPixmapSize</a></b> ( Size <i>which</i>, const QSize & <i>size</i> )</td></tr>
</table>
<h2>Member Type Documentation</h2>
<!-- $$$Size$$$Small$$$Large$$$Automatic -->
<h3 class="fn"><a name="Size-enum"></a>enum QIcon::<span class="name">Size</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>QIcon::Small</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Use QStyle::pixelMetric(<a href="qstyle.html#PixelMetric-enum">QStyle::PM_SmallIconSize</a>) instead.</td></tr>
<tr><td class="topAlign"><tt>QIcon::Large</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Use QStyle::pixelMetric(<a href="qstyle.html#PixelMetric-enum">QStyle::PM_LargeIconSize</a>) instead.</td></tr>
<tr><td class="topAlign"><tt>QIcon::Automatic</tt></td><td class="topAlign"><tt>Small</tt></td><td class="topAlign">N/A.</td></tr>
</table>
<!-- @@@Size -->
<h2>Member Function Documentation</h2>
<!-- $$$pixmap$$$pixmapSizeModeState -->
<h3 class="fn"><a name="pixmap-2"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QIcon::<span class="name">pixmap</span> ( <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>size</i>, <span class="type"><a href="qicon.html#Mode-enum">Mode</a></span> <i>mode</i>, <span class="type"><a href="qicon.html#State-enum">State</a></span> <i>state</i> = Off ) const</h3>
<p>Use pixmap(<a href="qsize.html">QSize</a>(...), <i>mode</i>, <i>state</i>), where the first argument is an appropriate <a href="qsize.html">QSize</a> instead of a <a href="qicon-qt3.html#Size-enum">Size</a> value.</p>
<p><b>See also </b><a href="qicon-qt3.html#pixmapSize">pixmapSize</a>().</p>
<!-- @@@pixmap -->
<!-- $$$pixmap$$$pixmapSizeboolState -->
<h3 class="fn"><a name="pixmap-3"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QIcon::<span class="name">pixmap</span> ( <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>size</i>, <span class="type">bool</span> <i>enabled</i>, <span class="type"><a href="qicon.html#State-enum">State</a></span> <i>state</i> = Off ) const</h3>
<p>Use pixmap(<a href="qsize.html">QSize</a>(...), mode, <i>state</i>), where the first argument is an appropriate <a href="qsize.html">QSize</a> instead of a <a href="qicon-qt3.html#Size-enum">Size</a> value, and the second argument is <a href="qicon.html#Mode-enum">QIcon::Normal</a> or <a href="qicon.html#Mode-enum">QIcon::Disabled</a>, depending on the value of <i>enabled</i>.</p>
<p><b>See also </b><a href="qicon-qt3.html#pixmapSize">pixmapSize</a>().</p>
<!-- @@@pixmap -->
<!-- $$$pixmap$$$pixmap -->
<h3 class="fn"><a name="pixmap-4"></a><span class="type"><a href="qpixmap.html">QPixmap</a></span> QIcon::<span class="name">pixmap</span> () const</h3>
<p>Use one of the other <a href="qicon.html#pixmap">pixmap</a>() overloads.</p>
<!-- @@@pixmap -->
<!-- $$$pixmapSize[overload1]$$$pixmapSizeSize -->
<h3 class="fn"><a name="pixmapSize"></a><span class="type"><a href="qsize.html">QSize</a></span> QIcon::<span class="name">pixmapSize</span> ( <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>which</i> )<tt> [static]</tt></h3>
<p>Use <a href="qstyle.html#pixelMetric">QStyle::pixelMetric</a>() with <a href="qstyle.html#PixelMetric-enum">QStyle::PM_SmallIconSize</a> or <a href="qstyle.html#PixelMetric-enum">QStyle::PM_LargeIconSize</a> as the first argument, depending on <i>which</i>.</p>
<p><b>See also </b><a href="qicon-qt3.html#setPixmapSize">setPixmapSize</a>().</p>
<!-- @@@pixmapSize -->
<!-- $$$reset[overload1]$$$resetconstQPixmap&Size -->
<h3 class="fn"><a name="reset"></a><span class="type">void</span> QIcon::<span class="name">reset</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> & <i>pixmap</i>, <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>size</i> )</h3>
<p>Use the constructor that takes a <a href="qpixmap.html">QPixmap</a> and operator=().</p>
<!-- @@@reset -->
<!-- $$$setPixmap[overload1]$$$setPixmapconstQPixmap&SizeModeState -->
<h3 class="fn"><a name="setPixmap"></a><span class="type">void</span> QIcon::<span class="name">setPixmap</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> & <i>pixmap</i>, <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>size</i>, <span class="type"><a href="qicon.html#Mode-enum">Mode</a></span> <i>mode</i> = Normal, <span class="type"><a href="qicon.html#State-enum">State</a></span> <i>state</i> = Off )</h3>
<p>Use addPixmap(<i>pixmap</i>, <i>mode</i>, <i>state</i>) instead. The <i>size</i> parameter is ignored.</p>
<p><b>See also </b><a href="qicon.html#pixmap">pixmap</a>().</p>
<!-- @@@setPixmap -->
<!-- $$$setPixmap$$$setPixmapconstQString&SizeModeState -->
<h3 class="fn"><a name="setPixmap-2"></a><span class="type">void</span> QIcon::<span class="name">setPixmap</span> ( const <span class="type"><a href="qstring.html">QString</a></span> & <i>fileName</i>, <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>size</i>, <span class="type"><a href="qicon.html#Mode-enum">Mode</a></span> <i>mode</i> = Normal, <span class="type"><a href="qicon.html#State-enum">State</a></span> <i>state</i> = Off )</h3>
<p>Use addFile(<i>fileName</i>, <i>mode</i>, <i>state</i>) instead. The <i>size</i> parameter is ignored.</p>
<!-- @@@setPixmap -->
<!-- $$$setPixmapSize[overload1]$$$setPixmapSizeSizeconstQSize& -->
<h3 class="fn"><a name="setPixmapSize"></a><span class="type">void</span> QIcon::<span class="name">setPixmapSize</span> ( <span class="type"><a href="qicon-qt3.html#Size-enum">Size</a></span> <i>which</i>, const <span class="type"><a href="qsize.html">QSize</a></span> & <i>size</i> )<tt> [static]</tt></h3>
<p>The <a href="qicon.html#pixmap">pixmap</a>() function now takes a <a href="qsize.html">QSize</a> instead of a <a href="qicon-qt3.html#Size-enum">QIcon::Size</a>, so there is no need for this function in new code.</p>
<p><b>See also </b><a href="qicon-qt3.html#pixmapSize">pixmapSize</a>().</p>
<!-- @@@setPixmapSize -->
<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>
|