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
12
13#include <QAction>
14#include <QMenu>
15
16class Player;
18{
19 Q_OBJECT
20public:
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
40private:
42};
43
44#endif // COCKATRICE_RFG_MENU_H
Polymorphic interface for player-bound UI components managed by PlayerMenu.
Interface for player-bound UI components that need shortcut and translation lifecycle management.
Definition abstract_player_component.h:18
Definition player.h:66
QAction * aMoveRfgToTopLibrary
Definition rfg_menu.h:35
void setShortcutsInactive() override
Unbind keyboard shortcuts. Called when this player loses focus.
Definition rfg_menu.h:28
QAction * aViewRfg
Definition rfg_menu.h:34
void retranslateUi() override
Retranslate all user-visible strings. Called on language change.
Definition rfg_menu.cpp:58
void setShortcutsActive() override
Bind keyboard shortcuts. Called when this player gains focus.
Definition rfg_menu.h:25
void createMoveActions()
Definition rfg_menu.cpp:29
void createViewActions()
Definition rfg_menu.cpp:50
RfgMenu(Player *player, QWidget *parent=nullptr)
Definition rfg_menu.cpp:8
QMenu * moveRfgMenu
Definition rfg_menu.h:32
QAction * aMoveRfgToHand
Definition rfg_menu.h:37
Player * player
Definition rfg_menu.h:41
QAction * aMoveRfgToGrave
Definition rfg_menu.h:38
QAction * aMoveRfgToBottomLibrary
Definition rfg_menu.h:36
TearOffMenu(const QString &title, QWidget *parent=nullptr)
Definition tearoff_menu.h:16
TODO: Document this.