mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 03:53:56 -07:00
reworked in-game avatar display
This commit is contained in:
parent
72223b3229
commit
02f2fb9764
15 changed files with 253 additions and 94 deletions
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef COUNTER_H
|
||||
#define COUNTER_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
|
||||
class Player;
|
||||
class QMenu;
|
||||
class QAction;
|
||||
|
||||
class Counter : public QObject, public QGraphicsItem {
|
||||
Q_OBJECT
|
||||
private:
|
||||
Player *player;
|
||||
int id;
|
||||
QString name;
|
||||
QColor color;
|
||||
int radius;
|
||||
int value;
|
||||
|
||||
QAction *aSet, *aDec, *aInc;
|
||||
QMenu *menu;
|
||||
bool dialogSemaphore, deleteAfterDialog;
|
||||
private slots:
|
||||
void incrementCounter();
|
||||
void setCounter();
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
public:
|
||||
Counter(Player *_player, int _id, const QString &_name, QColor _color, int _radius, int _value, QGraphicsItem *parent = 0);
|
||||
~Counter();
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
QMenu *getMenu() const { return menu; }
|
||||
void retranslateUi();
|
||||
|
||||
int getId() const { return id; }
|
||||
QString getName() const { return name; }
|
||||
int getValue() const { return value; }
|
||||
void setValue(int _value);
|
||||
void delCounter();
|
||||
|
||||
void setShortcutsActive();
|
||||
void setShortcutsInactive();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue