TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musiclrccontainerforinterior.h
Go to the documentation of this file.
1 #ifndef MUSICLRCCCONTAINERFORINTERIOR_H
2 #define MUSICLRCCCONTAINERFORINTERIOR_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 "musiclrccontainer.h"
23 
24 class TTKClickedLabel;
30 
35 {
36  Q_OBJECT
38 public:
42  explicit MusicLrcContainerForInterior(QWidget *parent = nullptr);
47 
51  virtual void startDrawLrc() override final;
55  virtual void stopDrawLrc() override final;
59  virtual void applyParameter() override final;
60 
64  void updateCurrentLrc(qint64 time);
68  void updateCurrentLrc(MusicLrcAnalysis::State state);
72  QString text() const;
76  qint64 setSongTimeSpeed(qint64 time);
80  void initFunctionLabel();
81 
85  inline void setLrcDisplayExpand(bool expand) { m_lrcDisplayAll = expand; }
89  inline bool lrcDisplayExpand() const { return m_lrcDisplayAll; }
93  inline bool isShowArtistBackground() const { return m_showArtistBackground; }
94 
98  void setLrcSize(int size);
102  int lrcSize() const;
106  void resizeWindow();
107 
111  void createFloatPlayWidget();
115  void lrcWidgetShowFullScreen();
116 
117 Q_SIGNALS:
121  void backgroundChanged();
125  void updateCurrentTime(qint64 time);
126 
127 public Q_SLOTS:
131  void lrcSizeChanged(QAction *action);
135  void lrcTimeSpeedChanged(QAction *action);
139  void revertLrcTimeSpeed();
143  void saveLrcTimeChanged();
147  void artistBackgroundChanged();
151  void lrcOpenFileDir() const;
155  void lrcCopyClipboard() const;
159  void showLocalLinkWidget();
163  void showSongCommentsWidget();
167  void showLrcPosterWidget();
168 
169 private Q_SLOTS:
173  void queryTranslatedLrcFinished(const QString &bytes);
177  void showSongMovieClicked();
181  void updateAnimationLrc();
185  void translatedLrcData();
186 
187 private:
191  virtual void contextMenuEvent(QContextMenuEvent *event) override final;
192  virtual void mousePressEvent(QMouseEvent *event) override final;
193  virtual void mouseMoveEvent(QMouseEvent *event) override final;
194  virtual void mouseReleaseEvent(QMouseEvent *event) override final;
195  virtual void mouseDoubleClickEvent(QMouseEvent *event) override final;
196  virtual void paintEvent(QPaintEvent *event) override final;
197  virtual void resizeEvent(QResizeEvent *event) override final;
201  void createColorMenu(QMenu &menu);
205  void revertTimeSpeed(qint64 pos);
209  void createNoLrcCurrentInfo();
213  void showNoLrcCurrentInfo();
217  void initCurrentLrc(const QString &str);
221  void setItemStyleSheet();
225  void setItemStyleSheet(int index, int size, int transparent);
229  int mapLrcSizeProperty(int size);
233  void setLrcSizeProperty(int property);
237  void resizeWidth(int w, int h);
238 
240  int m_lrcChangeOffset, m_lrcChangeDelta;
241  bool m_mouseLeftPressed, m_lrcChangeState, m_mouseMoved;
242 
243  bool m_lrcDisplayAll, m_showArtistBackground;
244  int m_animationFreshTime, m_lrcSizeProperty;
245 
247  QWidget *m_functionLabel;
254 
255 };
256 
257 #endif // MUSICLRCCCONTAINERFORINTERIOR_H
MusicLrcFloatPlayWidget * m_floatPlayWidget
The class of the interior lrc container.
#define TTK_MODULE_EXPORT
The class of the lrc song comment widget.
MusicVLayoutAnimationWidget * m_layoutWidget
voidpf void uLong size
Definition: ioapi.h:136
The class of the label widget that can click.
The class of the lrc container base.
The class of the lrc float widget.
The class of the lrc play float widget.
The class of the vertical layout float animation widget.
virtual void stopDrawLrc()=0
virtual void applyParameter()
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the lrc translate widget.
MusicLrcTranslatedWidget * m_translatedWidget
state
Definition: http_parser.c:279
virtual void startDrawLrc()=0