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

#include <player.h>

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

Public Slots

void setActive (bool _active)

Signals

void openDeckEditor (DeckLoader *deck)
void deckChanged ()
void newCardAdded (AbstractCardItem *card)
void rearrangeCounters ()
void activeChanged (bool active)
void concededChanged (int playerId, bool conceded)
void clearCustomZonesMenu ()
void addViewCustomZoneActionToCustomZoneMenu (QString zoneName)
void resetTopCardMenuActions ()

Public Member Functions

 Player (const ServerInfo_User &info, int _id, bool _local, bool _judge, AbstractGame *_parent)
void forwardActionSignalsToEventHandler ()
 ~Player () override
void initializeZones ()
void updateZones ()
void clear ()
void processPlayerInfo (const ServerInfo_Player &info)
void processCardAttachment (const ServerInfo_Player &info)
void addCard (CardItem *c)
void deleteCard (CardItem *c)
bool clearCardsToDelete ()
bool getActive () const
AbstractGamegetGame () const
GameScenegetGameScene ()
PlayerGraphicsItemgetGraphicsItem ()
PlayerActionsgetPlayerActions () const
PlayerEventHandlergetPlayerEventHandler () const
PlayerInfogetPlayerInfo () const
PlayerMenugetPlayerMenu () const
void setDeck (DeckLoader &_deck)
DeckLoader * getDeck () const
template<typename T>
T * addZone (T *zone)
CardZoneLogicgetZone (const QString zoneName)
const QMap< QString, CardZoneLogic * > & getZones () const
PileZoneLogicgetDeckZone ()
PileZoneLogicgetGraveZone ()
PileZoneLogicgetRfgZone ()
PileZoneLogicgetSideboardZone ()
TableZoneLogicgetTableZone ()
StackZoneLogicgetStackZone ()
HandZoneLogicgetHandZone ()
AbstractCounteraddCounter (const ServerInfo_Counter &counter)
AbstractCounteraddCounter (int counterId, const QString &name, QColor color, int radius, int value)
void delCounter (int counterId)
void clearCounters ()
void incrementAllCardCounters ()
QMap< int, AbstractCounter * > getCounters ()
ArrowItemaddArrow (const ServerInfo_Arrow &arrow)
ArrowItemaddArrow (int arrowId, CardItem *startCard, ArrowTarget *targetItem, const QColor &color)
void delArrow (int arrowId)
void removeArrow (ArrowItem *arrow)
void clearArrows ()
const QMap< int, ArrowItem * > & getArrows () const
void setConceded (bool _conceded)
bool getConceded () const
void setGameStarted ()
void setDialogSemaphore (const bool _active)
int getZoneId () const
void setZoneId (int _zoneId)

Private Attributes

AbstractGamegame
PlayerInfoplayerInfo
PlayerEventHandlerplayerEventHandler
PlayerActionsplayerActions
PlayerMenuplayerMenu
PlayerGraphicsItemgraphicsItem
bool active
bool conceded
DeckLoader * deck
int zoneId
QMap< QString, CardZoneLogic * > zones
QMap< int, AbstractCounter * > counters
QMap< int, ArrowItem * > arrows
bool dialogSemaphore
QList< CardItem * > cardsToDelete

Constructor & Destructor Documentation

◆ Player()

Player::Player ( const ServerInfo_User & info,
int _id,
bool _local,
bool _judge,
AbstractGame * _parent )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Player()

Player::~Player ( )
override
Here is the call graph for this function:

Member Function Documentation

◆ activeChanged

void Player::activeChanged ( bool active)
signal
Here is the caller graph for this function:

◆ addArrow() [1/2]

ArrowItem * Player::addArrow ( const ServerInfo_Arrow & arrow)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addArrow() [2/2]

ArrowItem * Player::addArrow ( int arrowId,
CardItem * startCard,
ArrowTarget * targetItem,
const QColor & color )
Here is the call graph for this function:

◆ addCard()

void Player::addCard ( CardItem * c)
Here is the call graph for this function:

◆ addCounter() [1/2]

AbstractCounter * Player::addCounter ( const ServerInfo_Counter & counter)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCounter() [2/2]

AbstractCounter * Player::addCounter ( int counterId,
const QString & name,
QColor color,
int radius,
int value )
Here is the call graph for this function:

◆ addViewCustomZoneActionToCustomZoneMenu

void Player::addViewCustomZoneActionToCustomZoneMenu ( QString zoneName)
signal
Here is the caller graph for this function:

◆ addZone()

template<typename T>
T * Player::addZone ( T * zone)
inline
Here is the caller graph for this function:

◆ clear()

void Player::clear ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearArrows()

void Player::clearArrows ( )
Here is the caller graph for this function:

◆ clearCardsToDelete()

bool Player::clearCardsToDelete ( )

◆ clearCounters()

void Player::clearCounters ( )
Here is the caller graph for this function:

◆ clearCustomZonesMenu

void Player::clearCustomZonesMenu ( )
signal
Here is the caller graph for this function:

◆ concededChanged

void Player::concededChanged ( int playerId,
bool conceded )
signal
Here is the caller graph for this function:

◆ deckChanged

void Player::deckChanged ( )
signal
Here is the caller graph for this function:

◆ delArrow()

void Player::delArrow ( int arrowId)
Here is the call graph for this function:

◆ delCounter()

void Player::delCounter ( int counterId)
Here is the call graph for this function:

◆ deleteCard()

void Player::deleteCard ( CardItem * c)
Here is the call graph for this function:

◆ forwardActionSignalsToEventHandler()

void Player::forwardActionSignalsToEventHandler ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getActive()

bool Player::getActive ( ) const
inline

◆ getArrows()

const QMap< int, ArrowItem * > & Player::getArrows ( ) const
inline
Here is the caller graph for this function:

◆ getConceded()

bool Player::getConceded ( ) const
inline
Here is the caller graph for this function:

◆ getCounters()

QMap< int, AbstractCounter * > Player::getCounters ( )
inline

◆ getDeck()

DeckLoader * Player::getDeck ( ) const
inlinenodiscard

◆ getDeckZone()

PileZoneLogic * Player::getDeckZone ( )
inline

◆ getGame()

AbstractGame * Player::getGame ( ) const
inline

◆ getGameScene()

GameScene * Player::getGameScene ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGraphicsItem()

PlayerGraphicsItem * Player::getGraphicsItem ( )
nodiscard
Here is the caller graph for this function:

◆ getGraveZone()

PileZoneLogic * Player::getGraveZone ( )
inline

◆ getHandZone()

HandZoneLogic * Player::getHandZone ( )
inline

◆ getPlayerActions()

PlayerActions * Player::getPlayerActions ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayerEventHandler()

PlayerEventHandler * Player::getPlayerEventHandler ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getPlayerInfo()

PlayerInfo * Player::getPlayerInfo ( ) const
inlinenodiscard

◆ getPlayerMenu()

PlayerMenu * Player::getPlayerMenu ( ) const
inlinenodiscard
Here is the caller graph for this function:

◆ getRfgZone()

PileZoneLogic * Player::getRfgZone ( )
inline

◆ getSideboardZone()

PileZoneLogic * Player::getSideboardZone ( )
inline

◆ getStackZone()

StackZoneLogic * Player::getStackZone ( )
inline

◆ getTableZone()

TableZoneLogic * Player::getTableZone ( )
inline
Here is the caller graph for this function:

◆ getZone()

CardZoneLogic * Player::getZone ( const QString zoneName)
inline

◆ getZoneId()

int Player::getZoneId ( ) const
inline

◆ getZones()

const QMap< QString, CardZoneLogic * > & Player::getZones ( ) const
inline
Here is the caller graph for this function:

◆ incrementAllCardCounters()

void Player::incrementAllCardCounters ( )
Here is the call graph for this function:

◆ initializeZones()

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

◆ newCardAdded

void Player::newCardAdded ( AbstractCardItem * card)
signal
Here is the caller graph for this function:

◆ openDeckEditor

void Player::openDeckEditor ( DeckLoader * deck)
signal
Here is the caller graph for this function:

◆ processCardAttachment()

void Player::processCardAttachment ( const ServerInfo_Player & info)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ processPlayerInfo()

void Player::processPlayerInfo ( const ServerInfo_Player & info)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rearrangeCounters

void Player::rearrangeCounters ( )
signal
Here is the caller graph for this function:

◆ removeArrow()

void Player::removeArrow ( ArrowItem * arrow)
Here is the call graph for this function:

◆ resetTopCardMenuActions

void Player::resetTopCardMenuActions ( )
signal
Here is the caller graph for this function:

◆ setActive

void Player::setActive ( bool _active)
slot
Here is the call graph for this function:

◆ setConceded()

void Player::setConceded ( bool _conceded)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDeck()

void Player::setDeck ( DeckLoader & _deck)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDialogSemaphore()

void Player::setDialogSemaphore ( const bool _active)
inline

◆ setGameStarted()

void Player::setGameStarted ( )
Here is the call graph for this function:

◆ setZoneId()

void Player::setZoneId ( int _zoneId)
Here is the caller graph for this function:

◆ updateZones()

void Player::updateZones ( )
Here is the call graph for this function:

Member Data Documentation

◆ active

bool Player::active
private

◆ arrows

QMap<int, ArrowItem *> Player::arrows
private

◆ cardsToDelete

QList<CardItem *> Player::cardsToDelete
private

◆ conceded

bool Player::conceded
private

◆ counters

QMap<int, AbstractCounter *> Player::counters
private

◆ deck

DeckLoader* Player::deck
private

◆ dialogSemaphore

bool Player::dialogSemaphore
private

◆ game

AbstractGame* Player::game
private

◆ graphicsItem

PlayerGraphicsItem* Player::graphicsItem
private

◆ playerActions

PlayerActions* Player::playerActions
private

◆ playerEventHandler

PlayerEventHandler* Player::playerEventHandler
private

◆ playerInfo

PlayerInfo* Player::playerInfo
private

◆ playerMenu

PlayerMenu* Player::playerMenu
private

◆ zoneId

int Player::zoneId
private

◆ zones

QMap<QString, CardZoneLogic *> Player::zones
private

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