mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Merge pull request #1523 from marcofernandezheras/Restore-Shortcuts
Restore shortcuts
This commit is contained in:
commit
8125358052
7 changed files with 111 additions and 3 deletions
|
|
@ -119,6 +119,24 @@ bool ShortcutsSettings::isValid(QString name, QString Sequences)
|
|||
return true;
|
||||
}
|
||||
|
||||
void ShortcutsSettings::resetAllShortcuts()
|
||||
{
|
||||
for(QMap<QString,QList<QKeySequence> >::const_iterator it = defaultShortCuts.begin();
|
||||
it != defaultShortCuts.end(); ++it){
|
||||
setShortcuts(it.key(), it.value());
|
||||
}
|
||||
emit allShortCutsReset();
|
||||
}
|
||||
|
||||
void ShortcutsSettings::clearAllShortcuts()
|
||||
{
|
||||
for(QMap<QString,QList<QKeySequence> >::const_iterator it = shortCuts.begin();
|
||||
it != shortCuts.end(); ++it){
|
||||
setShortcuts(it.key(), "");
|
||||
}
|
||||
emit allShortCutsClear();
|
||||
}
|
||||
|
||||
void ShortcutsSettings::fillDefaultShorcuts()
|
||||
{
|
||||
defaultShortCuts["MainWindow/aCheckCardUpdates"] = parseSequenceString("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue