TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicdownloadbackgroundrequest.cpp
Go to the documentation of this file.
6 
7 MusicDownloadBackgroundRequest::MusicDownloadBackgroundRequest(const QString &name, const QString &path, QObject *parent)
8  : QObject(parent),
9  m_findCount(0),
10  m_pluginIndex(-1),
11  m_name(name),
12  m_path(path)
13 {
14 
15 }
16 
18 {
19  m_findCount = 0;
20  m_pluginIndex = -1;
22 }
23 
25 {
26  if(bytes.isEmpty())
27  {
29  return;
30  }
31 
32  bool ok = false;
33  const int value = bytes.toInt(&ok);
34  if(ok)
35  {
36  m_findCount += value;
38  {
40  }
41  }
42 }
43 
45 {
47  switch(++m_pluginIndex)
48  {
49  case 0: d = new MusicKGDownloadBackgroundRequest(m_name, m_path, this); break;
50  case 1: d = new MusicKWDownloadBackgroundRequest(m_name, m_path, this); break;
51  case 2: d = new MusicTXDownloadBackgroundRequest(m_name, m_path, this); break;
52  case 3: d = new MusicBPDownloadBackgroundRequest(m_name, m_path, this); break;
53  default: break;
54  }
55 
56  if(d)
57  {
58  connect(d, SIGNAL(downLoadDataChanged(QString)), SLOT(downLoadFinished(QString)));
59  //
61  d->startToRequest();
62  }
63 }
MusicDownloadBackgroundRequest(const QString &name, const QString &path, QObject *parent=nullptr)
The class of the kuwo download art background image.
The class of the kugou download art background image.
const char * name
Definition: http_parser.c:458
#define MAX_IMAGE_COUNT
The class of the download art background image.
The class of the tencent download art background image.
The class of the birdpaper download art background image.