Cockatrice 2026-01-14-Development-2.11.0-beta.46
A cross-platform 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
11
12#include <QAction>
13#include <QMenu>
14
15class Player;
16class PlayerActions;
17
18class HandMenu : public TearOffMenu
19{
20 Q_OBJECT
21
22public:
23 HandMenu(Player *player, PlayerActions *actions, QWidget *parent = nullptr);
24
25 QMenu *revealHandMenu() const
26 {
27 return mRevealHand;
28 }
30 {
32 }
33
34 void retranslateUi();
35 void setShortcutsActive();
37
38private slots:
43
44private:
46
47 QAction *aViewHand = nullptr;
48 QAction *aMulligan = nullptr;
49 QAction *aMulliganSame = nullptr;
50 QAction *aMulliganMinusOne = nullptr;
51
52 QMenu *mSortHand = nullptr;
53 QAction *aSortHandByName = nullptr;
54 QAction *aSortHandByType = nullptr;
55 QAction *aSortHandByManaValue = nullptr;
56
57 QMenu *mRevealHand = nullptr;
58 QAction *aRevealHandToAll = nullptr;
59
60 QMenu *mRevealRandomHandCard = nullptr;
61 QAction *aRevealRandomHandCardToAll = nullptr;
62
63 QMenu *mMoveHandMenu = nullptr;
64 QAction *aMoveHandToTopLibrary = nullptr;
65 QAction *aMoveHandToBottomLibrary = nullptr;
66 QAction *aMoveHandToGrave = nullptr;
67 QAction *aMoveHandToRfg = nullptr;
68};
69
70#endif // COCKATRICE_HAND_MENU_H
QMenu * mRevealRandomHandCard
Definition hand_menu.h:60
QMenu * revealHandMenu() const
Definition hand_menu.h:25
QAction * aSortHandByType
Definition hand_menu.h:54
QAction * aMoveHandToBottomLibrary
Definition hand_menu.h:65
QAction * aMoveHandToGrave
Definition hand_menu.h:66
HandMenu(Player *player, PlayerActions *actions, QWidget *parent=nullptr)
Definition hand_menu.cpp:13
QMenu * mMoveHandMenu
Definition hand_menu.h:63
void retranslateUi()
Definition hand_menu.cpp:105
void onRevealHandTriggered()
Definition hand_menu.cpp:196
QAction * aRevealRandomHandCardToAll
Definition hand_menu.h:61
QAction * aMulliganSame
Definition hand_menu.h:49
QAction * aSortHandByManaValue
Definition hand_menu.h:55
void setShortcutsActive()
Definition hand_menu.cpp:135
QMenu * mRevealHand
Definition hand_menu.h:57
void setShortcutsInactive()
Definition hand_menu.cpp:149
void populateRevealRandomHandCardMenuWithActivePlayers()
Definition hand_menu.cpp:178
void onRevealRandomHandCardTriggered()
Definition hand_menu.cpp:206
QAction * aSortHandByName
Definition hand_menu.h:53
QMenu * mSortHand
Definition hand_menu.h:52
Player * player
Definition hand_menu.h:45
QAction * aMoveHandToRfg
Definition hand_menu.h:67
QAction * aRevealHandToAll
Definition hand_menu.h:58
QAction * aMulliganMinusOne
Definition hand_menu.h:50
void populateRevealHandMenuWithActivePlayers()
Definition hand_menu.cpp:160
QMenu * revealRandomHandCardMenu() const
Definition hand_menu.h:29
QAction * aViewHand
Definition hand_menu.h:47
QAction * aMulligan
Definition hand_menu.h:48
QAction * aMoveHandToTopLibrary
Definition hand_menu.h:64
Definition player_actions.h:34
Definition player.h:65
TearOffMenu(const QString &title, QWidget *parent=nullptr)
Definition tearoff_menu.h:16
TODO: Document this.