Cockatrice/cockatrice/src/game_graphics/zones/hand_zone.h
BruebachL 345b0e8ba9
[Refactor] Move game logic into libcockatrice_game (#7437)
* [Refactor] Move game logic into libcockatrice_game

* [Refactor] Include card_state.h in player_actions.h

* [Game] Inject settings providers into libcockatrice_game, drop Widgets

* [Game] Follow base rename to createCardRequested after rebase

* [Game] Drop unused CardItem forward declaration

* [Game] Fix includes after moving game logic into libcockatrice_game

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-10-31 18:44:15 +01:00

42 lines
1.1 KiB
C++

/**
* @file hand_zone.h
* @ingroup GameGraphicsZones
* @brief Graphical zone for the player's hand, supporting horizontal and vertical layouts.
*/
#ifndef HANDZONE_H
#define HANDZONE_H
#include "select_zone.h"
#include <QtGlobal>
#include <libcockatrice/game/board/card_list.h>
#include <qtmetamacros.h>
class HandZoneLogic;
class QGraphicsItem;
template <typename T> class QList;
class HandZone : public SelectZone
{
Q_OBJECT
private:
qreal width = 0.0;
qreal zoneHeight;
private slots:
void updateBg();
public slots:
void updateOrientation();
public:
HandZone(HandZoneLogic *_logic, int _zoneHeight, QGraphicsItem *parent = nullptr);
void
handleDropEvent(const QList<CardDragItem *> &dragItems, CardZoneLogic *startZone, const QPoint &dropPoint) override;
QRectF boundingRect() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
void reorganizeCards() override;
void sortHand(const QList<CardList::SortOption> &options);
void setWidth(qreal _width);
};
#endif