card tap/untap animation; misc fixes

This commit is contained in:
Max-Wilhelm Bruker 2010-10-07 17:18:15 +02:00
parent 28a77f10e4
commit db2c2d1b15
9 changed files with 98 additions and 38 deletions

View file

@ -5,6 +5,7 @@
class CardInfo;
class Player;
class QTimer;
const int CARD_WIDTH = 72;
const int CARD_HEIGHT = 102;
@ -15,8 +16,12 @@ protected:
CardInfo *info;
QString name;
bool tapped;
int tapAngle;
QString color;
private:
QTimer *animationTimer;
private slots:
void animationEvent();
void pixmapUpdated();
signals:
void hovered(AbstractCardItem *card);
@ -33,7 +38,7 @@ public:
QString getColor() const { return color; }
void setColor(const QString &_color);
bool getTapped() const { return tapped; }
void setTapped(bool _tapped);
void setTapped(bool _tapped, bool canAnimate = false);
void processHoverEvent();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);