TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musiclrcfloatphotowidget.h
Go to the documentation of this file.
1 #ifndef MUSICLRCFLOATPHOTOWIDGET_H
2 #define MUSICLRCFLOATPHOTOWIDGET_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 "ttkclickedlabel.h"
24 
25 class QCheckBox;
26 class QPushButton;
27 
32 {
33  Q_OBJECT
34 public:
38  explicit MusicLrcFloatPhotoItem(int index, QWidget *parent = nullptr);
43 
47  void setPath(const QString &path);
51  void setBoxChecked(bool checked);
55  bool boxChecked();
59  void setBoxVisible(bool v);
60 
61 Q_SIGNALS:
65  void boxClicked(int index);
69  void itemClicked(int index);
70 
71 public Q_SLOTS:
75  void sendUserBoxClicked();
79  void sendUserSelectArt();
80 
81 private:
85  virtual void enterEvent(QtEnterEvent *event) override final;
86 
87  int m_index;
88  QString m_pixPath;
89  QCheckBox *m_checkBox;
90 
91 };
92 
93 
98 {
99  Q_OBJECT
100 public:
104  explicit MusicLrcFloatPhotoWidget(QWidget *parent = nullptr);
109 
113  void resizeGeometry(int width, int height);
114 
115 public Q_SLOTS:
119  void show();
123  void close();
127  inline void parentClose() { QLabel::close(); }
128 
132  void manageButtonClicked();
136  void confirmButtonClicked();
140  void imageNext();
144  void imagePrevious();
148  void artistNameChanged();
152  void sendUserSelectArtBackground(int index);
156  void userSelectCheckBoxChecked(int index);
160  void selectAllStateChanged(bool state);
161 
162 private:
166  virtual void enterEvent(QtEnterEvent *) override final {}
167  virtual void leaveEvent(QEvent *) override final {}
171  void showArtistImage() const;
172 
175  QStringList m_images;
176  QLabel *m_artistLabel;
177  QCheckBox *m_checkBox;
178  QPushButton *m_previous, *m_next;
179  QList<MusicLrcFloatPhotoItem*> m_planes;
180 
181 };
182 
183 #endif // MUSICLRCFLOATPHOTOWIDGET_H
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:178
#define TTK_MODULE_EXPORT
The class of the label widget that can click.
The class of the lrc photo float pixmap item.
The class of the float widget base.
The class of the lrc photo float widget.
QList< MusicLrcFloatPhotoItem * > m_planes
QSet< int > TTKIntSet
Definition: ttkqtglobal.h:199
virtual void leaveEvent(QEvent *) overridefinal
virtual void enterEvent(QtEnterEvent *) overridefinal
state
Definition: http_parser.c:279