mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
[DeckListModel] add getCardNodes method
This commit is contained in:
parent
73cc0541f5
commit
b8af0c3c88
2 changed files with 16 additions and 0 deletions
|
|
@ -637,6 +637,16 @@ QList<ExactCard> DeckListModel::getCardsForZone(const QString &zoneName) const
|
||||||
return cardNodesToExactCards(nodes);
|
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
|
QList<QString> DeckListModel::getCardNames() const
|
||||||
{
|
{
|
||||||
auto nodes = deckList->getCardNodes();
|
auto nodes = deckList->getCardNodes();
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,12 @@ public:
|
||||||
[[nodiscard]] QList<ExactCard> getCards() const;
|
[[nodiscard]] QList<ExactCard> getCards() const;
|
||||||
[[nodiscard]] QList<ExactCard> getCardsForZone(const QString &zoneName) 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
|
* @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