1#ifndef PICTURE_LOADER_WORKER_WORK_H
2#define PICTURE_LOADER_WORKER_WORK_H
7#include <QLoggingCategory>
9#include <QNetworkAccessManager>
Q_LOGGING_CATEGORY(CardPictureLoaderWorkerWorkLog, "card_picture_loader.worker")
void cachedUrlInvalidated(const QUrl &url)
Emitted when a cached URL is invalid and must be removed.
void imageLoaded(const ExactCard &card, const QImage &image)
Emitted when the image has been loaded or all attempts failed.
QImage tryLoadImageFromReply(QNetworkReply *reply)
Attempts to read an image from a network reply.
Definition card_picture_loader_worker_work.cpp:173
void concludeImageLoad(const QImage &image)
Finalizes the image loading process.
Definition card_picture_loader_worker_work.cpp:196
void picDownloadChanged()
Updates the picDownload setting when it changes.
Definition card_picture_loader_worker_work.cpp:202
void requestSucceeded(const QUrl &url)
Emitted when a network request completes successfully.
void urlRedirected(const QUrl &originalUrl, const QUrl &redirectUrl)
Emitted when a URL has been redirected.
void picDownloadFailed()
Called when all URLs have been exhausted or download failed.
Definition card_picture_loader_worker_work.cpp:52
void handleNetworkReply(QNetworkReply *reply)
Handles a finished network reply for the card image.
Definition card_picture_loader_worker_work.cpp:70
bool picDownload
Whether network downloading is enabled.
Definition card_picture_loader_worker_work.h:51
void requestImageDownload(const QUrl &url, CardPictureLoaderWorkerWork *instance)
Request that a URL be downloaded.
CardPictureLoaderWorkerWork(const CardPictureLoaderWorker *worker, const ExactCard &toLoad)
Constructs a worker for downloading a specific card image.
Definition card_picture_loader_worker_work.cpp:17
void handleFailedReply(const QNetworkReply *reply)
Processes a failed network reply.
Definition card_picture_loader_worker_work.cpp:98
CardPictureToLoad cardToDownload
The card and associated URLs to try downloading.
Definition card_picture_loader_worker_work.h:41
void startNextPicDownload()
Starts downloading the next URL for this card.
Definition card_picture_loader_worker_work.cpp:36
void handleSuccessfulReply(QNetworkReply *reply)
Processes a successful network reply.
Definition card_picture_loader_worker_work.cpp:125
Handles asynchronous loading of card images, both locally and via network.
Definition card_picture_loader_worker.h:41
Manages all URLs and sets for downloading a specific card image.
Definition card_picture_to_load.h:20
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19