More performant display updating.

This commit is contained in:
Lukas Brübach 2025-03-01 21:31:31 +01:00
parent 12f8f1a533
commit 063072270d
17 changed files with 349 additions and 247 deletions

View file

@ -552,6 +552,26 @@ QList<CardInfoPtr> *DeckListModel::getCardsAsCardInfoPtrsForZone(QString zoneNam
return cards;
}
QList<QString> *DeckListModel::getZones() const
{
QList<QString> *zones = new QList<QString>();
DeckList *decklist = getDeckList();
if (!decklist) {
return zones;
}
InnerDecklistNode *listRoot = decklist->getRoot();
if (!listRoot)
return zones;
for (int i = 0; i < listRoot->size(); i++) {
InnerDecklistNode *currentZone = dynamic_cast<InnerDecklistNode *>(listRoot->at(i));
if (!currentZone)
continue;
zones->append(currentZone->getName());
}
return zones;
}
void DeckListModel::printDeckListNode(QTextCursor *cursor, InnerDecklistNode *node)
{
const int totalColumns = 2;