Cockatrice/cockatrice/src/game/zones/pile_zone.h
BruebachL f8c4f774cf
[Documentation] Sort *every* file into a doxygen group. (#6198)
* Sort *every* file into a doxygen group.

Took 7 hours 9 minutes

Took 18 seconds

Took 2 minutes

* Lint some ingroup definitions.

Took 10 minutes


Took 2 seconds

* Just include the groups in the Doxyfile in this commit.

Took 3 minutes

* Update some group comments so they link!

Took 14 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-30 12:13:32 +02:00

42 lines
1.2 KiB
C++

/**
* @file pile_zone.h
* @ingroup GameGraphicsZones
* @brief TODO: Document this.
*/
#ifndef PILEZONE_H
#define PILEZONE_H
#include "card_zone.h"
#include "logic/pile_zone_logic.h"
/**
* A CardZone where the cards are in a single pile instead of being laid out.
* Usually only top card is accessible by clicking.
*/
class PileZone : public CardZone
{
Q_OBJECT
private slots:
void callUpdate()
{
update();
}
public:
PileZone(PileZoneLogic *_logic, QGraphicsItem *parent);
[[nodiscard]] QRectF boundingRect() const override;
[[nodiscard]] QPainterPath shape() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
void reorganizeCards() override;
void
handleDropEvent(const QList<CardDragItem *> &dragItems, CardZoneLogic *startZone, const QPoint &dropPoint) override;
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
};
#endif