TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicabstractfloatwidget.cpp
Go to the documentation of this file.
2 
4  : QLabel(parent),
5  m_blockAnimation(false)
6 {
7  m_animation = new QPropertyAnimation(this, "geometry", this);
8  m_animation->setDuration(500);
9 }
10 
12 {
13  delete m_animation;
14 }
15 
17 {
18  m_animation->setStartValue(m_rectLeave);
19  m_animation->setEndValue(m_rectEnter);
20  m_animation->start();
21 }
22 
24 {
25  m_animation->setStartValue(m_rectEnter);
26  m_animation->setEndValue(m_rectLeave);
27  m_animation->start();
28 }
29 
31 {
32  QLabel::enterEvent(event);
33  if(!m_blockAnimation)
34  {
36  }
37 }
38 
40 {
41  QLabel::leaveEvent(event);
42  if(!m_blockAnimation)
43  {
45  }
46 }
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:160
virtual void enterEvent(QtEnterEvent *event) override
QPropertyAnimation * m_animation
virtual void leaveEvent(QEvent *event) override
MusicAbstractFloatWidget(QWidget *parent=nullptr)