void PresentationAudioWidget::slotPlayerStateChanged(QMediaPlayer::State state) { switch (state) { case QMediaPlayer::StoppedState: m_playButton->setEnabled(true); setGUIPlay(true); if (d->mediaObject->mediaStatus() == QMediaPlayer::LoadingMedia) { if (d->stopCalled) { d->stopCalled = false; } else { slotPlay(); checkSkip(); } } break; case QMediaPlayer::PlayingState: setGUIPlay(false); checkSkip(); break; default: break; } }
void PlaybackWidget::slotStop() { m_mediaObject->stop(); m_stopCalled = true; m_currIndex = 0; m_mediaObject->setCurrentSource(static_cast<QUrl>(m_urlList[m_currIndex])); checkSkip(); setGUIPlay(false); setZeroTime(); }
void PresentationAudioWidget::slotStop() { d->mediaObject->stop(); d->stopCalled = true; d->currIndex = 0; d->mediaObject->setMedia(d->urlList[d->currIndex]); checkSkip(); setGUIPlay(false); setZeroTime(); }
void PresentationAudioWidget::slotPlay() { if (d->mediaObject->state() == QMediaPlayer::PlayingState || d->mediaObject->mediaStatus() == QMediaPlayer::BufferingMedia) { d->mediaObject->pause(); setGUIPlay(true); d->canHide = false; emit signalPause(); return; } if (d->mediaObject->state() == QMediaPlayer::PausedState || d->mediaObject->state() == QMediaPlayer::StoppedState) { d->mediaObject->play(); setGUIPlay(false); d->canHide = true; emit signalPlay(); } }
void PlaybackWidget::slotPlay() { if ( m_mediaObject->state() == Phonon::PlayingState || m_mediaObject->state() == Phonon::BufferingState ) { m_mediaObject->pause(); setGUIPlay(true); m_canHide = false; emit signalPause(); return; } if ( m_mediaObject->state() == Phonon::PausedState || m_mediaObject->state() == Phonon::StoppedState ) { m_mediaObject->play(); setGUIPlay(false); m_canHide = true; emit signalPlay(); } }
void PlaybackWidget::slotMediaStateChanged(Phonon::State newstate, Phonon::State oldstate) { switch (newstate) { case Phonon::StoppedState : m_playButton->setEnabled(true); setGUIPlay(true); if ( oldstate == Phonon::LoadingState ) { if ( m_stopCalled ) m_stopCalled = false; else { slotPlay(); checkSkip(); } } break; case Phonon::ErrorState : slotError(); break; case Phonon::PlayingState : setGUIPlay(false); checkSkip(); break; case Phonon::PausedState : break; case Phonon::LoadingState : break; case Phonon::BufferingState : break; } }