TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musiclrcposterwidget.h
Go to the documentation of this file.
1 #ifndef MUSICLRCPOSTERWIDGET_H
2 #define MUSICLRCPOSTERWIDGET_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 "musicwidgetheaders.h"
25 
26 namespace Ui {
28 }
29 
34 {
35  Q_OBJECT
36 public:
37  enum class Format
38  {
39  Type01,
40  Type02,
41  Type03,
42  Type04,
43  Type05,
44  Type06,
45  Type07,
46  Type08,
47  Type09,
48  Type10,
49  Type11,
50  Type12,
51  Type13,
52  Type14,
53  Type15,
54  Type16,
55  Type17
56  };
57 
61  explicit MusicLrcPosterItemWidget(QWidget *parent = nullptr);
62 
66  bool hasScroll() const noexcept;
70  void setImagePath(const QString &path);
74  void setCurrentSongName(const QString &name) noexcept;
75 
76 public Q_SLOTS:
80  void textChanged(const QStringList &data);
84  void currentTypeChanged(int type);
85 
86 private:
90  virtual void paintEvent(QPaintEvent *event) override final;
94  void drawTheme1(QPainter *painter);
98  void drawTheme2(QPainter *painter);
102  void drawTheme3(QPainter *painter);
106  void drawTheme4(QPainter *painter);
110  void drawTheme5(QPainter *painter);
114  void drawTheme6(QPainter *painter);
118  void drawTheme7(QPainter *painter);
122  void drawTheme8(QPainter *painter);
126  void drawTheme9(QPainter *painter);
130  void drawTheme10(QPainter *painter);
134  void drawTheme11(QPainter *painter);
138  void drawTheme12(QPainter *painter);
142  void drawTheme13(QPainter *painter);
146  void drawTheme14(QPainter *painter);
150  void drawTheme15(QPainter *painter);
154  void drawTheme16(QPainter *painter);
158  void drawTheme17(QPainter *painter);
159 
160  Format m_type;
161  QStringList m_data;
162  QPixmap m_pixmap;
163  QString m_title;
164 
165 };
166 
167 
172 {
173  Q_OBJECT
174 public:
178  explicit MusicLrcPosterTableWidget(QWidget *parent = nullptr);
179 
183  void addCellItems(const QStringList &lrcs);
184 
185 Q_SIGNALS:
189  void textChanged(const QStringList &data);
190 
191 public Q_SLOTS:
195  virtual void itemCellClicked(int row, int column) override final;
196 
197 };
198 
199 
204 {
205  Q_OBJECT
206 public:
210  explicit MusicLrcPosterThemeListWidget(QWidget *parent = nullptr);
211 
212 private:
216  void addCelltItems();
217 
218 };
219 
220 
225 {
226  Q_OBJECT
227 public:
231  explicit MusicLrcPosterWidget(QWidget *parent = nullptr);
236 
240  void setCurrentLrcs(const QStringList &lrcs, const QString &name);
241 
242 
243 public Q_SLOTS:
247  void openButtonClicked();
251  void saveButtonClicked();
252 
253 private:
254  Ui::MusicLrcPosterWidget *m_ui;
257 
258 };
259 
260 #endif // MUSICLRCPOSTERWIDGET_H
#define TTK_MODULE_EXPORT
The input file format support.
Definition: format.h:29
The class of the lrc art poster table widget.
The class of the fill item table widget.
The class of the lrc art poster maker widget.
const char * name
Definition: http_parser.c:458
The class of the lrc art poster maker item widget.
MusicLrcPosterItemWidget * m_itemWidget
The class of the moving dialog base.
Ui::MusicLrcPosterWidget * m_ui
MusicLrcPosterThemeListWidget * m_themeWidget
#define const
Definition: zconf.h:233
The class of the lrc art poster theme list widget.