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 | |
| 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')
| -rw-r--r-- | src/plugins/Ui/skinned/actionmanager.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/actionmanager.h | 4 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/mainwindow.cpp | 11 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/mainwindow.h | 2 |
4 files changed, 19 insertions, 2 deletions
diff --git a/src/plugins/Ui/skinned/actionmanager.cpp b/src/plugins/Ui/skinned/actionmanager.cpp index 6461e65c5..1425879aa 100644 --- a/src/plugins/Ui/skinned/actionmanager.cpp +++ b/src/plugins/Ui/skinned/actionmanager.cpp @@ -56,6 +56,10 @@ ActionManager::ActionManager(QObject *parent) : m_actions[WM_ALLWAYS_ON_TOP] = createAction2(tr("Always on Top"), "always_on_top", ""); m_actions[WM_STICKY] = createAction2(tr("Put on All Workspaces"), "sticky", ""); m_actions[WM_DOUBLE_SIZE] = createAction2(tr("Double Size"), "double_size", tr("Meta+D")); + //volume + m_actions[VOL_ENC] = createAction(tr("Volume &+"), "vol_enc", tr("0")); + m_actions[VOL_DEC] = createAction(tr("Volume &-"), "vol_dec", tr("9")); + m_actions[VOL_MUTE] = createAction2(tr("&Mute"), "vol_mute", tr("M")); //playlist m_actions[PL_ADD_FILE] = createAction(tr("&Add File"), "add_file", tr("F"), "audio-x-generic"); m_actions[PL_ADD_DIRECTORY] = createAction(tr("&Add Directory"), "add_dir", tr("D"), "folder"); diff --git a/src/plugins/Ui/skinned/actionmanager.h b/src/plugins/Ui/skinned/actionmanager.h index 00b99e3e9..a1f5d891d 100644 --- a/src/plugins/Ui/skinned/actionmanager.h +++ b/src/plugins/Ui/skinned/actionmanager.h @@ -65,6 +65,10 @@ public: WM_STICKY, WM_DOUBLE_SIZE, + VOL_ENC, + VOL_DEC, + VOL_MUTE, + PL_ADD_FILE, PL_ADD_DIRECTORY, PL_ADD_URL, 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(); diff --git a/src/plugins/Ui/skinned/mainwindow.h b/src/plugins/Ui/skinned/mainwindow.h index 7f3bb5953..c04ed697b 100644 --- a/src/plugins/Ui/skinned/mainwindow.h +++ b/src/plugins/Ui/skinned/mainwindow.h @@ -99,8 +99,6 @@ private: MainDisplay *m_display; PlayList *m_playlist; PlayListManager *m_pl_manager; - QPointer <PlayListModel> m_model; - int m_preamp; EqWidget *m_equalizer; MainVisual *m_vis; bool m_update; |
