mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
* [Settings] Split cache_settings into multiple files Took 9 minutes Took 4 minutes * [Settings] Fwd declare settings classes in cache_settings Took 15 minutes * Fix oracle includes. Took 8 minutes * Address comments, fix windows CI Took 8 minutes * fix copy constructor visibility Took 3 minutes * lint Took 2 minutes * Fix native format tests. Took 5 minutes * Remove test header guard Took 4 seconds * Remove tests invalid in CI environ Took 24 seconds * Adjust to rebase. Took 11 minutes * Change settings file name. Took 8 minutes --------- Co-authored-by: Lukas Brübach <lukas.bruebach@bdosecurity.de> Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
37 lines
No EOL
1 KiB
C++
37 lines
No EOL
1 KiB
C++
#include "sideboard_menu.h"
|
|
|
|
#include "../../../client/settings/shortcuts_settings.h"
|
|
#include "../../game/player/player_actions.h"
|
|
#include "../../game/player/player_logic.h"
|
|
#include "../player_graphics_item.h"
|
|
|
|
SideboardMenu::SideboardMenu(PlayerGraphicsItem *player, QMenu *playerMenu) : QMenu(playerMenu)
|
|
{
|
|
aViewSideboard = new QAction(this);
|
|
connect(aViewSideboard, &QAction::triggered, player->getLogic()->getPlayerActions(),
|
|
&PlayerActions::actViewSideboard);
|
|
|
|
if (player->getLogic()->getPlayerInfo()->getLocalOrJudge()) {
|
|
addAction(aViewSideboard);
|
|
}
|
|
|
|
retranslateUi();
|
|
}
|
|
|
|
void SideboardMenu::retranslateUi()
|
|
{
|
|
setTitle(tr("&Sideboard"));
|
|
aViewSideboard->setText(tr("&View sideboard"));
|
|
}
|
|
|
|
void SideboardMenu::setShortcutsActive()
|
|
{
|
|
ShortcutsSettings &shortcuts = SettingsCache::instance().shortcuts();
|
|
|
|
aViewSideboard->setShortcuts(shortcuts.getShortcut("Player/aViewSideboard"));
|
|
}
|
|
|
|
void SideboardMenu::setShortcutsInactive()
|
|
{
|
|
aViewSideboard->setShortcut(QKeySequence());
|
|
} |