Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2157

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QPixmapCache" doc="/**
&lt;p&gt;The &lt;a href=&quot;QPixmapCache.html#QPixmapCache()&quot;&gt;&lt;tt&gt;QPixmapCache&lt;/tt&gt;&lt;/a&gt; class provides an application-wide cache for pixmaps.&lt;/p&gt;
&lt;p&gt;This class is a tool for optimized drawing with &lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt;. You can use it to store temporary pixmaps that are expensive to generate without using more storage space than &lt;a href=&quot;QPixmapCache.html#cacheLimit()&quot;&gt;&lt;tt&gt;cacheLimit&lt;/tt&gt;&lt;/a&gt;. Use &lt;a href=&quot;QPixmapCache.html#insert(java.lang.String, com.trolltech.qt.gui.QPixmap)&quot;&gt;&lt;tt&gt;insert&lt;/tt&gt;&lt;/a&gt; to insert pixmaps, find() to find them, and &lt;a href=&quot;QPixmapCache.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt; to empty the cache.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QPixmapCache.html#QPixmapCache()&quot;&gt;&lt;tt&gt;QPixmapCache&lt;/tt&gt;&lt;/a&gt; contains no member data, only static functions to access the global pixmap cache. It creates an internal QCache object for caching the pixmaps.&lt;/p&gt;
&lt;p&gt;The cache associates a pixmap with a string (key). If two pixmaps are inserted into the cache using equal keys, then the last pixmap will hide the first pixmap. The QHash and QCache classes do exactly the same.&lt;/p&gt;
&lt;p&gt;The cache becomes full when the total size of all pixmaps in the cache exceeds &lt;a href=&quot;QPixmapCache.html#cacheLimit()&quot;&gt;&lt;tt&gt;cacheLimit&lt;/tt&gt;&lt;/a&gt;. The initial cache limit is 1024 KB (1 MB); it is changed with &lt;a href=&quot;QPixmapCache.html#setCacheLimit(int)&quot;&gt;&lt;tt&gt;setCacheLimit&lt;/tt&gt;&lt;/a&gt;. A pixmap takes roughly (&lt;i&gt;width&lt;/i&gt; * &lt;i&gt;height&lt;/i&gt; * &lt;i&gt;depth&lt;/i&gt;)/8 bytes of memory.&lt;/p&gt;
&lt;p&gt;The &lt;i&gt;Qt Quarterly&lt;/i&gt; article &lt;a href=&quot;http://doc.trolltech.com/qq/qq12-qpixmapcache.html&quot;&gt;Optimizing with &lt;/tt&gt;QPixmapCache&lt;/a&gt; explains how to use &lt;a href=&quot;QPixmapCache.html#QPixmapCache()&quot;&gt;&lt;tt&gt;QPixmapCache&lt;/tt&gt;&lt;/a&gt; to speed up applications by caching the results of painting.&lt;/p&gt;

@see &lt;tt&gt;QCache&lt;/tt&gt;
@see &lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QPixmapCache()"/>
    <method name="public native static int cacheLimit()" doc="/**
&lt;p&gt;Returns the cache limit (in kilobytes).&lt;/p&gt;
&lt;p&gt;The default setting is 1024 kilobytes.&lt;/p&gt;

@see &lt;a href=&quot;QPixmapCache.html#setCacheLimit(int)&quot;&gt;&lt;tt&gt;setCacheLimit&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static void clear()" doc="/**
&lt;p&gt;Removes all pixmaps from the cache.&lt;/p&gt;
 */"/>
    <method name="public static boolean insert(java.lang.String key, com.trolltech.qt.gui.QPixmap arg__2)" doc="/**
&lt;p&gt;Inserts a copy of the pixmap &lt;tt&gt;arg__2&lt;/tt&gt; associated with the &lt;tt&gt;key&lt;/tt&gt; into the cache.&lt;/p&gt;
&lt;p&gt;All pixmaps inserted by the Qt library have a key starting with &amp;quot;$qt&amp;quot;, so your own pixmap keys should never begin &amp;quot;$qt&amp;quot;.&lt;/p&gt;
&lt;p&gt;When a pixmap is inserted and the cache is about to exceed its limit, it removes pixmaps until there is enough room for the pixmap to be inserted.&lt;/p&gt;
&lt;p&gt;The oldest pixmaps (least recently accessed in the cache) are deleted when more space is needed.&lt;/p&gt;
&lt;p&gt;The function returns true if the object was inserted into the cache; otherwise it returns false.&lt;/p&gt;

@see &lt;a href=&quot;QPixmapCache.html#setCacheLimit(int)&quot;&gt;&lt;tt&gt;setCacheLimit&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public native static void remove(java.lang.String key)" doc="/**
&lt;p&gt;Removes the pixmap associated with &lt;tt&gt;key&lt;/tt&gt; from the cache.&lt;/p&gt;
 */"/>
    <method name="public native static void setCacheLimit(int arg__1)" doc="/**
&lt;p&gt;Sets the cache limit to &lt;tt&gt;arg__1&lt;/tt&gt; kilobytes.&lt;/p&gt;
&lt;p&gt;The default setting is 1024 kilobytes.&lt;/p&gt;

@see &lt;a href=&quot;QPixmapCache.html#cacheLimit()&quot;&gt;&lt;tt&gt;cacheLimit&lt;/tt&gt;&lt;/a&gt; */"/>
</class>