[DeckListModel] add getCardNodes method

This commit is contained in:
RickyRister 2026-01-02 00:05:30 -08:00
parent 73cc0541f5
commit b8af0c3c88
2 changed files with 16 additions and 0 deletions

View file

@ -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();

View file

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