mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
* [Cleanup] Unused #includes Took 44 minutes * [Cleanup] More unused #includes Took 55 minutes * [Cleanup] Include QSet Took 4 minutes * [Cleanup] Include QDebug in deck_list.cpp Took 3 minutes * [Cleanup] Include protocol stuff in servatrice_database_interface.h Took 3 minutes * [Cleanup] Include QDialogButtonBox Took 8 minutes * [Cleanup] Include QUrl Took 8 minutes * [Cleanup] Include QTextOption in header. Took 3 minutes * [Cleanup] Include QMap in user_list_manager.h Took 8 minutes * [Cleanup] Adjust qjson Took 8 minutes * [Cleanup] include button box. Took 3 minutes * [Cleanup] Redo fwd declarations. * [Cleanup] Redo last removed fwd declarations. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
34 lines
No EOL
866 B
C++
34 lines
No EOL
866 B
C++
#include "sideboard_menu.h"
|
|
|
|
#include "../player.h"
|
|
#include "../player_actions.h"
|
|
|
|
SideboardMenu::SideboardMenu(Player *player, QMenu *playerMenu) : QMenu(playerMenu)
|
|
{
|
|
aViewSideboard = new QAction(this);
|
|
connect(aViewSideboard, &QAction::triggered, player->getPlayerActions(), &PlayerActions::actViewSideboard);
|
|
|
|
if (player->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());
|
|
} |