mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Shorcut read from settings
This commit is contained in:
parent
644ea0482f
commit
b0bf94e378
14 changed files with 353 additions and 78 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "abstractcounter.h"
|
||||
#include "player.h"
|
||||
#include "settingscache.h"
|
||||
#include <QPainter>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
|
|
@ -65,9 +66,17 @@ void AbstractCounter::retranslateUi()
|
|||
void AbstractCounter::setShortcutsActive()
|
||||
{
|
||||
if (name == "life") {
|
||||
aSet->setShortcut(QKeySequence("Ctrl+L"));
|
||||
aDec->setShortcut(QKeySequence("F11"));
|
||||
aInc->setShortcut(QKeySequence("F12"));
|
||||
aSet->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
"AbstractCounter/aSet",
|
||||
QKeySequence("Ctrl+L")));
|
||||
|
||||
aDec->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
"AbstractCounter/aDec",
|
||||
QKeySequence("F11")));
|
||||
|
||||
aInc->setShortcuts(settingsCache->shortcuts().getShortcut(
|
||||
"AbstractCounter/aInc",
|
||||
QKeySequence("F12")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue