remove all of pricing

This commit is contained in:
Zach H 2017-04-29 19:56:49 -04:00
parent 36f6907fa3
commit 16bc8b764b
13 changed files with 10 additions and 445 deletions

View file

@ -39,7 +39,7 @@ public:
void setMoveList(const QList<MoveCard_ToZone> &_moveList);
};
enum DeckSortMethod { ByNumber, ByName, ByPrice };
enum DeckSortMethod { ByNumber, ByName };
class AbstractDecklistNode {
protected:
@ -76,11 +76,9 @@ public:
AbstractDecklistNode *findChild(const QString &name);
int height() const;
int recursiveCount(bool countTotalCards = false) const;
float recursivePrice(bool countTotalCards = false) const;
bool compare(AbstractDecklistNode *other) const;
bool compareNumber(AbstractDecklistNode *other) const;
bool compareName(AbstractDecklistNode *other) const;
bool comparePrice(AbstractDecklistNode *other) const;
QVector<QPair<int, int> > sort(Qt::SortOrder order = Qt::AscendingOrder);
bool readElement(QXmlStreamReader *xml);
@ -94,14 +92,10 @@ public:
virtual void setNumber(int _number) = 0;
virtual QString getName() const = 0;
virtual void setName(const QString &_name) = 0;
virtual float getPrice() const = 0;
virtual void setPrice(const float _price) = 0;
float getTotalPrice() const { return getNumber() * getPrice(); }
int height() const { return 0; }
bool compare(AbstractDecklistNode *other) const;
bool compareNumber(AbstractDecklistNode *other) const;
bool compareName(AbstractDecklistNode *other) const;
bool compareTotalPrice(AbstractDecklistNode *other) const;
bool readElement(QXmlStreamReader *xml);
void writeElement(QXmlStreamWriter *xml);
@ -111,16 +105,13 @@ class DecklistCardNode : public AbstractDecklistCardNode {
private:
QString name;
int number;
float price;
public:
DecklistCardNode(const QString &_name = QString(), int _number = 1, float _price = 0, InnerDecklistNode *_parent = 0) : AbstractDecklistCardNode(_parent), name(_name), number(_number), price(_price) { }
DecklistCardNode(const QString &_name = QString(), int _number = 1, InnerDecklistNode *_parent = 0) : AbstractDecklistCardNode(_parent), name(_name), number(_number) { }
DecklistCardNode(DecklistCardNode *other, InnerDecklistNode *_parent);
int getNumber() const { return number; }
void setNumber(int _number) { number = _number; }
QString getName() const { return name; }
void setName(const QString &_name) { name = _name; }
float getPrice() const { return price; }
void setPrice(const float _price) { price = _price; }
};
class DeckList : public QObject {