mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 08:03:54 -07:00
improved counters
This commit is contained in:
parent
939ab62273
commit
3388804e8f
18 changed files with 158 additions and 80 deletions
|
|
@ -1,14 +1,19 @@
|
|||
#ifndef PLAYERAREA_H
|
||||
#define PLAYERAREA_H
|
||||
|
||||
#include <QList>
|
||||
#include "carditem.h"
|
||||
|
||||
class Player;
|
||||
class Counter;
|
||||
|
||||
class PlayerArea : public QGraphicsItem {
|
||||
private:
|
||||
QRectF bRect;
|
||||
Player *player;
|
||||
QList<Counter *> counterList;
|
||||
|
||||
void rearrangeCounters();
|
||||
public:
|
||||
enum { Type = typeOther };
|
||||
int type() const { return Type; }
|
||||
|
|
@ -16,6 +21,11 @@ public:
|
|||
~PlayerArea();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
Counter *getCounter(const QString &name, bool remove = false);
|
||||
void addCounter(const QString &name, QColor color, int value);
|
||||
void delCounter(const QString &name);
|
||||
void clearCounters();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue