File: qiconengine.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (20 lines) | stat: -rw-r--r-- 7,278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QIconEngine Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QIconEngine Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QIconEngine class provides an abstract base class for <a href="qicon.html">QIcon</a> renderers. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qiconengine.html#QIconEngine">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qiconengine.html#QIconEngine-2">__init__</a></b> (<i>self</i>, QIconEngine)</li><li><div class="fn" />QSize <b><a href="qiconengine.html#actualSize">actualSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>, QIcon.Mode&#160;<i>mode</i>, QIcon.State&#160;<i>state</i>)</li><li><div class="fn" /><b><a href="qiconengine.html#addFile">addFile</a></b> (<i>self</i>, QString&#160;<i>fileName</i>, QSize&#160;<i>size</i>, QIcon.Mode&#160;<i>mode</i>, QIcon.State&#160;<i>state</i>)</li><li><div class="fn" /><b><a href="qiconengine.html#addPixmap">addPixmap</a></b> (<i>self</i>, QPixmap&#160;<i>pixmap</i>, QIcon.Mode&#160;<i>mode</i>, QIcon.State&#160;<i>state</i>)</li><li><div class="fn" /><b><a href="qiconengine.html#paint">paint</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>, QRect&#160;<i>rect</i>, QIcon.Mode&#160;<i>mode</i>, QIcon.State&#160;<i>state</i>)</li><li><div class="fn" />QPixmap <b><a href="qiconengine.html#pixmap">pixmap</a></b> (<i>self</i>, QSize&#160;<i>size</i>, QIcon.Mode&#160;<i>mode</i>, QIcon.State&#160;<i>state</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QIconEngine class provides an abstract base class for <a href="qicon.html">QIcon</a> renderers.</p>
<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>
<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>
<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>
<p>See also <a href="qiconengineplugin.html">QIconEnginePlugin</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QIconEngine" />QIconEngine.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QIconEngine-2" />QIconEngine.__init__ (<i>self</i>, <a href="qiconengine.html">QIconEngine</a>)</h3><h3 class="fn"><a name="actualSize" /><a href="qsize.html">QSize</a> QIconEngine.actualSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>mode</i>, <a href="qicon.html#State-enum">QIcon.State</a>&#160;<i>state</i>)</h3><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>
<h3 class="fn"><a name="addFile" />QIconEngine.addFile (<i>self</i>, <a href="qstring.html">QString</a>&#160;<i>fileName</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>mode</i>, <a href="qicon.html#State-enum">QIcon.State</a>&#160;<i>state</i>)</h3><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>
<h3 class="fn"><a name="addPixmap" />QIconEngine.addPixmap (<i>self</i>, <a href="qpixmap.html">QPixmap</a>&#160;<i>pixmap</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>mode</i>, <a href="qicon.html#State-enum">QIcon.State</a>&#160;<i>state</i>)</h3><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>
<h3 class="fn"><a name="paint" />QIconEngine.paint (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>, <a href="qrect.html">QRect</a>&#160;<i>rect</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>mode</i>, <a href="qicon.html#State-enum">QIcon.State</a>&#160;<i>state</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><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>
<h3 class="fn"><a name="pixmap" /><a href="qpixmap.html">QPixmap</a> QIconEngine.pixmap (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>, <a href="qicon.html#Mode-enum">QIcon.Mode</a>&#160;<i>mode</i>, <a href="qicon.html#State-enum">QIcon.State</a>&#160;<i>state</i>)</h3><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>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>