| 123456789101112131415161718192021222324252627282930 |
- // ***********************************************************/
- // stopplay_waiting_thread.cpp
- //
- // Copy Right @ Steven Huang. All rights reserved.
- //
- // Waiting play-stop thread
- // ***********************************************************/
- #include "stopplay_waiting_thread.h"
- #include "playercontroller.h"
- StopWaitingThread::StopWaitingThread(QObject* parent, const QString& file)
- : QThread(parent)
- , m_file(file)
- {}
- StopWaitingThread::~StopWaitingThread() {}
- void StopWaitingThread::run()
- {
- PlayerController* pMainWnd = (PlayerController*) parent();
- emit stopPlay();
- while (pMainWnd && pMainWnd->isPlaying()) {
- msleep(2);
- }
- emit startPlay(m_file);
- qDebug("-------- stopplay waiting thread exit.");
- return;
- }
|