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

#include <player_menu.h>

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

Public Slots

void setMenusForGraphicItems ()

Signals

void cardMenuUpdated (QMenu *cardMenu)
void shortcutsActivated ()
void shortcutsDeactivated ()
void retranslateRequested ()

Public Member Functions

 PlayerMenu (PlayerLogic *player)
void retranslateUi ()
 Retranslate all user-visible strings. Called on language change.
QMenu * updateCardMenu (const CardItem *card)
QMenu * getPlayerMenu () const
QMenu * getCountersMenu ()
LibraryMenugetLibraryMenu () const
UtilityMenugetUtilityMenu () const
bool getShortcutsActive () const
void setShortcutsActive ()
 Bind keyboard shortcuts. Called when this player gains focus.
void setShortcutsInactive ()
 Unbind keyboard shortcuts. Called when this player loses focus.

Private Slots

void refreshShortcuts ()

Private Member Functions

template<typename MenuT, typename... Args>
MenuT * addManagedMenu (Args &&...args)
 Creates component, adds it as a submenu of playerMenu, and registers in managedComponents.
template<typename ComponentT, typename... Args>
ComponentT * createManagedComponent (Args &&...args)
 Creates component and registers in managedComponents, but does NOT add it as a submenu.

Private Attributes

PlayerLogicplayer
TearOffMenuplayerMenu
QMenu * countersMenu
HandMenuhandMenu
LibraryMenulibraryMenu
SideboardMenusideboardMenu
GraveyardMenugraveMenu
RfgMenurfgMenu
UtilityMenuutilityMenu
SayMenusayMenu
CustomZoneMenucustomZonesMenu
QList< AbstractPlayerComponent * > managedComponents
 Drives AbstractPlayerComponent lifecycle delegation. Counters are iterated separately via player->getCounters().
bool shortcutsActive = false

Constructor & Destructor Documentation

◆ PlayerMenu()

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

Member Function Documentation

◆ addManagedMenu()

template<typename MenuT, typename... Args>
MenuT * PlayerMenu::addManagedMenu ( Args &&... args)
inlineprivate

Creates component, adds it as a submenu of playerMenu, and registers in managedComponents.

Here is the caller graph for this function:

◆ cardMenuUpdated

void PlayerMenu::cardMenuUpdated ( QMenu * cardMenu)
signal
Here is the caller graph for this function:

◆ createManagedComponent()

template<typename ComponentT, typename... Args>
ComponentT * PlayerMenu::createManagedComponent ( Args &&... args)
inlineprivate

Creates component and registers in managedComponents, but does NOT add it as a submenu.

Here is the caller graph for this function:

◆ getCountersMenu()

QMenu * PlayerMenu::getCountersMenu ( )
inlinenodiscard

◆ getLibraryMenu()

LibraryMenu * PlayerMenu::getLibraryMenu ( ) const
inlinenodiscard

◆ getPlayerMenu()

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

◆ getShortcutsActive()

bool PlayerMenu::getShortcutsActive ( ) const
inlinenodiscard

◆ getUtilityMenu()

UtilityMenu * PlayerMenu::getUtilityMenu ( ) const
inlinenodiscard

◆ refreshShortcuts

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

◆ retranslateRequested

void PlayerMenu::retranslateRequested ( )
signal
Here is the caller graph for this function:

◆ retranslateUi()

void PlayerMenu::retranslateUi ( )

Retranslate all user-visible strings. Called on language change.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMenusForGraphicItems

void PlayerMenu::setMenusForGraphicItems ( )
slot

◆ setShortcutsActive()

void PlayerMenu::setShortcutsActive ( )

Bind keyboard shortcuts. Called when this player gains focus.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShortcutsInactive()

void PlayerMenu::setShortcutsInactive ( )

Unbind keyboard shortcuts. Called when this player loses focus.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shortcutsActivated

void PlayerMenu::shortcutsActivated ( )
signal
Here is the caller graph for this function:

◆ shortcutsDeactivated

void PlayerMenu::shortcutsDeactivated ( )
signal
Here is the caller graph for this function:

◆ updateCardMenu()

QMenu * PlayerMenu::updateCardMenu ( const CardItem * card)
Here is the call graph for this function:

Member Data Documentation

◆ countersMenu

QMenu* PlayerMenu::countersMenu
private

◆ customZonesMenu

CustomZoneMenu* PlayerMenu::customZonesMenu
private

◆ graveMenu

GraveyardMenu* PlayerMenu::graveMenu
private

◆ handMenu

HandMenu* PlayerMenu::handMenu
private

◆ libraryMenu

LibraryMenu* PlayerMenu::libraryMenu
private

◆ managedComponents

QList<AbstractPlayerComponent *> PlayerMenu::managedComponents
private

Drives AbstractPlayerComponent lifecycle delegation. Counters are iterated separately via player->getCounters().

◆ player

PlayerLogic* PlayerMenu::player
private

◆ playerMenu

TearOffMenu* PlayerMenu::playerMenu
private

◆ rfgMenu

RfgMenu* PlayerMenu::rfgMenu
private

◆ sayMenu

SayMenu* PlayerMenu::sayMenu
private

◆ shortcutsActive

bool PlayerMenu::shortcutsActive = false
private

◆ sideboardMenu

SideboardMenu* PlayerMenu::sideboardMenu
private

◆ utilityMenu

UtilityMenu* PlayerMenu::utilityMenu
private

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