mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
26 lines
605 B
C++
26 lines
605 B
C++
#ifndef COUNTER_H
|
|
#define COUNTER_H
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
class Player;
|
|
|
|
class Counter : public QGraphicsItem {
|
|
private:
|
|
QString name;
|
|
QColor color;
|
|
int value;
|
|
protected:
|
|
Player *player;
|
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
|
public:
|
|
Counter(Player *_player, const QString &_name, QColor _color, int _value, QGraphicsItem *parent = 0);
|
|
QRectF boundingRect() const;
|
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
|
|
|
QString getName() const { return name; }
|
|
int getValue() const { return value; }
|
|
void setValue(int _value);
|
|
};
|
|
|
|
#endif
|