Struct qt_gui::q_pixmap_cache::Key
source · #[repr(C)]pub struct Key { /* private fields */ }
Expand description
The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.
C++ class: QPixmapCache::Key
.
The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.
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.
Implementations§
source§impl Key
impl Key
sourcepub unsafe fn copy_from(&self, other: impl CastInto<Ref<Key>>) -> Ref<Key>
pub unsafe fn copy_from(&self, other: impl CastInto<Ref<Key>>) -> Ref<Key>
Calls C++ function: QPixmapCache::Key& QPixmapCache::Key::operator=(const QPixmapCache::Key& other)
.
sourcepub unsafe fn is_valid(&self) -> bool
pub unsafe fn is_valid(&self) -> bool
Returns true
if there is a cached pixmap associated with this key. Otherwise, if pixmap was flushed, the key is no longer valid.
Calls C++ function: bool QPixmapCache::Key::isValid() const
.
Returns true
if there is a cached pixmap associated with this key. Otherwise, if pixmap was flushed, the key is no longer valid.
This function was introduced in Qt 5.7.
sourcepub unsafe fn new() -> CppBox<Key>
pub unsafe fn new() -> CppBox<Key>
Constructs an empty Key object.
Calls C++ function: [constructor] void QPixmapCache::Key::Key()
.
Constructs an empty Key object.
sourcepub unsafe fn new_copy(other: impl CastInto<Ref<Key>>) -> CppBox<Key>
pub unsafe fn new_copy(other: impl CastInto<Ref<Key>>) -> CppBox<Key>
Constructs an empty Key object.
Calls C++ function: [constructor] void QPixmapCache::Key::Key(const QPixmapCache::Key& other)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for Key::Key()
:
Constructs an empty Key object.