summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqpixmapcache.3qt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man/man3/tqpixmapcache.3qt')
-rw-r--r--doc/man/man3/tqpixmapcache.3qt52
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/man/man3/tqpixmapcache.3qt b/doc/man/man3/tqpixmapcache.3qt
index 17c565524..df41068cc 100644
--- a/doc/man/man3/tqpixmapcache.3qt
+++ b/doc/man/man3/tqpixmapcache.3qt
@@ -1,5 +1,5 @@
'\" t
-.TH QPixmapCache 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
+.TH TQPixmapCache 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
@@ -7,20 +7,20 @@
.ad l
.nh
.SH NAME
-QPixmapCache \- Application-global cache for pixmaps
+TQPixmapCache \- Application-global cache for pixmaps
.SH SYNOPSIS
-\fC#include <ntqpixmapcache.h>\fR
+\fC#include <tqpixmapcache.h>\fR
.PP
.SS "Static Public Members"
-<li class=fn>int \fBcacheLimit\fR () <li class=fn>void \fBsetCacheLimit\fR ( int n ) <li class=fn>QPixmap * \fBfind\fR ( const TQString & key ) <li class=fn>bool \fBfind\fR ( const TQString & key, QPixmap & pm ) <li class=fn>bool insert ( const TQString & key, QPixmap * pm ) \fI(obsolete)\fR <li class=fn>bool \fBinsert\fR ( const TQString & key, const QPixmap & pm ) <li class=fn>void \fBremove\fR ( const TQString & key ) <li class=fn>void \fBclear\fR ()
+<li class=fn>int \fBcacheLimit\fR () <li class=fn>void \fBsetCacheLimit\fR ( int n ) <li class=fn>TQPixmap * \fBfind\fR ( const TQString & key ) <li class=fn>bool \fBfind\fR ( const TQString & key, TQPixmap & pm ) <li class=fn>bool insert ( const TQString & key, TQPixmap * pm ) \fI(obsolete)\fR <li class=fn>bool \fBinsert\fR ( const TQString & key, const TQPixmap & pm ) <li class=fn>void \fBremove\fR ( const TQString & key ) <li class=fn>void \fBclear\fR ()
.SH DESCRIPTION
-The QPixmapCache class provides an application-global cache for pixmaps.
+The TQPixmapCache class provides an application-global cache for pixmaps.
.PP
-This class is a tool for optimized drawing with QPixmap. You can use it to store temporary pixmaps that are expensive to generate without using more storage space than cacheLimit(). Use insert() to insert pixmaps, find() to find them and clear() to empty the cache.
+This class is a tool for optimized drawing with TQPixmap. You can use it to store temporary pixmaps that are expensive to generate without using more storage space than cacheLimit(). Use insert() to insert pixmaps, find() to find them and clear() to empty the cache.
.PP
-For example, QRadioButton has a non-trivial visual representation so we don't want to regenerate a pixmap whenever a radio button is displayed or changes state. In the function QRadioButton::drawButton(), we do not draw the radio button directly. Instead, we first check the global pixmap cache for a pixmap with the key "$qt_radio_nnn_", where \fCnnn\fR is a numerical value that specifies the the radio button state. If a pixmap is found, we bitBlt() it onto the widget and return. Otherwise, we create a new pixmap, draw the radio button in the pixmap, and finally insert the pixmap in the global pixmap cache, using the key above. The bitBlt() is ten times faster than drawing the radio button. All radio buttons in the program share the cached pixmap since QPixmapCache is application-global.
+For example, QRadioButton has a non-trivial visual representation so we don't want to regenerate a pixmap whenever a radio button is displayed or changes state. In the function QRadioButton::drawButton(), we do not draw the radio button directly. Instead, we first check the global pixmap cache for a pixmap with the key "$qt_radio_nnn_", where \fCnnn\fR is a numerical value that specifies the the radio button state. If a pixmap is found, we bitBlt() it onto the widget and return. Otherwise, we create a new pixmap, draw the radio button in the pixmap, and finally insert the pixmap in the global pixmap cache, using the key above. The bitBlt() is ten times faster than drawing the radio button. All radio buttons in the program share the cached pixmap since TQPixmapCache is application-global.
.PP
-QPixmapCache contains no member data, only static functions to access the global pixmap cache. It creates an internal TQCache for caching the pixmaps.
+TQPixmapCache contains no member data, only static functions to access the global pixmap cache. It creates an internal TQCache for caching the pixmaps.
.PP
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 TQDict and TQCache classes do exactly the same.
.PP
@@ -30,28 +30,28 @@ See the TQCache documentation for more details about the cache mechanism.
.PP
See also Environment Classes, Graphics Classes, and Image Processing Classes.
.SH MEMBER FUNCTION DOCUMENTATION
-.SH "int QPixmapCache::cacheLimit ()\fC [static]\fR"
+.SH "int TQPixmapCache::cacheLimit ()\fC [static]\fR"
Returns the cache limit (in kilobytes).
.PP
The default setting is 1024 kilobytes.
.PP
See also setCacheLimit().
-.SH "void QPixmapCache::clear ()\fC [static]\fR"
+.SH "void TQPixmapCache::clear ()\fC [static]\fR"
Removes all pixmaps from the cache.
-.SH "QPixmap * QPixmapCache::find ( const TQString & key )\fC [static]\fR"
+.SH "TQPixmap * TQPixmapCache::find ( const TQString & key )\fC [static]\fR"
Returns the pixmap associated with the \fIkey\fR in the cache, or null if there is no such pixmap.
.PP
-\fBWarning:\fR If valid, you should copy the pixmap immediately (this is fast). Subsequent insertions into the cache could cause the pointer to become invalid. For this reason, we recommend you use find(const TQString&, QPixmap&) instead.
+\fBWarning:\fR If valid, you should copy the pixmap immediately (this is fast). Subsequent insertions into the cache could cause the pointer to become invalid. For this reason, we recommend you use find(const TQString&, TQPixmap&) instead.
.PP
Example:
.PP
.nf
.br
- QPixmap* pp;
+ TQPixmap* pp;
.br
- QPixmap p;
+ TQPixmap p;
.br
- if ( (pp=QPixmapCache::find("my_big_image", pm)) ) {
+ if ( (pp=TQPixmapCache::find("my_big_image", pm)) ) {
.br
p = *pp;
.br
@@ -59,14 +59,14 @@ Example:
.br
p.load("bigimage.png");
.br
- QPixmapCache::insert("my_big_image", new QPixmap(p));
+ TQPixmapCache::insert("my_big_image", new TQPixmap(p));
.br
}
.br
painter->drawPixmap(0, 0, p);
.br
.fi
-.SH "bool QPixmapCache::find ( const TQString & key, QPixmap & pm )\fC [static]\fR"
+.SH "bool TQPixmapCache::find ( const TQString & key, TQPixmap & pm )\fC [static]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Looks for a cached pixmap associated with the \fIkey\fR in the cache. If a pixmap is found, the function sets \fIpm\fR to that pixmap and returns TRUE; otherwise leaves \fIpm\fR alone and returns FALSE.
@@ -75,20 +75,20 @@ Example:
.PP
.nf
.br
- QPixmap p;
+ TQPixmap p;
.br
- if ( !QPixmapCache::find("my_big_image", pm) ) {
+ if ( !TQPixmapCache::find("my_big_image", pm) ) {
.br
pm.load("bigimage.png");
.br
- QPixmapCache::insert("my_big_image", pm);
+ TQPixmapCache::insert("my_big_image", pm);
.br
}
.br
painter->drawPixmap(0, 0, p);
.br
.fi
-.SH "bool QPixmapCache::insert ( const TQString & key, const QPixmap & pm )\fC [static]\fR"
+.SH "bool TQPixmapCache::insert ( const TQString & key, const TQPixmap & pm )\fC [static]\fR"
Inserts a copy of the pixmap \fIpm\fR associated with the \fIkey\fR into the cache.
.PP
All pixmaps inserted by the TQt library have a key starting with" $qt", so your own pixmap keys should never begin "$qt".
@@ -98,7 +98,7 @@ When a pixmap is inserted and the cache is about to exceed its limit, it removes
The oldest pixmaps (least recently accessed in the cache) are deleted when more space is needed.
.PP
See also setCacheLimit().
-.SH "bool QPixmapCache::insert ( const TQString & key, QPixmap * pm )\fC [static]\fR"
+.SH "bool TQPixmapCache::insert ( const TQString & key, TQPixmap * pm )\fC [static]\fR"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Inserts the pixmap \fIpm\fR associated with \fIkey\fR into the cache. Returns TRUE if successful, or FALSE if the pixmap is too big for the cache.
@@ -109,10 +109,10 @@ If this function returns FALSE, you must delete \fIpm\fR yourself.
.PP
If this function returns TRUE, do not use \fIpm\fR afterwards or keep references to it because any other insertions into the cache, whether from anywhere in the application or within TQt itself, could cause the pixmap to be discarded from the cache and the pointer to become invalid.
.PP
-Due to these dangers, we strongly recommend that you use insert(const TQString&, const QPixmap&) instead. \fR
-.SH "void QPixmapCache::remove ( const TQString & key )\fC [static]\fR"
+Due to these dangers, we strongly recommend that you use insert(const TQString&, const TQPixmap&) instead. \fR
+.SH "void TQPixmapCache::remove ( const TQString & key )\fC [static]\fR"
Removes the pixmap associated with \fIkey\fR from the cache.
-.SH "void QPixmapCache::setCacheLimit ( int n )\fC [static]\fR"
+.SH "void TQPixmapCache::setCacheLimit ( int n )\fC [static]\fR"
Sets the cache limit to \fIn\fR kilobytes.
.PP
The default setting is 1024 kilobytes.
@@ -120,7 +120,7 @@ The default setting is 1024 kilobytes.
See also cacheLimit().
.SH "SEE ALSO"
-.BR http://doc.trolltech.com/ntqpixmapcache.html
+.BR http://doc.trolltech.com/tqpixmapcache.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the