1#ifndef PICTURE_TO_LOAD_H
2#define PICTURE_TO_LOAD_H
QSharedPointer< CardSet > CardSetPtr
Definition card_info.h:27
Q_LOGGING_CATEGORY(CardPictureToLoadLog, "card_picture_loader.picture_to_load")
QList< CardSetPtr > sortedSets
All sets for this card, sorted by priority.
Definition card_picture_to_load.h:23
QString transformUrl(const QString &urlTemplate) const
Transforms a URL template into a concrete URL for this card/set.
Definition card_picture_to_load.cpp:244
bool nextUrl()
Advance to the next URL in the current set's list.
Definition card_picture_to_load.cpp:125
const ExactCard & getCard() const
Definition card_picture_to_load.h:41
void populateSetUrls()
Populates the currentSetUrls list with URLs for the current set.
Definition card_picture_to_load.cpp:82
QString getCurrentUrl() const
Definition card_picture_to_load.h:47
ExactCard card
The ExactCard being downloaded.
Definition card_picture_to_load.h:22
QString currentUrl
Currently active URL to download.
Definition card_picture_to_load.h:26
CardSetPtr getCurrentSet() const
Definition card_picture_to_load.h:53
static QList< CardSetPtr > extractSetsSorted(const ExactCard &card)
Extract all sets from the card and sort them by priority.
Definition card_picture_to_load.cpp:26
bool nextSet()
Advance to the next set in the list.
Definition card_picture_to_load.cpp:113
QList< QString > currentSetUrls
URLs for the current set being attempted.
Definition card_picture_to_load.h:25
QString peekNextUrl() const
Definition card_picture_to_load.cpp:145
QList< QString > urlTemplates
URL templates from settings.
Definition card_picture_to_load.h:24
int currentSetIndex
Current position in sortedSets.
Definition card_picture_to_load.h:28
QString getSetName() const
Definition card_picture_to_load.cpp:136
int currentUrlIndex
Current position in currentSetUrls.
Definition card_picture_to_load.h:29
void resetIndices()
Resets iteration indices to the beginning.
Definition card_picture_to_load.cpp:154
CardPictureToLoad(const ExactCard &_card)
Constructs a CardPictureToLoad for a given ExactCard.
Definition card_picture_to_load.cpp:15
CardSetPtr currentSet
Currently active set.
Definition card_picture_to_load.h:27
Represents a specific card instance, defined by its CardInfo and a particular printing.
Definition exact_card.h:19