modified: bottombar.cpp
[groove] / splayer.cpp
index 16c8ec3..23fe2a0 100644 (file)
@@ -34,6 +34,21 @@ void sPlayer::markComplete()
     else
         pl->setCurrentPlaying(-1);
 }
+void sPlayer::pause()
+{
+    if(media->state() == Phonon::PausedState)
+        media->play();
+    if(media->state() == Phonon::PlayingState)
+        media->pause();
+}
+void sPlayer::playNext()
+{
+    if(pl->existAt(pl->currentplaying()+1))
+    {
+        media->stop();
+        this->markComplete();
+    }
+}
 
 sPlayer::~sPlayer()
 {
@@ -41,6 +56,19 @@ sPlayer::~sPlayer()
     //reply->~QIODevice();
     media->~MediaNode();
 }
+void sPlayer::back()
+{
+    media->stop();
+    if(pl->existAt(pl->currentplaying()-1))
+    {
+        pl->setCurrentPlaying(pl->currentplaying()-1);
+        if(pl->bReady(pl->currentplaying()))
+            this->start(pl->currentplaying());
+    }
+    else
+        pl->setCurrentPlaying(-1);
+}
+
 void sPlayer::abortDownload()
 {
     //pd->hide();