Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > by-pkgid > 6282078ae76a671f49c6af38c67b1a07 > files > 970

kdelibs-devel-2.2.2-49.2mdk.i586.rpm

<HTML>
<HEAD>
<TITLE>class KThemeCache</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class KThemeCache</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">
 A very simple pixmap cache for theme plugins. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="kthemebase_h.html">kthemebase.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> <small>(qt)</small> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-KThemeCache.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>enum <A HREF="#ref1">ScaleHint</A> {FullScale, HorizontalScale, VerticalScale}
</LI>
</ul><h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref2">KThemeCache</A></b> (int maxSize, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> *parent=0, const char *name=0) 
</LI>
<LI>bool &nbsp;<b><A HREF="#ref3">insert</A></b> (<A HREF="KThemePixmap.html">KThemePixmap</A> *pixmap, ScaleHint scale, int widgetID,
               bool border=false, bool mask=false) 
</LI>
<LI><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<b><A HREF="#ref4">pixmap</A></b> (int w, int h, int widgetID, bool border=false,
                         bool mask=false) 
</LI>
<LI><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<b><A HREF="#ref5">horizontalPixmap</A></b> (int w, int widgetID) 
</LI>
<LI><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<b><A HREF="#ref6">verticalPixmap</A></b> (int h, int widgetID) 
</LI>
</ul><h4>Protected Slots</h4><ul><LI>void &nbsp;<b><A HREF="#ref7">flushTimeout</A></b> () 
</LI>
</ul><h4>Protected Members</h4><ul><LI>QIntCache<KThemePixmap> <b><A HREF="#ref8">cache</A></b></LI>
<LI>QTimer <b><A HREF="#ref9">flushTimer</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 A very simple pixmap cache for theme plugins. QPixmapCache is not used
 since it uses QString keys which are not needed. All the information we
 need can be encoded in a numeric key. Using QIntCache instead allows us to
 skip the string operations.
</p>
<p> This class is mostly just inline methods that do bit operations on a key
 composed of the widget ID, width and/or height, and then calls
 QIntCache::find().
</p>
<p> One other thing to note is that full, horizontal, and vertically scaled
 pixmaps are not used interchangeably. For example, if you insert a fully
 scaled pixmap that is 32x32 then request a horizontally scaled pixmap with
 a width of 32, they will not match. This is because a pixmap that has been
 inserted into the cache has already been scaled at some point and it is
 very likely the vertical height was not originally 32. Thus the pixmap
 will be wrong when drawn, even though the horizontal width matches.
</p>
<p></p>
<p> </p>
<A NAME="ScaleHint"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>ScaleHint</strong> {FullScale, HorizontalScale, VerticalScale}
</td><td align="right"><h3><strong>ScaleHint</strong></h3></td></tr></table><p></p><p>
 The scale hints supported by the cache. Note that Tiled is not here
 since tiled pixmaps are kept only once in KThemeBase.
     </p>
<A NAME="KThemeCache"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>KThemeCache</strong> (int maxSize, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qobject.html">QObject</A> *parent=0, const char *name=0)
<br></td><td align="right"><h3><strong>KThemeCache</strong></h3></td></tr></table><p></p><p>
 The constructor.
</p>
<p></p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>maxSize</i></TD><TD align="left" valign="top">The maximum size of the cache in kilobytes.
     </TD></TR>
</TABLE></P>
<A NAME="insert"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool &nbsp;<strong>insert</strong> (<A HREF="KThemePixmap.html">KThemePixmap</A> *pixmap, ScaleHint scale, int widgetID,
               bool border=false, bool mask=false)
<br></td><td align="right"><h3><strong>insert</strong></h3></td></tr></table><p></p><p>
 Inserts a new pixmap into the cache.
</p>
<p></p>
<p></p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>pixmap</i></TD><TD align="left" valign="top">The pixmap to insert.
</TD></TR>
<TR><TD align="left" valign="top"><i>scale</i></TD><TD align="left" valign="top">The scaling type of the pixmap.
</TD></TR>
<TR><TD align="left" valign="top"><i>widgetID</i></TD><TD align="left" valign="top">The widget ID of the pixmap, usually from KThemeBase's
 WidgetType enum.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if the insert was successful, false otherwise.
     </p>
<A NAME="pixmap"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<strong>pixmap</strong> (int w, int h, int widgetID, bool border=false,
                         bool mask=false)
<br></td><td align="right"><h3><strong>pixmap</strong></h3></td></tr></table><p></p><p>
 Returns a fully scaled pixmap.
</p>
<p></p>
<p></p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>w</i></TD><TD align="left" valign="top">The pixmap width to search for.
</TD></TR>
<TR><TD align="left" valign="top"><i>h</i></TD><TD align="left" valign="top">The pixmap height to search for.
</TD></TR>
<TR><TD align="left" valign="top"><i>widgetID</i></TD><TD align="left" valign="top">The widget ID to search for.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a pixmap matching the width, height, and widget ID of
 the pixmap exists, NULL otherwise.
     </p>
<A NAME="horizontalPixmap"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<strong>horizontalPixmap</strong> (int w, int widgetID)
<br></td><td align="right"><h3><strong>horizontalPixmap</strong></h3></td></tr></table><p></p><p>
 Returns a horizontally scaled pixmap.
</p>
<p></p>
<p></p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>w</i></TD><TD align="left" valign="top">The pixmap width to search for.
</TD></TR>
<TR><TD align="left" valign="top"><i>widgetID</i></TD><TD align="left" valign="top">The widget ID to search for.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a pixmap matching the width and widget ID of
 the pixmap exists, NULL otherwise.
     </p>
<A NAME="verticalPixmap"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="KThemePixmap.html">KThemePixmap</A>* &nbsp;<strong>verticalPixmap</strong> (int h, int widgetID)
<br></td><td align="right"><h3><strong>verticalPixmap</strong></h3></td></tr></table><p></p><p>
 Returns a vertically scaled pixmap.
</p>
<p></p>
<p></p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>h</i></TD><TD align="left" valign="top">The pixmap height to search for.
</TD></TR>
<TR><TD align="left" valign="top"><i>widgetID</i></TD><TD align="left" valign="top">The widget ID to search for.
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a pixmap matching the height and widget ID of
 the pixmap exists, NULL otherwise.
     </p>
<A NAME="flushTimeout"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void &nbsp;<strong>flushTimeout</strong> ()
<br></td><td align="right"><h3><strong>flushTimeout</strong></h3></td></tr></table><p> <small>[protected slots slot]</small></p><A NAME="cache"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qintcache.html">QIntCache</A><<A HREF="KThemePixmap.html">KThemePixmap</A>>  <strong>cache</strong>
</td><td align="right"><h3><strong>cache</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="flushTimer"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qtimer.html">QTimer</A>  <strong>flushTimer</strong>
</td><td align="right"><h3><strong>flushTimer</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR><UL><LI><i>Author</i>: Daniel M. Duley <mosfet@kde.org>
</LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:09:05 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>