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

« back to all changes in this revision

Viewing changes to doc/html/qiconengine.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/image/qiconengine.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QIconEngine 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">QIconEngine Class Reference</h1>
 
21
<p>The QIconEngine class provides an abstract base class for <a href="qicon.html">QIcon</a> renderers. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QIconEngine&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<ul>
 
24
<li><a href="qiconengine-members.html">List of all members, including inherited members</a></li>
 
25
</ul>
 
26
<a name="public-functions"></a>
 
27
<h3>Public Functions</h3>
 
28
<ul>
 
29
<li><div class="fn"/>virtual <b><a href="qiconengine.html#dtor.QIconEngine">~QIconEngine</a></b> ()</li>
 
30
<li><div class="fn"/>virtual QSize <b><a href="qiconengine.html#actualSize">actualSize</a></b> ( const QSize &amp; <i>size</i>, QIcon::Mode <i>mode</i>, QIcon::State <i>state</i> )</li>
 
31
<li><div class="fn"/>virtual void <b><a href="qiconengine.html#addFile">addFile</a></b> ( const QString &amp; <i>fileName</i>, const QSize &amp; <i>size</i>, QIcon::Mode <i>mode</i>, QIcon::State <i>state</i> )</li>
 
32
<li><div class="fn"/>virtual void <b><a href="qiconengine.html#addPixmap">addPixmap</a></b> ( const QPixmap &amp; <i>pixmap</i>, QIcon::Mode <i>mode</i>, QIcon::State <i>state</i> )</li>
 
33
<li><div class="fn"/>virtual void <b><a href="qiconengine.html#paint">paint</a></b> ( QPainter * <i>painter</i>, const QRect &amp; <i>rect</i>, QIcon::Mode <i>mode</i>, QIcon::State <i>state</i> ) = 0</li>
 
34
<li><div class="fn"/>virtual QPixmap <b><a href="qiconengine.html#pixmap">pixmap</a></b> ( const QSize &amp; <i>size</i>, QIcon::Mode <i>mode</i>, QIcon::State <i>state</i> )</li>
 
35
</ul>
 
36
<a name="details"></a>
 
37
<hr />
 
38
<h2>Detailed Description</h2>
 
39
<p>The QIconEngine class provides an abstract base class for <a href="qicon.html">QIcon</a> renderers.</p>
 
40
<p>An icon engine provides the rendering functions for a <a href="qicon.html">QIcon</a>. Each icon has a corresponding icon engine that is responsible for drawing the icon with a requested size, mode and state.</p>
 
41
<p>The icon is rendered by the <a href="qiconengine.html#paint">paint</a>() function, and the icon can additionally be obtained as a pixmap with the <a href="qiconengine.html#pixmap">pixmap</a>() function (the default implementation simply uses <a href="qiconengine.html#paint">paint</a>() to achieve this). The <a href="qiconengine.html#addPixmap">addPixmap</a>() function can be used to add new pixmaps to the icon engine, and is used by <a href="qicon.html">QIcon</a> to add specialized custom pixmaps.</p>
 
42
<p>The <a href="qiconengine.html#paint">paint</a>(), <a href="qiconengine.html#pixmap">pixmap</a>(), and <a href="qiconengine.html#addPixmap">addPixmap</a>() functions are all virtual, and can therefore be reimplemented in subclasses of QIconEngine.</p>
 
43
<p>See also <a href="qiconengineplugin.html">QIconEnginePlugin</a>.</p>
 
44
<hr />
 
45
<h2>Member Function Documentation</h2>
 
46
<h3 class="fn"><a name="dtor.QIconEngine"></a>QIconEngine::~QIconEngine ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
47
<p>Destroys the icon engine.</p>
 
48
<h3 class="fn"><a name="actualSize"></a><a href="qsize.html">QSize</a> QIconEngine::actualSize ( const <a href="qsize.html">QSize</a> &amp; <i>size</i>, <a href="qicon.html#Mode-enum">QIcon::Mode</a> <i>mode</i>, <a href="qicon.html#State-enum">QIcon::State</a> <i>state</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
49
<p>Returns the actual size of the icon the engine provides for the requested <i>size</i>, <i>mode</i> and <i>state</i>. The default implementation returns the given <i>size</i>.</p>
 
50
<h3 class="fn"><a name="addFile"></a>void QIconEngine::addFile ( const <a href="qstring.html">QString</a> &amp; <i>fileName</i>, const <a href="qsize.html">QSize</a> &amp; <i>size</i>, <a href="qicon.html#Mode-enum">QIcon::Mode</a> <i>mode</i>, <a href="qicon.html#State-enum">QIcon::State</a> <i>state</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
51
<p>Called by <a href="qicon.html#addFile">QIcon::addFile</a>(). Adds a specialized pixmap from the file with the given <i>fileName</i>, <i>size</i>, <i>mode</i> and <i>state</i>. The default pixmap-based engine stores any supplied file names, and it loads the pixmaps on demand instead of using scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra files.</p>
 
52
<h3 class="fn"><a name="addPixmap"></a>void QIconEngine::addPixmap ( const <a href="qpixmap.html">QPixmap</a> &amp; <i>pixmap</i>, <a href="qicon.html#Mode-enum">QIcon::Mode</a> <i>mode</i>, <a href="qicon.html#State-enum">QIcon::State</a> <i>state</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
53
<p>Called by <a href="qicon.html#addPixmap">QIcon::addPixmap</a>(). Adds a specialized <i>pixmap</i> for the given <i>mode</i> and <i>state</i>. The default pixmap-based engine stores any supplied pixmaps, and it uses them instead of scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra pixmaps.</p>
 
54
<h3 class="fn"><a name="paint"></a>void QIconEngine::paint ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qrect.html">QRect</a> &amp; <i>rect</i>, <a href="qicon.html#Mode-enum">QIcon::Mode</a> <i>mode</i>, <a href="qicon.html#State-enum">QIcon::State</a> <i>state</i> )&nbsp;&nbsp;<tt> [pure virtual]</tt></h3>
 
55
<p>Uses the given <i>painter</i> to paint the icon with the required <i>mode</i> and <i>state</i> into the rectangle <i>rect</i>.</p>
 
56
<h3 class="fn"><a name="pixmap"></a><a href="qpixmap.html">QPixmap</a> QIconEngine::pixmap ( const <a href="qsize.html">QSize</a> &amp; <i>size</i>, <a href="qicon.html#Mode-enum">QIcon::Mode</a> <i>mode</i>, <a href="qicon.html#State-enum">QIcon::State</a> <i>state</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
57
<p>Returns the icon as a pixmap with the required <i>size</i>, <i>mode</i>, and <i>state</i>. The default implementation creates a new pixmap and calls <a href="qiconengine.html#paint">paint</a>() to fill it.</p>
 
58
<p /><address><hr /><div align="center">
 
59
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
60
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
61
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
62
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
63
</tr></table></div></address></body>
 
64
</html>