mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 02:23:55 -07:00
Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby (#6030)
* Add the option to load decklists from Archidekt, Deckstats, Moxfield, TappedOut in deck editor and lobby. Took 3 hours 34 minutes Took 9 seconds Took 12 seconds * Properly set quantities. Took 11 minutes * Warnings. Took 5 minutes * Static regexes. Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com> * Category loggings and better warnings. Took 18 minutes Took 42 seconds * use loadFromStream_Plain instead of manually adding CardNodes to the DeckList. Took 30 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
parent
83b90d472f
commit
e05dad4267
13 changed files with 444 additions and 3 deletions
40
cockatrice/src/dialogs/dlg_load_deck_from_website.h
Normal file
40
cockatrice/src/dialogs/dlg_load_deck_from_website.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef DLG_LOAD_DECK_FROM_WEBSITE_H
|
||||
#define DLG_LOAD_DECK_FROM_WEBSITE_H
|
||||
|
||||
#include "../client/network/parsers/deck_link_to_api_transformer.h"
|
||||
#include "../client/network/parsers/interface_json_deck_parser.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
inline Q_LOGGING_CATEGORY(DlgLoadDeckFromWebsiteLog, "dlg_load_deck_from_website");
|
||||
|
||||
class DlgLoadDeckFromWebsite : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgLoadDeckFromWebsite(QWidget *parent);
|
||||
void retranslateUi();
|
||||
bool testValidUrl();
|
||||
DeckLoader *deck;
|
||||
|
||||
DeckLoader *getDeck()
|
||||
{
|
||||
return deck;
|
||||
}
|
||||
|
||||
private:
|
||||
QNetworkAccessManager *nam;
|
||||
QVBoxLayout *layout;
|
||||
QLabel *instructionLabel;
|
||||
QLineEdit *urlEdit;
|
||||
|
||||
public slots:
|
||||
void accept() override;
|
||||
QSharedPointer<IJsonDeckParser> createParserForProvider(DeckProvider provider);
|
||||
};
|
||||
|
||||
#endif // DLG_LOAD_DECK_FROM_WEBSITE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue