Commit 3a1e1c86 authored by Scott Wheeler's avatar Scott Wheeler

Another slot moved to PlayerManager

svn path=/trunk/kdemultimedia/juk/; revision=292705
parent e2eceaa5
......@@ -141,14 +141,6 @@ void JuK::seekForward()
emit m_sliderAction->trackPositionSlider()->setValue(position);
}
void JuK::playPause()
{
if(m_player->playing())
action("pause")->activate();
else
action("play")->activate();
}
void JuK::volumeUp()
{
if(m_sliderAction && m_sliderAction->volumeSlider()) {
......@@ -444,8 +436,9 @@ void JuK::setupSystemTray()
void JuK::setupGlobalAccels()
{
m_accel = new KGlobalAccel(this);
KeyDialog::insert(m_accel, "PlayPause", i18n("Play/Pause"), this, SLOT(playPause()));
KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), SLOT(activate()));
KeyDialog::insert(m_accel, "PlayPause", i18n("Play/Pause"), action("playPause"), SLOT(activate()));
KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), SLOT(activate()));
KeyDialog::insert(m_accel, "Back", i18n("Back"), this, SLOT(back()));
KeyDialog::insert(m_accel, "Forward", i18n("Forward"), this, SLOT(forward()));
KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), this, SLOT(seekBack()));
......
......@@ -50,8 +50,6 @@ public slots:
void seekBack();
void seekForward();
void playPause();
void volumeUp();
void volumeDown();
void volumeMute();
......
......@@ -226,6 +226,11 @@ void PlayerManager::seekPosition(int position)
player()->seekPosition(position);
}
void PlayerManager::playPause()
{
playing() ? pause() : play();
}
void PlayerManager::forward()
{
QString file = m_playlistInterface->nextFile();
......
......@@ -53,7 +53,6 @@ public:
void setStatusLabel(StatusLabel *label);
public slots:
virtual void play(const QString &fileName = QString::null);
virtual void pause();
virtual void stop();
......@@ -61,6 +60,8 @@ public slots:
virtual void seek(long seekTime);
virtual void seekPosition(int position);
void playPause();
void forward();
void back();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment