improved counters

This commit is contained in:
Max-Wilhelm Bruker 2009-04-13 17:54:18 +02:00
parent 939ab62273
commit 3388804e8f
18 changed files with 158 additions and 80 deletions

View file

@ -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