TTKMusicPlayer  3.7.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 - 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 "ttkclickedlabel.h"
24 
25 class QCheckBox;
26 class QPushButton;
27 
32 {
33  Q_OBJECT
35 public:
39  explicit MusicLrcFloatPhotoItem(int index, QWidget *parent = nullptr);
44 
48  void setPhoto(const QString &path);
52  void setBoxChecked(bool checked);
56  bool boxChecked();
60  void setBoxVisible(bool v);
61 
62 Q_SIGNALS:
66  void boxClicked(int index);
70  void itemClicked(int index);
71 
72 public Q_SLOTS:
76  void sendUserBoxClicked();
80  void sendUserSelectArt();
81 
82 private:
86  virtual void enterEvent(QtEnterEvent *event) override final;
87 
88  int m_index;
89  QString m_pixPath;
90  QCheckBox *m_checkBox;
91 
92 };
93 
94 
99 {
100  Q_OBJECT
102 public:
106  explicit MusicLrcFloatPhotoWidget(QWidget *parent = nullptr);
111 
115  void resizeGeometry(int width, int height);
116 
117 public Q_SLOTS:
121  void show();
125  void close();
129  inline void parentClose() { QLabel::close(); }
130 
134  void manageButtonClicked();
138  void confirmButtonClicked();
142  void photoPrevious();
146  void photoNext();
150  void artistNameChanged();
154  void sendUserSelectArtBackground(int index);
158  void userSelectCheckBoxChecked(int index);
162  void selectAllStateChanged(bool state);
163 
164 private:
168  virtual void enterEvent(QtEnterEvent *) override final {}
169  virtual void leaveEvent(QEvent *) override final {}
173  void showArtistPhoto() const;
174 
177  QStringList m_photos;
178  QLabel *m_artistLabel;
179  QCheckBox *m_checkBox;
180  QPushButton *m_previous, *m_next;
181  QList<MusicLrcFloatPhotoItem*> m_planes;
182 
183 };
184 
185 #endif // MUSICLRCFLOATPHOTOWIDGET_H
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:160
#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:187
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
virtual void leaveEvent(QEvent *) overridefinal
virtual void enterEvent(QtEnterEvent *) overridefinal
state
Definition: http_parser.c:279