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

#include <deck_view.h>

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

Public Member Functions

 DeckViewCard (QGraphicsItem *parent=nullptr, const CardRef &cardRef={}, const QString &_originZone=QString())
 ~DeckViewCard () override
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
const QString & getOriginZone () const
Public Member Functions inherited from AbstractCardItem
int type () const override
 AbstractCardItem (QGraphicsItem *parent=nullptr, const CardRef &cardRef={}, Player *_owner=nullptr, int _id=-1)
 ~AbstractCardItem () override
QRectF boundingRect () const override
QPainterPath shape () const override
QSizeF getTranslatedSize (QPainter *painter) const
void paintPicture (QPainter *painter, const QSizeF &translatedSize, int angle)
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
ExactCard getCard () const
const CardInfogetCardInfo () const
int getId () const
void setId (int _id)
QString getName () const
QString getProviderId () const
void setCardRef (const CardRef &_cardRef)
CardRef getCardRef () const
qreal getRealZValue () const
void setRealZValue (qreal _zValue)
void setHovered (bool _hovered)
QString getColor () const
void setColor (const QString &_color)
bool getTapped () const
void setTapped (bool _tapped, bool canAnimate=false)
bool getFaceDown () const
void setFaceDown (bool _facedown)
void processHoverEvent ()
void deleteCardInfoPopup ()
Public Member Functions inherited from ArrowTarget
 ArrowTarget (Player *_owner, QGraphicsItem *parent=nullptr)
 ~ArrowTarget () override
PlayergetOwner () const
void setBeingPointedAt (bool _beingPointedAt)
bool getBeingPointedAt () const
const QList< ArrowItem * > & getArrowsFrom () const
void addArrowFrom (ArrowItem *arrow)
void removeArrowFrom (ArrowItem *arrow)
const QList< ArrowItem * > & getArrowsTo () const
void addArrowTo (ArrowItem *arrow)
void removeArrowTo (ArrowItem *arrow)
Public Member Functions inherited from AbstractGraphicsItem
 AbstractGraphicsItem (QGraphicsItem *parent=nullptr)

Protected Member Functions

void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
Protected Member Functions inherited from AbstractCardItem
void transformPainter (QPainter *painter, const QSizeF &translatedSize, int angle)
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
void cacheBgColor ()
Protected Member Functions inherited from ArrowTarget
QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
Protected Member Functions inherited from AbstractGraphicsItem
void paintNumberEllipse (int number, int radius, const QColor &color, int position, int count, QPainter *painter)

Private Attributes

QString originZone
DeckViewCardDragItemdragItem

Additional Inherited Members

Public Types inherited from AbstractCardItem
enum  { Type = typeCard }
Public Slots inherited from AbstractCardItem
void refreshCardInfo ()
Signals inherited from AbstractCardItem
void hovered (AbstractCardItem *card)
void showCardInfoPopup (const QPoint &pos, const CardRef &cardRef)
void deleteCardInfoPopup (QString cardName)
void sigPixmapUpdated ()
void cardShiftClicked (QString cardName)
Protected Attributes inherited from AbstractCardItem
ExactCard exactCard
int id
CardRef cardRef
bool tapped
bool facedown
int tapAngle
QString color
QColor bgColor
Protected Attributes inherited from ArrowTarget
Playerowner

Constructor & Destructor Documentation

◆ DeckViewCard()

DeckViewCard::DeckViewCard ( QGraphicsItem * parent = nullptr,
const CardRef & cardRef = {},
const QString & _originZone = QString() )
explicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~DeckViewCard()

DeckViewCard::~DeckViewCard ( )
override

Member Function Documentation

◆ getOriginZone()

const QString & DeckViewCard::getOriginZone ( ) const
inlinenodiscard

◆ hoverEnterEvent()

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

◆ mouseMoveEvent()

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

◆ paint()

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

Member Data Documentation

◆ dragItem

DeckViewCardDragItem* DeckViewCard::dragItem
private

◆ originZone

QString DeckViewCard::originZone
private

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