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

#include <abstract_counter.h>

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

Public Member Functions

 AbstractCounter (Player *_player, int _id, const QString &_name, bool _shownInCounterArea, int _value, bool _useNameForShortcut=false, QGraphicsItem *parent=nullptr)
 ~AbstractCounter () override
void retranslateUi ()
void setValue (int _value)
void setShortcutsActive ()
void setShortcutsInactive ()
void delCounter ()
QMenu * getMenu () const
int getId () const
QString getName () const
bool getShownInCounterArea () const
int getValue () const

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override

Protected Attributes

Playerplayer
int id
QString name
int value
bool useNameForShortcut
bool hovered

Private Slots

void refreshShortcuts ()
void incrementCounter ()
void setCounter ()

Private Attributes

QAction * aSet
QAction * aDec
QAction * aInc
TearOffMenumenu
bool dialogSemaphore
bool deleteAfterDialog
bool shownInCounterArea
bool shortcutActive

Constructor & Destructor Documentation

◆ AbstractCounter()

AbstractCounter::AbstractCounter ( Player * _player,
int _id,
const QString & _name,
bool _shownInCounterArea,
int _value,
bool _useNameForShortcut = false,
QGraphicsItem * parent = nullptr )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~AbstractCounter()

AbstractCounter::~AbstractCounter ( )
override

Member Function Documentation

◆ delCounter()

void AbstractCounter::delCounter ( )
Here is the caller graph for this function:

◆ getId()

int AbstractCounter::getId ( ) const
inline

◆ getMenu()

QMenu * AbstractCounter::getMenu ( ) const
inline
Here is the caller graph for this function:

◆ getName()

QString AbstractCounter::getName ( ) const
inline
Here is the caller graph for this function:

◆ getShownInCounterArea()

bool AbstractCounter::getShownInCounterArea ( ) const
inline
Here is the caller graph for this function:

◆ getValue()

int AbstractCounter::getValue ( ) const
inline
Here is the caller graph for this function:

◆ hoverEnterEvent()

void AbstractCounter::hoverEnterEvent ( QGraphicsSceneHoverEvent * event)
overrideprotected

◆ hoverLeaveEvent()

void AbstractCounter::hoverLeaveEvent ( QGraphicsSceneHoverEvent * event)
overrideprotected

◆ incrementCounter

void AbstractCounter::incrementCounter ( )
privateslot
Here is the caller graph for this function:

◆ mousePressEvent()

void AbstractCounter::mousePressEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected

◆ refreshShortcuts

void AbstractCounter::refreshShortcuts ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retranslateUi()

void AbstractCounter::retranslateUi ( )
Here is the caller graph for this function:

◆ setCounter

void AbstractCounter::setCounter ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShortcutsActive()

void AbstractCounter::setShortcutsActive ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShortcutsInactive()

void AbstractCounter::setShortcutsInactive ( )

◆ setValue()

void AbstractCounter::setValue ( int _value)
Here is the caller graph for this function:

Member Data Documentation

◆ aDec

QAction * AbstractCounter::aDec
private

◆ aInc

QAction * AbstractCounter::aInc
private

◆ aSet

QAction* AbstractCounter::aSet
private

◆ deleteAfterDialog

bool AbstractCounter::deleteAfterDialog
private

◆ dialogSemaphore

bool AbstractCounter::dialogSemaphore
private

◆ hovered

bool AbstractCounter::hovered
protected

◆ id

int AbstractCounter::id
protected

◆ menu

TearOffMenu* AbstractCounter::menu
private

◆ name

QString AbstractCounter::name
protected

◆ player

Player* AbstractCounter::player
protected

◆ shortcutActive

bool AbstractCounter::shortcutActive
private

◆ shownInCounterArea

bool AbstractCounter::shownInCounterArea
private

◆ useNameForShortcut

bool AbstractCounter::useNameForShortcut
protected

◆ value

int AbstractCounter::value
protected

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