[Pkg-mpd-commits] [qmpdclient] 04/38: Add support for more multimedia keys
Andrey Rahmatullin
wrar at moszumanska.debian.org
Mon May 23 07:19:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
wrar pushed a commit to branch master
in repository qmpdclient.
commit bc3812dd878204ceca131cef750a1dbc1f028dcf
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Wed Jan 25 02:04:34 2012 +0100
Add support for more multimedia keys
---
src/controlpanel.cpp | 12 ++++++++++++
src/controlpanel.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/src/controlpanel.cpp b/src/controlpanel.cpp
index 9dd6e30..9310479 100644
--- a/src/controlpanel.cpp
+++ b/src/controlpanel.cpp
@@ -65,14 +65,26 @@ ControlPanel::ControlPanel(QWidget *parent) : QWidget(parent), m_coverArt(new C
m_rwdKey = new QShortcut(Qt::CTRL | Qt::Key_Left, this);
m_volUpKey = new QShortcut(Qt::CTRL | Qt::Key_Up, this);
m_volDnKey = new QShortcut(Qt::CTRL | Qt::Key_Down, this);
+ m_stopMultKey = new QShortcut(Qt::Key_MediaStop, this);
+ m_togglePlayMultKey = new QShortcut(Qt::Key_MediaPlay, this);
+ m_fwdMultKey = new QShortcut(Qt::Key_MediaNext, this);
+ m_rwdMultKey = new QShortcut(Qt::Key_MediaPrevious, this);
m_fwdKey->setObjectName("nextSongKey");
m_rwdKey->setObjectName("prevSongKey");
m_volUpKey->setObjectName("volumeUpKey");
m_volDnKey->setObjectName("volumeDownKey");
+ m_stopMultKey->setObjectName("stopKey");
+ m_togglePlayMultKey->setObjectName("togglePlayKey");
+ m_fwdMultKey->setObjectName("nextSongMultimediaKey");
+ m_rwdMultKey->setObjectName("prevSongMultimediaKey");
connect(m_fwdKey, SIGNAL(activated()), MPD::instance(), SLOT(seekForward()));
connect(m_rwdKey, SIGNAL(activated()), MPD::instance(), SLOT(seekBackward()));
connect(m_volUpKey, SIGNAL(activated()), MPD::instance(), SLOT(volumeUp()));
connect(m_volDnKey, SIGNAL(activated()), MPD::instance(), SLOT(volumeDown()));
+ connect(m_stopMultKey, SIGNAL(activated()), MPD::instance(), SLOT(stop()));
+ connect(m_togglePlayMultKey, SIGNAL(activated()), MPD::instance(), SLOT(togglePlay()));
+ connect(m_fwdMultKey, SIGNAL(activated()), MPD::instance(), SLOT(next()));
+ connect(m_rwdMultKey, SIGNAL(activated()), MPD::instance(), SLOT(prev()));
setSong(MPDSong());
}
diff --git a/src/controlpanel.h b/src/controlpanel.h
index 263148e..b4aebcc 100644
--- a/src/controlpanel.h
+++ b/src/controlpanel.h
@@ -45,6 +45,8 @@ private:
LyricsDialog *m_lyricsDialog;
LastFmSubmitter * m_lastFm;
QShortcut *m_fwdKey, *m_rwdKey, *m_volUpKey, *m_volDnKey;
+ // Multimedia keys
+ QShortcut *m_fwdMultKey, *m_rwdMultKey, *m_stopMultKey, *m_togglePlayMultKey;
signals:
void infoMsg(QString);
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/qmpdclient.git
More information about the Pkg-mpd-commits
mailing list