diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-05-25 06:55:36 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-05-25 06:55:36 +0000 |
| commit | b312fcd85c5c3569ebe5c6622ba31c915cdf1dde (patch) | |
| tree | 79fa1bf79b2729c43cbb4614d6dab31a726be265 /src/plugins/Ui/skinned/actionmanager.cpp | |
| parent | b4814ea5b6b433dd6a3ae9800e5c2998046c5807 (diff) | |
| download | qmmp-b312fcd85c5c3569ebe5c6622ba31c915cdf1dde.tar.gz qmmp-b312fcd85c5c3569ebe5c6622ba31c915cdf1dde.tar.bz2 qmmp-b312fcd85c5c3569ebe5c6622ba31c915cdf1dde.zip | |
added feature to restore default shortcuts
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5019 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned/actionmanager.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/actionmanager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/Ui/skinned/actionmanager.cpp b/src/plugins/Ui/skinned/actionmanager.cpp index b92866afe..9d8d72de7 100644 --- a/src/plugins/Ui/skinned/actionmanager.cpp +++ b/src/plugins/Ui/skinned/actionmanager.cpp @@ -136,6 +136,7 @@ QAction *ActionManager::createAction(QString name, QString confKey, QString key, { QAction *action = new QAction(name, this); action->setShortcut(m_settings->value(confKey, key).toString()); + action->setProperty("defaultShortcut", key); action->setObjectName(confKey); if(iconName.isEmpty()) return action; @@ -176,3 +177,12 @@ void ActionManager::saveActions() settings.setValue(QString("SkinnedShortcuts/")+action->objectName(), action->shortcut()); } } + +void ActionManager::resetShortcuts() +{ + foreach (QAction *action, m_actions.values()) + { + action->setShortcut(action->property("defaultShortcut").toString()); + qDebug("=%s=",qPrintable(action->property("defaultShortcut").toString())); + } +} |
