1 #ifndef PILEZONE_H
2 #define PILEZONE_H
3 
4 #include "cardzone.h"
5 
6 class PileZone : public CardZone
7 {
8     Q_OBJECT
9 private slots:
callUpdate()10     void callUpdate()
11     {
12         update();
13     }
14 
15 public:
16     PileZone(Player *_p,
17              const QString &_name,
18              bool _isShufflable,
19              bool _contentsKnown,
20              QGraphicsItem *parent = nullptr);
21     QRectF boundingRect() const;
22     void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
23     void reorganizeCards();
24     void handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone *startZone, const QPoint &dropPoint);
25 
26 protected:
27     void mousePressEvent(QGraphicsSceneMouseEvent *event);
28     void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
29     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
30     void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
31     void addCardImpl(CardItem *card, int x, int y);
32 };
33 
34 #endif
35