mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212)
--------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
parent
be1403c920
commit
1ef07309d6
605 changed files with 3812 additions and 3408 deletions
|
|
@ -1,29 +0,0 @@
|
|||
#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");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue