TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musictransitionanimationlabel.h
Go to the documentation of this file.
1 #ifndef MUSICTRANSITIONANIMATIONLABEL_H
2 #define MUSICTRANSITIONANIMATIONLABEL_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2024 Greedysky Studio
7 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License along
19  * with this program; If not, see <http://www.gnu.org/licenses/>.
20  ***************************************************************************/
21 
22 #include <QLabel>
23 #include "musicglobaldefine.h"
24 
25 class QPropertyAnimation;
26 namespace QAlgorithm
27 {
28 class SharpeImage;
29 }
30 
35 {
36  Q_OBJECT
38 public:
39  enum class Module
40  {
41  FadeEffect,
42  BlindsEffect,
43  CubeEffect,
44  WaterEffect,
45  LeftToRightEffect,
46  TopToBottomEffect
47  };
48 
52  explicit MusicTransitionAnimationLabel(QWidget *parent = nullptr);
57 
61  inline void setAnimation(bool on) { m_noAnimationSet = on; }
65  inline bool noAnimation() const { return m_noAnimationSet; }
66 
70  const QPixmap& rendererPixmap() const;
71 
75  void stop();
76 
77 public Q_SLOTS:
81  void setPixmap(const QPixmap &pix);
82 
83 private Q_SLOTS:
87  void valueChanged(const QVariant &value);
91  void animationFinished();
92 
93 private:
97  virtual void paintEvent(QPaintEvent *event) override final;
98 
104  QPixmap m_currentPixmap, m_previousPixmap;
105  QPropertyAnimation *m_animation;
106 
109 
110 };
111 
112 #endif // MUSICTRANSITIONANIMATIONLABEL_H
#define TTK_MODULE_EXPORT
The class of the sharpe image.
Definition: imagewrapper.h:35
static void rendererPixmap(Ui::MusicFileInformationWidget *ui, const QPixmap &pixmap)
The namespace of the algorithm.
The class of the label transition animation.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152