TTKMusicPlayer  4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicwidgetrenderer.cpp
Go to the documentation of this file.
1 #include "musicwidgetrenderer.h"
4 #include "musicextractmanager.h"
5 
7  : m_background(nullptr)
8 {
9 
10 }
11 
13 {
14  if(!m_background)
15  {
16  return;
17  }
18 
20  if(MusicExtractManager::outputSkin(&image, G_BACKGROUND_PTR->backgroundUrl()))
21  {
22  m_background->setPixmap(image.m_pix.scaled(size));
23  }
24  else
25  {
26  QPixmap pix(G_BACKGROUND_PTR->backgroundUrl());
27  if(pix.isNull())
28  {
29  TTK_ERROR_STREAM("Load current pixmap data error, path is" << G_BACKGROUND_PTR->backgroundUrl());
30  return;
31  }
32 
33  m_background->setPixmap(pix.scaled(size));
34  }
35 }
#define G_BACKGROUND_PTR
voidpf void uLong size
Definition: ioapi.h:136
void setBackgroundPixmap(const QSize &size)
The class of the skin backgroud image.
static bool outputSkin(MusicBackgroundImage *image, const QString &input)
#define TTK_ERROR_STREAM(msg)
Definition: ttklogger.h:76