Cockatrice
2026-04-21-Development-2.11.0-beta.61
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
rfg_menu.h
Go to the documentation of this file.
1
6
7
#ifndef COCKATRICE_RFG_MENU_H
8
#define COCKATRICE_RFG_MENU_H
9
10
#include "
../../../interface/widgets/menus/tearoff_menu.h
"
11
#include "
abstract_player_component.h
"
12
13
#include <QAction>
14
#include <QMenu>
15
16
class
Player
;
17
class
RfgMenu
:
public
TearOffMenu
,
public
AbstractPlayerComponent
18
{
19
Q_OBJECT
20
public
:
21
explicit
RfgMenu
(
Player
*
player
, QWidget *parent =
nullptr
);
22
void
createMoveActions
();
23
void
createViewActions
();
24
void
retranslateUi
()
override
;
25
void
setShortcutsActive
()
override
26
{
27
}
28
void
setShortcutsInactive
()
override
29
{
30
}
31
32
QMenu *
moveRfgMenu
=
nullptr
;
33
34
QAction *
aViewRfg
=
nullptr
;
35
QAction *
aMoveRfgToTopLibrary
=
nullptr
;
36
QAction *
aMoveRfgToBottomLibrary
=
nullptr
;
37
QAction *
aMoveRfgToHand
=
nullptr
;
38
QAction *
aMoveRfgToGrave
=
nullptr
;
39
40
private
:
41
Player
*
player
;
42
};
43
44
#endif
// COCKATRICE_RFG_MENU_H
abstract_player_component.h
Polymorphic interface for player-bound UI components managed by PlayerMenu.
AbstractPlayerComponent
Interface for player-bound UI components that need shortcut and translation lifecycle management.
Definition
abstract_player_component.h:18
Player
Definition
player.h:66
RfgMenu::aMoveRfgToTopLibrary
QAction * aMoveRfgToTopLibrary
Definition
rfg_menu.h:35
RfgMenu::setShortcutsInactive
void setShortcutsInactive() override
Unbind keyboard shortcuts. Called when this player loses focus.
Definition
rfg_menu.h:28
RfgMenu::aViewRfg
QAction * aViewRfg
Definition
rfg_menu.h:34
RfgMenu::retranslateUi
void retranslateUi() override
Retranslate all user-visible strings. Called on language change.
Definition
rfg_menu.cpp:58
RfgMenu::setShortcutsActive
void setShortcutsActive() override
Bind keyboard shortcuts. Called when this player gains focus.
Definition
rfg_menu.h:25
RfgMenu::createMoveActions
void createMoveActions()
Definition
rfg_menu.cpp:29
RfgMenu::createViewActions
void createViewActions()
Definition
rfg_menu.cpp:50
RfgMenu::RfgMenu
RfgMenu(Player *player, QWidget *parent=nullptr)
Definition
rfg_menu.cpp:8
RfgMenu::moveRfgMenu
QMenu * moveRfgMenu
Definition
rfg_menu.h:32
RfgMenu::aMoveRfgToHand
QAction * aMoveRfgToHand
Definition
rfg_menu.h:37
RfgMenu::player
Player * player
Definition
rfg_menu.h:41
RfgMenu::aMoveRfgToGrave
QAction * aMoveRfgToGrave
Definition
rfg_menu.h:38
RfgMenu::aMoveRfgToBottomLibrary
QAction * aMoveRfgToBottomLibrary
Definition
rfg_menu.h:36
TearOffMenu::TearOffMenu
TearOffMenu(const QString &title, QWidget *parent=nullptr)
Definition
tearoff_menu.h:16
tearoff_menu.h
TODO: Document this.
cockatrice
src
game
player
menu
rfg_menu.h
Generated by
1.14.0