Cockatrice 2026-06-27-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 onCustomZoneAdded (QString customZoneName)
void onCounterAdded (CounterState *state)
void onCounterRemoved (int counterId)
void rearrangeCounters ()
void retranslateUi ()

Signals

void sizeChanged ()
void playerCountChanged ()
void mirroredChanged (bool isMirrored)
void cardInfoRequested (const CardRef &cardRef)

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
PlayerLogicgetLogic () const
PlayerMenugetPlayerMenu () const
PlayerAreagetPlayerArea () const
PlayerTargetgetPlayerTarget () const
CardZonegetZoneGraphicsItem (const QString &name) 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
PlayerMenuplayerMenu
PlayerDialogsplayerDialogs
PlayerAreaplayerArea
PlayerTargetplayerTarget
QMap< int, AbstractCounter * > counterWidgets
QMap< QString, CardZone * > zoneGraphicsItems
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:

◆ cardInfoRequested

void PlayerGraphicsItem::cardInfoRequested ( const CardRef & cardRef)
signal
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

◆ getLogic()

PlayerLogic * PlayerGraphicsItem::getLogic ( ) const
inline
Here is the caller graph for this function:

◆ getMinimumWidth()

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

◆ getMirrored()

bool PlayerGraphicsItem::getMirrored ( ) const
inline

◆ getPlayerArea()

PlayerArea * PlayerGraphicsItem::getPlayerArea ( ) const
inline

◆ getPlayerMenu()

PlayerMenu * PlayerGraphicsItem::getPlayerMenu ( ) const
inlinenodiscard

◆ 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

◆ getZoneGraphicsItem()

CardZone * PlayerGraphicsItem::getZoneGraphicsItem ( const QString & name) const
inline

◆ initializeZones()

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

◆ mirroredChanged

void PlayerGraphicsItem::mirroredChanged ( bool isMirrored)
signal
Here is the caller 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:

◆ onCustomZoneAdded

void PlayerGraphicsItem::onCustomZoneAdded ( QString customZoneName)
slot
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
Here is the caller graph for this function:

◆ 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

◆ playerDialogs

PlayerDialogs* PlayerGraphicsItem::playerDialogs
private

◆ playerMenu

PlayerMenu* PlayerGraphicsItem::playerMenu
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

◆ zoneGraphicsItems

QMap<QString, CardZone *> PlayerGraphicsItem::zoneGraphicsItems
private

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