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

#include <card_drag_item.h>

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

Public Member Functions

 CardDragItem (CardItem *_item, int _id, const QPointF &_hotSpot, bool _faceDown, AbstractCardDragItem *parentDrag=0)
int getId () const
bool getFaceDown () const
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void updatePosition (const QPointF &cursorScenePos) override
Public Member Functions inherited from AbstractCardDragItem
int type () const override
 AbstractCardDragItem (AbstractCardItem *_item, const QPointF &_hotSpot, AbstractCardDragItem *parentDrag=0)
QRectF boundingRect () const override
QPainterPath shape () const override
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
AbstractCardItemgetItem () const
QPointF getHotSpot () const
void addChildDrag (AbstractCardDragItem *child)

Protected Member Functions

void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
Protected Member Functions inherited from AbstractCardDragItem
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override

Private Attributes

int id
bool faceDown
bool occupied
CardZonecurrentZone

Additional Inherited Members

Public Types inherited from AbstractCardDragItem
enum  { Type = typeCardDrag }
Protected Attributes inherited from AbstractCardDragItem
AbstractCardItemitem
QPointF hotSpot
QList< AbstractCardDragItem * > childDrags

Constructor & Destructor Documentation

◆ CardDragItem()

CardDragItem::CardDragItem ( CardItem * _item,
int _id,
const QPointF & _hotSpot,
bool _faceDown,
AbstractCardDragItem * parentDrag = 0 )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ getFaceDown()

bool CardDragItem::getFaceDown ( ) const
inline

◆ getId()

int CardDragItem::getId ( ) const
inline

◆ mouseReleaseEvent()

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

◆ paint()

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

◆ updatePosition()

void CardDragItem::updatePosition ( const QPointF & cursorScenePos)
overridevirtual

Implements AbstractCardDragItem.

Here is the call graph for this function:

Member Data Documentation

◆ currentZone

CardZone* CardDragItem::currentZone
private

◆ faceDown

bool CardDragItem::faceDown
private

◆ id

int CardDragItem::id
private

◆ occupied

bool CardDragItem::occupied
private

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