Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
hand_menu.h
Go to the documentation of this file.
1
6
7#ifndef COCKATRICE_HAND_MENU_H
8#define COCKATRICE_HAND_MENU_H
9
12
13#include <qtmetamacros.h>
14
16class QAction;
17class QMenu;
18class QWidget;
19
21{
22 Q_OBJECT
23
24public:
25 HandMenu(PlayerGraphicsItem *player, QWidget *parent = nullptr);
26
27 QMenu *revealHandMenu() const
28 {
29 return mRevealHand;
30 }
32 {
34 }
35
36 void retranslateUi() override;
37 void setShortcutsActive() override;
38 void setShortcutsInactive() override;
39
40private slots:
45
46private:
48
49 QAction *aViewHand = nullptr;
50 QAction *aMulligan = nullptr;
51 QAction *aMulliganSame = nullptr;
52 QAction *aMulliganMinusOne = nullptr;
53
54 QMenu *mSortHand = nullptr;
55 QAction *aSortHandByName = nullptr;
56 QAction *aSortHandByType = nullptr;
57 QAction *aSortHandByManaValue = nullptr;
58
59 QMenu *mRevealHand = nullptr;
60 QAction *aRevealHandToAll = nullptr;
61
62 QMenu *mRevealRandomHandCard = nullptr;
63 QAction *aRevealRandomHandCardToAll = nullptr;
64
65 QMenu *mMoveHandMenu = nullptr;
66 QAction *aMoveHandToTopLibrary = nullptr;
67 QAction *aMoveHandToBottomLibrary = nullptr;
68 QAction *aMoveHandToGrave = nullptr;
69 QAction *aMoveHandToRfg = nullptr;
70};
71
72#endif // COCKATRICE_HAND_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
QMenu * mRevealRandomHandCard
Definition hand_menu.h:62
QMenu * revealHandMenu() const
Definition hand_menu.h:27
QAction * aSortHandByType
Definition hand_menu.h:56
QAction * aMoveHandToBottomLibrary
Definition hand_menu.h:67
QAction * aMoveHandToGrave
Definition hand_menu.h:68
QMenu * mMoveHandMenu
Definition hand_menu.h:65
void onRevealHandTriggered()
Definition hand_menu.cpp:215
PlayerGraphicsItem * player
Definition hand_menu.h:47
QAction * aRevealRandomHandCardToAll
Definition hand_menu.h:63
void retranslateUi() override
Retranslate all user-visible strings. Called on language change.
Definition hand_menu.cpp:122
QAction * aMulliganSame
Definition hand_menu.h:51
QAction * aSortHandByManaValue
Definition hand_menu.h:57
QMenu * mRevealHand
Definition hand_menu.h:59
void populateRevealRandomHandCardMenuWithActivePlayers()
Definition hand_menu.cpp:196
void setShortcutsActive() override
Bind keyboard shortcuts. Called when this player gains focus.
Definition hand_menu.cpp:152
void onRevealRandomHandCardTriggered()
Definition hand_menu.cpp:226
HandMenu(PlayerGraphicsItem *player, QWidget *parent=nullptr)
Definition hand_menu.cpp:27
void setShortcutsInactive() override
Unbind keyboard shortcuts. Called when this player loses focus.
Definition hand_menu.cpp:166
QAction * aSortHandByName
Definition hand_menu.h:55
QMenu * mSortHand
Definition hand_menu.h:54
QAction * aMoveHandToRfg
Definition hand_menu.h:69
QAction * aRevealHandToAll
Definition hand_menu.h:60
QAction * aMulliganMinusOne
Definition hand_menu.h:52
void populateRevealHandMenuWithActivePlayers()
Definition hand_menu.cpp:177
QMenu * revealRandomHandCardMenu() const
Definition hand_menu.h:31
QAction * aViewHand
Definition hand_menu.h:49
QAction * aMulligan
Definition hand_menu.h:50
QAction * aMoveHandToTopLibrary
Definition hand_menu.h:66
Definition player_graphics_item.h:39
TearOffMenu(const QString &title, QWidget *parent=nullptr)
Definition tearoff_menu.h:17