improved importer

This commit is contained in:
Max-Wilhelm Bruker 2009-10-17 17:13:55 +02:00
parent aae2c437d6
commit 3c8f2b878b
9 changed files with 160 additions and 93 deletions

View file

@ -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