Turn Card, Deck_List, Protocol, RNG, Server, Settings and Utility into libraries and remove cockatrice_common.

Took 6 hours 3 minutes

Took 31 seconds
This commit is contained in:
Lukas Brübach 2025-10-02 17:41:07 +02:00
parent 3cff55b0bb
commit 1e4e5a4419
593 changed files with 1913 additions and 1601 deletions

View file

@ -0,0 +1,29 @@
#include "download_settings.h"
#include "settings_manager.h"
const QStringList DownloadSettings::DEFAULT_DOWNLOAD_URLS = {
"https://api.scryfall.com/cards/!set:uuid!?format=image&face=!prop:side!",
"https://api.scryfall.com/cards/multiverse/!set:muid!?format=image",
"https://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=!set:muid!&type=card",
"https://gatherer.wizards.com/Handlers/Image.ashx?name=!name!&type=card"};
DownloadSettings::DownloadSettings(const QString &settingPath, QObject *parent = nullptr)
: SettingsManager(settingPath + "downloads.ini", parent)
{
}
void DownloadSettings::setDownloadUrls(const QStringList &downloadURLs)
{
setValue(QVariant::fromValue(downloadURLs), "urls", "downloads");
}
QStringList DownloadSettings::getAllURLs()
{
return getValue("urls", "downloads").toStringList();
}
void DownloadSettings::resetToDefaultURLs()
{
setValue(QVariant::fromValue(DEFAULT_DOWNLOAD_URLS), "urls", "downloads");
}