From b7384289418a40aa719dee2a7a3487f622c36f68 Mon Sep 17 00:00:00 2001 From: Zach H Date: Mon, 8 Dec 2014 17:18:21 -0500 Subject: [PATCH] Adding a way to see how many of each type --- cockatrice/src/deckview.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/deckview.cpp b/cockatrice/src/deckview.cpp index 101a2a1156..2c5d390d31 100644 --- a/cockatrice/src/deckview.cpp +++ b/cockatrice/src/deckview.cpp @@ -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); } }