Cockatrice 2026-06-01-Development-3.1.0-beta.3
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
PlayerGraphicsItem Class Reference

#include <player_graphics_item.h>

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

Public Types

enum  { Type = typeOther }

Public Slots

void onPlayerActiveChanged (bool _active)
void onCounterAdded (CounterState *state)
void onCounterRemoved (int counterId)
void rearrangeCounters ()
void retranslateUi ()

Signals

void sizeChanged ()
void playerCountChanged ()

Public Member Functions

int type () const override
 PlayerGraphicsItem (PlayerLogic *player)
void initializeZones ()
QRectF boundingRect () const override
qreal getMinimumWidth () const
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void processSceneSizeChange (int newPlayerWidth)
void setMirrored (bool _mirrored)
bool getMirrored () const
GameScenegetGameScene () const
PlayerLogicgetPlayer () const
PlayerAreagetPlayerArea () const
PlayerTargetgetPlayerTarget () const
PileZonegetDeckZoneGraphicsItem () const
PileZonegetSideboardZoneGraphicsItem () const
PileZonegetGraveyardZoneGraphicsItem () const
PileZonegetRfgZoneGraphicsItem () const
TableZonegetTableZoneGraphicsItem () const
StackZonegetStackZoneGraphicsItem () const
HandZonegetHandZoneGraphicsItem () const

Static Public Attributes

static constexpr int counterAreaWidth = 55

Private Slots

void updateBoundingRect ()
void rearrangeZones ()

Private Attributes

PlayerLogicplayer
PlayerAreaplayerArea
PlayerTargetplayerTarget
QMap< int, AbstractCounter * > counterWidgets
PileZonedeckZoneGraphicsItem
PileZonesideboardGraphicsItem
PileZonegraveyardZoneGraphicsItem
PileZonerfgZoneGraphicsItem
TableZonetableZoneGraphicsItem
StackZonestackZoneGraphicsItem
HandZonehandZoneGraphicsItem
QRectF bRect
bool mirrored
bool handVisible = false

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ PlayerGraphicsItem()

PlayerGraphicsItem::PlayerGraphicsItem ( PlayerLogic * player)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

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

◆ getDeckZoneGraphicsItem()

PileZone * PlayerGraphicsItem::getDeckZoneGraphicsItem ( ) const
inlinenodiscard

◆ getGameScene()

GameScene * PlayerGraphicsItem::getGameScene ( ) const
inline
Here is the caller graph for this function:

◆ getGraveyardZoneGraphicsItem()

PileZone * PlayerGraphicsItem::getGraveyardZoneGraphicsItem ( ) const
inlinenodiscard

◆ getHandZoneGraphicsItem()

HandZone * PlayerGraphicsItem::getHandZoneGraphicsItem ( ) const
inlinenodiscard

◆ getMinimumWidth()

qreal PlayerGraphicsItem::getMinimumWidth ( ) const
Here is the call graph for this function:

◆ getMirrored()

bool PlayerGraphicsItem::getMirrored ( ) const
inline

◆ getPlayer()

PlayerLogic * PlayerGraphicsItem::getPlayer ( ) const
inline

◆ getPlayerArea()

PlayerArea * PlayerGraphicsItem::getPlayerArea ( ) const
inline

◆ getPlayerTarget()

PlayerTarget * PlayerGraphicsItem::getPlayerTarget ( ) const
inline

◆ getRfgZoneGraphicsItem()

PileZone * PlayerGraphicsItem::getRfgZoneGraphicsItem ( ) const
inlinenodiscard

◆ getSideboardZoneGraphicsItem()

PileZone * PlayerGraphicsItem::getSideboardZoneGraphicsItem ( ) const
inlinenodiscard

◆ getStackZoneGraphicsItem()

StackZone * PlayerGraphicsItem::getStackZoneGraphicsItem ( ) const
inlinenodiscard

◆ getTableZoneGraphicsItem()

TableZone * PlayerGraphicsItem::getTableZoneGraphicsItem ( ) const
inlinenodiscard

◆ initializeZones()

void PlayerGraphicsItem::initializeZones ( )
Here is the call graph for this function:

◆ onCounterAdded

void PlayerGraphicsItem::onCounterAdded ( CounterState * state)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCounterRemoved

void PlayerGraphicsItem::onCounterRemoved ( int counterId)
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onPlayerActiveChanged

void PlayerGraphicsItem::onPlayerActiveChanged ( bool _active)
slot
Here is the caller graph for this function:

◆ paint()

void PlayerGraphicsItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )
override

◆ playerCountChanged

void PlayerGraphicsItem::playerCountChanged ( )
signal

◆ processSceneSizeChange()

void PlayerGraphicsItem::processSceneSizeChange ( int newPlayerWidth)
Here is the call graph for this function:

◆ rearrangeCounters

void PlayerGraphicsItem::rearrangeCounters ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rearrangeZones

void PlayerGraphicsItem::rearrangeZones ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi

void PlayerGraphicsItem::retranslateUi ( )
slot

◆ setMirrored()

void PlayerGraphicsItem::setMirrored ( bool _mirrored)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sizeChanged

void PlayerGraphicsItem::sizeChanged ( )
signal
Here is the caller graph for this function:

◆ type()

int PlayerGraphicsItem::type ( ) const
inlineoverride

◆ updateBoundingRect

void PlayerGraphicsItem::updateBoundingRect ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bRect

QRectF PlayerGraphicsItem::bRect
private

◆ counterAreaWidth

int PlayerGraphicsItem::counterAreaWidth = 55
staticconstexpr

◆ counterWidgets

QMap<int, AbstractCounter *> PlayerGraphicsItem::counterWidgets
private

◆ deckZoneGraphicsItem

PileZone* PlayerGraphicsItem::deckZoneGraphicsItem
private

◆ graveyardZoneGraphicsItem

PileZone* PlayerGraphicsItem::graveyardZoneGraphicsItem
private

◆ handVisible

bool PlayerGraphicsItem::handVisible = false
private

◆ handZoneGraphicsItem

HandZone* PlayerGraphicsItem::handZoneGraphicsItem
private

◆ mirrored

bool PlayerGraphicsItem::mirrored
private

◆ player

PlayerLogic* PlayerGraphicsItem::player
private

◆ playerArea

PlayerArea* PlayerGraphicsItem::playerArea
private

◆ playerTarget

PlayerTarget* PlayerGraphicsItem::playerTarget
private

◆ rfgZoneGraphicsItem

PileZone* PlayerGraphicsItem::rfgZoneGraphicsItem
private

◆ sideboardGraphicsItem

PileZone* PlayerGraphicsItem::sideboardGraphicsItem
private

◆ stackZoneGraphicsItem

StackZone* PlayerGraphicsItem::stackZoneGraphicsItem
private

◆ tableZoneGraphicsItem

TableZone* PlayerGraphicsItem::tableZoneGraphicsItem
private

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