Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
PileZone Class Reference

#include <pile_zone.h>

Inheritance diagram for PileZone:
[legend]
Collaboration diagram for PileZone:
[legend]

Public Member Functions

 PileZone (PileZoneLogic *_logic, QGraphicsItem *parent)
QRectF boundingRect () const override
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
Public Member Functions inherited from CardZone
int type () const override
 CardZone (CardZoneLogic *logic, QGraphicsItem *parent=nullptr)
void retranslateUi ()
CardZoneLogicgetLogic () const
void setMenu (QMenu *_menu, QAction *_doubleClickAction=0)
Public Member Functions inherited from AbstractGraphicsItem
 AbstractGraphicsItem (QGraphicsItem *parent=nullptr)

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
Protected Member Functions inherited from CardZone
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
virtual QPointF closestGridPoint (const QPointF &point)
QMenu * getMenu () const
Protected Member Functions inherited from AbstractGraphicsItem
void paintNumberEllipse (int number, int radius, const QColor &color, int position, int count, QPainter *painter)

Private Slots

void callUpdate ()

Additional Inherited Members

Public Types inherited from CardZone
enum  { Type = typeZone }
Public Slots inherited from CardZone
bool showContextMenu (const QPoint &screenPos)
void onCardAdded (CardItem *addedCard)
Protected Attributes inherited from CardZone
QMenu * menu
QAction * doubleClickAction

Detailed Description

A CardZone where the cards are in a single pile instead of being laid out. Usually only top card is accessible by clicking.

Constructor & Destructor Documentation

◆ PileZone()

PileZone::PileZone ( PileZoneLogic * _logic,
QGraphicsItem * parent )
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF PileZone::boundingRect ( ) const
nodiscardoverride
Here is the caller graph for this function:

◆ callUpdate

void PileZone::callUpdate ( )
inlineprivateslot

◆ handleDropEvent()

void PileZone::handleDropEvent ( const QList< CardDragItem * > & dragItems,
CardZoneLogic * startZone,
const QPoint & dropPoint )
overridevirtual

Implements CardZone.

Here is the call graph for this function:

◆ hoverEnterEvent()

void PileZone::hoverEnterEvent ( QGraphicsSceneHoverEvent * event)
overrideprotected
Here is the call graph for this function:

◆ mouseMoveEvent()

void PileZone::mouseMoveEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ mousePressEvent()

void PileZone::mousePressEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ mouseReleaseEvent()

void PileZone::mouseReleaseEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected

◆ paint()

void PileZone::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )
override
Here is the call graph for this function:

◆ reorganizeCards()

void PileZone::reorganizeCards ( )
overridevirtual

Implements CardZone.

◆ shape()

QPainterPath PileZone::shape ( ) const
nodiscardoverride
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: