Cockatrice 2026-04-21-Development-2.11.0-beta.61
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
PlayerCounter Class Reference

#include <player_target.h>

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

Public Member Functions

 PlayerCounter (Player *_player, int _id, const QString &_name, int _value, QGraphicsItem *parent=nullptr)
QRectF boundingRect () const override
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Public Member Functions inherited from AbstractCounter
 AbstractCounter (Player *_player, int _id, const QString &_name, bool _shownInCounterArea, int _value, bool _useNameForShortcut=false, QGraphicsItem *parent=nullptr)
 ~AbstractCounter () override
void retranslateUi () override
 Retranslate all user-visible strings. Called on language change.
void setValue (int _value)
void setShortcutsActive () override
 Bind keyboard shortcuts. Called when this player gains focus.
void setShortcutsInactive () override
 Unbind keyboard shortcuts. Called when this player loses focus.
void delCounter ()
QMenu * getMenu () const
int getId () const
QString getName () const
bool getShownInCounterArea () const
int getValue () const
Public Member Functions inherited from AbstractPlayerComponent
virtual ~AbstractPlayerComponent ()=default

Additional Inherited Members

Protected Member Functions inherited from AbstractCounter
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
Protected Attributes inherited from AbstractCounter
Playerplayer
int id
QString name
int value
bool useNameForShortcut
bool hovered

Constructor & Destructor Documentation

◆ PlayerCounter()

PlayerCounter::PlayerCounter ( Player * _player,
int _id,
const QString & _name,
int _value,
QGraphicsItem * parent = nullptr )
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF PlayerCounter::boundingRect ( ) const
override

◆ paint()

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

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