TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
ttksemaphoreloop.cpp
Go to the documentation of this file.
1 #include "ttksemaphoreloop.h"
2 
4  : QEventLoop(parent)
5 {
6  m_timer.setInterval(10 * TTK_DN_S2MS);
7  connect(&m_timer, SIGNAL(timeout()), SLOT(quit()));
8 }
9 
11 {
12  quit();
13 }
14 
16 {
17  m_timer.stop();
18  return QEventLoop::quit();
19 }
20 
22 {
23  m_timer.stop();
24  return QEventLoop::exit();
25 }
26 
27 int TTKSemaphoreLoop::exec(ProcessEventsFlags flags)
28 {
29  m_timer.start();
30  return QEventLoop::exec(flags);
31 }
flags
Definition: http_parser.h:135
int exec(ProcessEventsFlags flags=AllEvents)
TTKSemaphoreLoop(QObject *parent=nullptr)
#define TTK_DN_S2MS
Definition: ttkglobal.h:276