Cockatrice/cockatrice/src/game/player/menu/utility_menu.h
BruebachL f8c4f774cf
[Documentation] Sort *every* file into a doxygen group. (#6198)
* Sort *every* file into a doxygen group.

Took 7 hours 9 minutes

Took 18 seconds

Took 2 minutes

* Lint some ingroup definitions.

Took 10 minutes


Took 2 seconds

* Just include the groups in the Doxyfile in this commit.

Took 3 minutes

* Update some group comments so they link!

Took 14 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2025-09-30 12:13:32 +02:00

52 lines
1.1 KiB
C++

/**
* @file utility_menu.h
* @ingroup GameMenusPlayers
* @brief TODO: Document this.
*/
#ifndef COCKATRICE_UTILITY_MENU_H
#define COCKATRICE_UTILITY_MENU_H
#include <QMenu>
class Player;
class UtilityMenu : public QMenu
{
Q_OBJECT
public slots:
void populatePredefinedTokensMenu();
void retranslateUi();
void setShortcutsActive();
void setShortcutsInactive();
public:
explicit UtilityMenu(Player *player, QMenu *playerMenu);
[[nodiscard]] bool createAnotherTokenActionExists() const
{
return aCreateAnotherToken != nullptr;
}
void setAndEnableCreateAnotherTokenAction(QString text)
{
aCreateAnotherToken->setText(text);
aCreateAnotherToken->setEnabled(true);
}
QStringList getPredefinedTokens() const
{
return predefinedTokens;
}
private:
Player *player;
QStringList predefinedTokens;
QMenu *createPredefinedTokenMenu;
QAction *aIncrementAllCardCounters;
QAction *aUntapAll, *aRollDie;
QAction *aCreateToken, *aCreateAnotherToken;
};
#endif // COCKATRICE_UTILITY_MENU_H