Cockatrice 2026-06-27-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
UserCardArtProvider Class Reference

#include <user_card_art_provider.h>

Inheritance diagram for UserCardArtProvider:
[legend]
Collaboration diagram for UserCardArtProvider:
[legend]

Public Slots

void onDatabaseReady ()

Signals

void cardArtUpdated (const QString &userName)

Public Member Functions

 UserCardArtProvider (QObject *parent=nullptr)
void requestCardArt (const QString &userName, const QString &cardName, const QString &providerId)
const QMap< QString, QPixmap > & cache () const

Static Public Member Functions

static QPixmap cropCardArt (const QPixmap &fullRes)

Private Member Functions

void processQueue ()
void insertIntoCache (const QString &key, const QPixmap &pixmap)

Private Attributes

bool dbReady = false
QList< QString > cacheInsertionOrder
QMap< QString, QPixmap > cardArtCache
QSet< QString > pending
QQueue< QString > queue

Static Private Attributes

static constexpr int MaxCacheEntries = 300

Constructor & Destructor Documentation

◆ UserCardArtProvider()

UserCardArtProvider::UserCardArtProvider ( QObject * parent = nullptr)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ cache()

const QMap< QString, QPixmap > & UserCardArtProvider::cache ( ) const

◆ cardArtUpdated

void UserCardArtProvider::cardArtUpdated ( const QString & userName)
signal
Here is the caller graph for this function:

◆ cropCardArt()

QPixmap UserCardArtProvider::cropCardArt ( const QPixmap & fullRes)
static
Here is the caller graph for this function:

◆ insertIntoCache()

void UserCardArtProvider::insertIntoCache ( const QString & key,
const QPixmap & pixmap )
private
Here is the caller graph for this function:

◆ onDatabaseReady

void UserCardArtProvider::onDatabaseReady ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processQueue()

void UserCardArtProvider::processQueue ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ requestCardArt()

void UserCardArtProvider::requestCardArt ( const QString & userName,
const QString & cardName,
const QString & providerId )
Here is the call graph for this function:

Member Data Documentation

◆ cacheInsertionOrder

QList<QString> UserCardArtProvider::cacheInsertionOrder
private

◆ cardArtCache

QMap<QString, QPixmap> UserCardArtProvider::cardArtCache
private

◆ dbReady

bool UserCardArtProvider::dbReady = false
private

◆ MaxCacheEntries

int UserCardArtProvider::MaxCacheEntries = 300
staticconstexprprivate

◆ pending

QSet<QString> UserCardArtProvider::pending
private

◆ queue

QQueue<QString> UserCardArtProvider::queue
private

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