Adding a way to see how many of each type

This commit is contained in:
Zach H 2014-12-08 17:18:21 -05:00
parent ef8bd60a32
commit b738428941

View file

@ -180,9 +180,11 @@ void DeckViewCardContainer::paint(QPainter *painter, const QStyleOptionGraphicsI
qreal thisRowHeight = CARD_HEIGHT * currentRowsAndCols[i].first;
QRectF textRect(0, yUntilNow, totalTextWidth, thisRowHeight);
yUntilNow += thisRowHeight + paddingY;
QString displayString = QString("%1\n(%2)").arg(cardTypeList[i]).arg(cardsByType.count(cardTypeList[i]));
painter->setPen(Qt::white);
painter->drawText(textRect, Qt::AlignHCenter | Qt::AlignVCenter | Qt::TextSingleLine, cardTypeList[i]);
painter->drawText(textRect, Qt::AlignHCenter | Qt::AlignVCenter, displayString);
}
}