mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 11:38:49 -07:00
* 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>
40 lines
957 B
C++
40 lines
957 B
C++
#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
|