1#ifndef CARD_PICTURE_LOADER_H
2#define CARD_PICTURE_LOADER_H
5#include <QLoggingCategory>
7#include <qtmetamacros.h>
17template <
typename T>
class QList;
20inline Q_LOGGING_CATEGORY(CardPictureLoaderCardBackCacheFailLog,
"card_picture_loader.card_back_cache_fail");
Displays the status of card image downloads in a horizontal progress bar with a log popup.
Definition card_picture_loader_status_bar.h:26
Handles asynchronous loading of card images, both locally and via network.
Definition card_picture_loader_worker.h:47
Singleton class to manage card image loading and caching. Provides functionality to asynchronously lo...
Definition card_picture_loader.h:46
QHash< QString, QDateTime > failedAt
Timestamp of the last failed load attempt per pixmap cache key.
Definition card_picture_loader.h:69
static void getPixmap(QPixmap &pixmap, const ExactCard &card, QSize size)
Retrieve a card pixmap, either from cache or enqueued for loading.
Definition card_picture_loader.cpp:158
static bool hasLocalOverrides(const ExactCard &card)
Check if a local override image already exists for the card.
Definition card_picture_loader.cpp:444
static void getCardBackLoadingInProgressPixmap(QPixmap &pixmap, QSize size)
Retrieve a card back pixmap for the loading-in-progress state.
Definition card_picture_loader.cpp:115
void picsPathChanged()
Triggered when the pictures path changes. Clears the QPixmap cache to reload images.
Definition card_picture_loader.cpp:528
void operator=(CardPictureLoader const &)=delete
CardPictureLoaderWorker * worker
Worker thread for async image loading.
Definition card_picture_loader.h:67
CardPictureLoaderStatusBar * statusBar
Status bar widget showing load progress.
Definition card_picture_loader.h:68
static CardPictureLoader & getInstance()
Access the singleton instance of CardPictureLoader.
Definition card_picture_loader.h:53
CardPictureLoader(CardPictureLoader const &)=delete
CardPictureLoader()
Definition card_picture_loader.cpp:53
void picDownloadChanged()
Triggered when the user changes the picture download settings. Clears the QPixmap cache to reload ima...
Definition card_picture_loader.cpp:523
static void deleteAllLocalOverrides(const ExactCard &card)
Removes all locally stored override images for the card.
Definition card_picture_loader.cpp:243
static void clearPixmapCache()
Clears the in-memory QPixmap cache for all cards.
Definition card_picture_loader.cpp:484
void networkCacheCleared()
Emitted after the worker has finished clearing the network and redirect caches.
void imageLoaded(const ExactCard &card, const QImage &image)
Slot called by the worker when an image is loaded. Inserts the pixmap into the cache and emits pixmap...
Definition card_picture_loader.cpp:203
void installPrintingOverrideOnLoad(const ExactCard &originalCard, const ExactCard &overrideCard)
Definition card_picture_loader.cpp:368
static void getCardBackPixmap(QPixmap &pixmap, QSize size)
Retrieve a generic card back pixmap.
Definition card_picture_loader.cpp:95
void installPrintingOverride(const ExactCard &originalCard, const ExactCard &overrideCard)
Definition card_picture_loader.cpp:424
void cardLangChanged()
Triggered when the card language setting changes. Clears the in-memory picture caches so images reloa...
Definition card_picture_loader.cpp:533
static void cacheCardPixmaps(const QList< ExactCard > &cards)
Preload a list of cards into the pixmap cache (limited to CACHED_CARD_PER_DECK_MAX).
Definition card_picture_loader.cpp:504
static void getCardBackLoadingFailedPixmap(QPixmap &pixmap, QSize size)
Retrieve a card back pixmap for the loading-failed state.
Definition card_picture_loader.cpp:137
static void clearNetworkCache()
Clears the network disk cache of the worker.
Definition card_picture_loader.cpp:489
void saveCardImageToLocalStorage(const ExactCard &card, const QPixmap &pixmap, bool allowOverwrite=false)
Definition card_picture_loader.cpp:283
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:24
Definition mana_curve_category_widget.h:11
Definition remote_connection_controller.h:20
Q_LOGGING_CATEGORY(CrashReportLog, "crash_report")