diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-10-29 11:54:40 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2013-10-29 11:54:40 +0000 |
| commit | b3e0107872acf9f4ed336c53979c4e9f72e951e6 (patch) | |
| tree | a9aef47b92ca6e45db8bc713f133511f954c0b33 /src/plugins/Ui/skinned/mainwindow.cpp | |
| parent | 4e7e1408f048e2a71bb46660d3dcb29423a3af67 (diff) | |
| download | qmmp-b3e0107872acf9f4ed336c53979c4e9f72e951e6.tar.gz qmmp-b3e0107872acf9f4ed336c53979c4e9f72e951e6.tar.bz2 qmmp-b3e0107872acf9f4ed336c53979c4e9f72e951e6.zip | |
skinned: added volume hotkeys
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3831 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned/mainwindow.cpp')
| -rw-r--r-- | src/plugins/Ui/skinned/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/Ui/skinned/mainwindow.cpp b/src/plugins/Ui/skinned/mainwindow.cpp index 0fe9f6522..d09a5e44f 100644 --- a/src/plugins/Ui/skinned/mainwindow.cpp +++ b/src/plugins/Ui/skinned/mainwindow.cpp @@ -402,9 +402,20 @@ void MainWindow::createActions() connect(m_pl_manager, SIGNAL(shuffleChanged(bool)), ACTION(ActionManager::SHUFFLE), SLOT(setChecked(bool))); + QMenu *audioMenu = m_mainMenu->addMenu(tr("Audio")); + QSignalMapper *mapper = new QSignalMapper(this); + mapper->setMapping(ACTION(ActionManager::VOL_ENC), 5); + mapper->setMapping(ACTION(ActionManager::VOL_DEC), -5); + connect(mapper, SIGNAL(mapped(int)), m_core, SLOT(changeVolume(int))); + audioMenu->addAction(SET_ACTION(ActionManager::VOL_ENC, mapper, SLOT(map()))); + audioMenu->addAction(SET_ACTION(ActionManager::VOL_DEC, mapper, SLOT(map()))); + audioMenu->addAction(SET_ACTION(ActionManager::VOL_MUTE, m_core, SLOT(setMuted(bool)))); + connect(m_core, SIGNAL(mutedChanged(bool)), ACTION(ActionManager::VOL_MUTE), SLOT(setChecked(bool))); + m_visMenu = new VisualMenu(this); m_mainMenu->addMenu(m_visMenu); m_mainMenu->addMenu(m_uiHelper->createMenu(UiHelper::TOOLS_MENU, tr("Tools"), this)); + m_mainMenu->addSeparator(); m_mainMenu->addAction(SET_ACTION(ActionManager::SETTINGS, this, SLOT(showSettings()))); m_mainMenu->addSeparator(); |
