TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicfuntionanimationwidget.h
Go to the documentation of this file.
1 #ifndef MUSICFUNTIONANIMATIONWIDGET_H
2 #define MUSICFUNTIONANIMATIONWIDGET_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2026 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 <QWidget>
23 
24 #include "musicglobaldefine.h"
25 
26 class QButtonGroup;
27 class QPropertyAnimation;
28 
33 {
34  Q_OBJECT
35 public:
39  explicit MusicBackgroundWidget(QWidget *parent = nullptr);
40 
44  void backgroundTransparent(int value);
45 
46 private:
50  virtual void paintEvent(QPaintEvent *event) override final;
51 
53 
54 };
55 
56 
61 {
62  Q_OBJECT
63 public:
67  explicit MusicLineBackgroundWidget(QWidget *parent = nullptr);
68 
72  void transparent(bool state);
73 
74 private:
78  virtual void paintEvent(QPaintEvent *event) override final;
79 
81 
82 };
83 
84 
89 {
90  Q_OBJECT
91 public:
95  explicit MusicAbstractAnimationWidget(QWidget *parent = nullptr);
100 
101 Q_SIGNALS:
105  void buttonClicked(int index);
106 
107 public Q_SLOTS:
111  virtual void switchToSelectedItemStyle(int index);
115  void animationChanged(const QVariant &value);
119  void finished();
120 
121 protected:
125  virtual void paintEvent(QPaintEvent *event) override;
126 
127  QPixmap m_pix;
128  int m_curIndex, m_preIndex, m_x;
129  float m_perWidth, m_totalWidth;
130  bool m_isAnimation, m_showState, m_showLine;
131 
132  QPropertyAnimation *m_animation;
133  QWidgetList m_container;
134  QButtonGroup *m_buttonGroup;
135 
136 };
137 
138 
143 {
144  Q_OBJECT
145 public:
149  explicit MusicFuntionAnimationWidget(QWidget *parent = nullptr);
150 
151 public Q_SLOTS:
155  virtual void switchToSelectedItemStyle(int index) override final;
156 
157 private:
161  virtual void paintEvent(QPaintEvent *event) override final;
162 
163 };
164 
165 
170 {
171  Q_OBJECT
172 public:
176  explicit MusicOptionAnimationWidget(QWidget *parent = nullptr);
177 
181  void reset(bool fore);
185  void select(int index);
186 
187 public Q_SLOTS:
191  virtual void switchToSelectedItemStyle(int index) override final;
192 
193 private:
197  virtual void paintEvent(QPaintEvent *event) override final;
198 
199 };
200 
201 
206 {
207  Q_OBJECT
208 public:
212  explicit MusicSkinAnimationWidget(QWidget *parent = nullptr);
213 
214 public Q_SLOTS:
218  virtual void switchToSelectedItemStyle(int index) override final;
219 
220 private:
224  virtual void paintEvent(QPaintEvent *event) override final;
225 
226 };
227 
228 #endif // MUSICFUNTIONANIMATIONWIDGET_H
#define TTK_MODULE_EXPORT
The class of the function animation widget.
virtual void paintEvent(QPaintEvent *event) override
The class of the background widget.
virtual void switchToSelectedItemStyle(int index)
The class of the line background widget.
The class of the function skin animation widget.
The class of the animation base widget.
state
Definition: http_parser.c:279
The class of the function option animation widget.