Allow more naming schemes for custom pictures (#6021)

* Allow more naming schemes for custom pictures.

Order is cardName_providerId, cardName_setName_collectorNumber, setName-collectorNumber-cardName and then just generically cardName, if the user has decided to override every printing. Most-to-least specific.


Took 2 minutes

Took 8 seconds

* Fixups.

Took 2 minutes

* Even more naming schemes.

Took 6 minutes

* Finally yeet the bug warning in PrintingSelector

Took 3 minutes

* Adjust to PrintingInfo change.

Took 5 minutes

* Don't use suffixes.

Took 7 minutes

Took 9 seconds

* Comments.

Took 2 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2025-07-15 05:07:03 +02:00 committed by GitHub
parent 2267d38352
commit ee4ff6e732
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 68 additions and 91 deletions

View file

@ -24,19 +24,19 @@ public:
private:
QString picsPath, customPicsPath;
bool overrideAllCardArtWithPersonalPreference;
QMultiHash<QString, QString> customFolderIndex; // multimap of cardName to picPaths
QTimer *refreshTimer;
void refreshIndex();
QImage
tryLoadCardImageFromDisk(const QString &setName, const QString &correctedCardName, bool searchCustomPics) const;
QImage tryLoadCardImageFromDisk(const QString &setName,
const QString &correctedCardName,
const QString &collectorNumber,
const QString &providerId) const;
private slots:
void picsPathChanged();
void setOverrideAllCardArtWithPersonalPreference(bool _overrideAllCardArtWithPersonalPreference);
};
#endif // PICTURE_LOADER_LOCAL_H