mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
foo
This commit is contained in:
parent
175512a2ad
commit
bb30012fbb
4 changed files with 31 additions and 25 deletions
|
|
@ -13,16 +13,14 @@ QRectF Counter::boundingRect() const
|
|||
return QRectF(0, 0, 40, 40);
|
||||
}
|
||||
|
||||
void Counter::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
void Counter::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget */*widget*/)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
painter->save();
|
||||
painter->setBrush(QBrush(color));
|
||||
painter->drawEllipse(boundingRect());
|
||||
if (value) {
|
||||
painter->setFont(QFont("Times", 16, QFont::Bold));
|
||||
painter->drawText(boundingRect(), Qt::AlignCenter, QString("%1").arg(value));
|
||||
painter->drawText(boundingRect(), Qt::AlignCenter, QString::number(value));
|
||||
}
|
||||
painter->restore();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue