mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Refactor: use ExactCard to represent specific printings (#6049)
* Create new class * Update CardInfo and CardDatabase * Use new class instead of CardInfoPtr * fix cmake
This commit is contained in:
parent
4a2a646943
commit
ae2c55c33b
79 changed files with 715 additions and 642 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef DECKLISTMODEL_H
|
||||
#define DECKLISTMODEL_H
|
||||
|
||||
#include "../game/cards/card_info.h"
|
||||
#include "../game/cards/exact_card.h"
|
||||
#include "decklist.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
|
|
@ -111,10 +111,7 @@ public:
|
|||
const QString &providerId = "",
|
||||
const QString &cardNumber = "") const;
|
||||
QModelIndex addPreferredPrintingCard(const QString &cardName, const QString &zoneName, bool abAddAnyway);
|
||||
QModelIndex addCard(const ::QString &cardName,
|
||||
const PrintingInfo &printingInfo,
|
||||
const QString &zoneName,
|
||||
bool abAddAnyway = false);
|
||||
QModelIndex addCard(const ExactCard &card, const QString &zoneName);
|
||||
int findSortedInsertRow(InnerDecklistNode *parent, CardInfoPtr cardInfo) const;
|
||||
void sort(int column, Qt::SortOrder order) override;
|
||||
void cleanList();
|
||||
|
|
@ -123,8 +120,8 @@ public:
|
|||
return deckList;
|
||||
}
|
||||
void setDeckList(DeckLoader *_deck);
|
||||
QList<CardInfoPtr> getCardsAsCardInfoPtrs() const;
|
||||
QList<CardInfoPtr> getCardsAsCardInfoPtrsForZone(QString zoneName) const;
|
||||
QList<ExactCard> getCards() const;
|
||||
QList<ExactCard> getCardsForZone(const QString &zoneName) const;
|
||||
QList<QString> *getZones() const;
|
||||
void setActiveGroupCriteria(DeckListModelGroupCriteria newCriteria);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue