![]() |
Qt 6.x
The Qt SDK
|
The QPixmapCache::Key class can be used for efficient access to the QPixmapCache. More...
#include <qpixmapcache.h>
Public Member Functions | |
Key () | |
Constructs an empty Key object. | |
Key (const Key &other) | |
Key (Key &&other) noexcept | |
Key & | operator= (Key &&other) noexcept |
~Key () | |
Destroys the key. | |
bool | operator== (const Key &key) const |
bool | operator!= (const Key &key) const |
Key & | operator= (const Key &other) |
void | swap (Key &other) noexcept |
bool | isValid () const noexcept |
Returns true if there is a cached pixmap associated with this key. | |
Friends | |
class | QPMCache |
class | QPixmapCache |
size_t | qHash (const QPixmapCache::Key &k, size_t seed=0) noexcept |
The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.
\inmodule QtGui
Use QPixmapCache::insert() to receive an instance of Key generated by the pixmap cache. You can store the key in your own objects for a very efficient one-to-one object-to-pixmap mapping.
Definition at line 17 of file qpixmapcache.h.
QPixmapCache::Key::Key | ( | ) |
Constructs an empty Key object.
Definition at line 94 of file qpixmapcache.cpp.
QPixmapCache::Key::Key | ( | const Key & | other | ) |
Constructs a copy of other.
Definition at line 102 of file qpixmapcache.cpp.
|
inlinenoexcept |
Definition at line 22 of file qpixmapcache.h.
References other().
QPixmapCache::Key::~Key | ( | ) |
|
noexcept |
Returns true
if there is a cached pixmap associated with this key.
Otherwise, if pixmap was flushed, the key is no longer valid.
Definition at line 157 of file qpixmapcache.cpp.
References d.
Referenced by QPMCache::insert(), and QPMCache::remove().
|
inline |
Definition at line 26 of file qpixmapcache.h.
References operator==().
QPixmapCache::Key & QPixmapCache::Key::operator= | ( | const Key & | other | ) |
|
inlinenoexcept |
Definition at line 23 of file qpixmapcache.h.
References other(), and swap().
bool QPixmapCache::Key::operator== | ( | const Key & | key | ) | const |
Returns true
if this key is the same as the given key; otherwise returns false.
Definition at line 124 of file qpixmapcache.cpp.
References d.
Definition at line 30 of file qpixmapcache.h.
References d, other(), and qt_ptr_swap().
|
friend |
Definition at line 34 of file qpixmapcache.h.
|
friend |
Definition at line 40 of file qpixmapcache.h.
|
friend |
Definition at line 39 of file qpixmapcache.h.