mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
[DeckListModel] add getCardNodes method (#6484)
* [DeckListModel] add getCardNodes method * Update one usage
This commit is contained in:
parent
73cc0541f5
commit
84aefda486
3 changed files with 17 additions and 1 deletions
|
|
@ -637,6 +637,16 @@ QList<ExactCard> DeckListModel::getCardsForZone(const QString &zoneName) const
|
|||
return cardNodesToExactCards(nodes);
|
||||
}
|
||||
|
||||
QList<const DecklistCardNode *> DeckListModel::getCardNodes() const
|
||||
{
|
||||
return deckList->getCardNodes();
|
||||
}
|
||||
|
||||
QList<const DecklistCardNode *> DeckListModel::getCardNodesForZone(const QString &zoneName) const
|
||||
{
|
||||
return deckList->getCardNodes({zoneName});
|
||||
}
|
||||
|
||||
QList<QString> DeckListModel::getCardNames() const
|
||||
{
|
||||
auto nodes = deckList->getCardNodes();
|
||||
|
|
|
|||
|
|
@ -339,6 +339,12 @@ public:
|
|||
[[nodiscard]] QList<ExactCard> getCards() const;
|
||||
[[nodiscard]] QList<ExactCard> getCardsForZone(const QString &zoneName) const;
|
||||
|
||||
/**
|
||||
* @brief Gets a list of all card nodes in the deck.
|
||||
*/
|
||||
[[nodiscard]] QList<const DecklistCardNode *> getCardNodes() const;
|
||||
[[nodiscard]] QList<const DecklistCardNode *> getCardNodesForZone(const QString &zoneName) const;
|
||||
|
||||
/**
|
||||
* @brief Gets a deduplicated list of all card names that appear in the model
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue