game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
ImageCache Class Reference

Thread-safe LRU cache for scaled images. More...

#include <async_image_loader.h>

Public Member Functions

 ImageCache (size_t maxSize=300)
void clear ()
bool contains (const QString &key) const
QPixmap get (const QString &key)
size_t hitCount () const
void insert (const QString &key, const QPixmap &pixmap)
size_t missCount () const
size_t size () const

Detailed Description

Thread-safe LRU cache for scaled images.

Provides O(1) lookup and bounded memory usage with LRU eviction.

Definition at line 51 of file async_image_loader.h.

Constructor & Destructor Documentation

◆ ImageCache()

ImageCache::ImageCache ( size_t maxSize = 300)
explicit

Definition at line 20 of file async_image_loader.cpp.

Member Function Documentation

◆ clear()

void ImageCache::clear ( )

Definition at line 69 of file async_image_loader.cpp.

◆ contains()

bool ImageCache::contains ( const QString & key) const

Definition at line 22 of file async_image_loader.cpp.

◆ get()

QPixmap ImageCache::get ( const QString & key)

Definition at line 28 of file async_image_loader.cpp.

◆ hitCount()

size_t ImageCache::hitCount ( ) const
inline

Definition at line 64 of file async_image_loader.h.

◆ insert()

void ImageCache::insert ( const QString & key,
const QPixmap & pixmap )

Definition at line 45 of file async_image_loader.cpp.

◆ missCount()

size_t ImageCache::missCount ( ) const
inline

Definition at line 68 of file async_image_loader.h.

◆ size()

size_t ImageCache::size ( ) const

Definition at line 76 of file async_image_loader.cpp.


The documentation for this class was generated from the following files: