servatrice/cockatrice/src/deckstats_interface.h
Waleed Khan 359882917a Merge remote-tracking branch 'upstream/master'
Some tabs to spaces, and maybe fixed to work with Qt 5.

Conflicts:
	cockatrice/src/deckstats_interface.cpp
	common/decklist.cpp
	common/decklist.h
	oracle/src/oracleimporter.cpp
2014-07-20 14:40:18 -04:00

35 lines
876 B
C++

#ifndef DECKSTATS_INTERFACE_H
#define DECKSTATS_INTERFACE_H
#include "carddatabase.h"
#include "decklist.h"
#include <QObject>
class QByteArray;
class QNetworkAccessManager;
class QNetworkReply;
class DeckList;
class DeckStatsInterface : public QObject {
Q_OBJECT
private:
QNetworkAccessManager *manager;
CardDatabase &cardDatabase;
/**
* Deckstats doesn't recognize token cards, and instead tries to find the
* closest non-token card instead. So we construct a new deck which has no
* tokens.
*/
void copyDeckWithoutTokens(const DeckList &source, DeckList& destination);
private slots:
void queryFinished(QNetworkReply *reply);
void getAnalyzeRequestData(DeckList *deck, QByteArray *data);
public:
DeckStatsInterface(CardDatabase &_cardDatabase, QObject *parent = 0);
void analyzeDeck(DeckList *deck);
};
#endif