mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
improved importer
This commit is contained in:
parent
aae2c437d6
commit
3c8f2b878b
9 changed files with 160 additions and 93 deletions
|
|
@ -9,12 +9,15 @@ class QBuffer;
|
|||
class SetToDownload {
|
||||
private:
|
||||
QString shortName, longName, url;
|
||||
bool import;
|
||||
public:
|
||||
const QString &getShortName() const { return shortName; }
|
||||
const QString &getLongName() const { return longName; }
|
||||
const QString &getUrl() const { return url; }
|
||||
SetToDownload(const QString &_shortName, const QString &_longName, const QString &_url)
|
||||
: shortName(_shortName), longName(_longName), url(_url) { }
|
||||
bool getImport() const { return import; }
|
||||
void setImport(bool _import) { qDebug(QString("%1: setting import to %2").arg(getShortName()).arg(_import).toUtf8()); import = _import; }
|
||||
SetToDownload(const QString &_shortName, const QString &_longName, const QString &_url, bool _import)
|
||||
: shortName(_shortName), longName(_longName), url(_url), import(_import) { }
|
||||
};
|
||||
|
||||
class OracleImporter : public CardDatabase {
|
||||
|
|
@ -41,6 +44,7 @@ public:
|
|||
int importTextSpoiler(CardSet *set, const QByteArray &data);
|
||||
void downloadNextFile();
|
||||
int getSetsCount() const { return setsToDownload.size(); }
|
||||
QList<SetToDownload> &getSets() { return setsToDownload; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue