TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicvideoplaywidget.h
Go to the documentation of this file.
1 #ifndef MUSICVIDEOPLAYWIDGET_H
2 #define MUSICVIDEOPLAYWIDGET_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 "ttkabstractmovewidget.h"
24 
25 class QLabel;
26 class QPushButton;
27 class QToolButton;
28 class QStackedWidget;
29 class QParallelAnimationGroup;
30 class MusicVideoView;
32 class MusicItemQueryEdit;
33 
38 {
39  Q_OBJECT
41 public:
45  explicit MusicVideoPlayWidget(QWidget *parent = nullptr);
50 
54  void popupMode(bool popup);
58  bool isPopupMode() const;
59 
63  void resizeWindow();
67  void resizeGeometry(bool resize);
71  void resizeGeometry(int width, int height);
72 
73 Q_SIGNALS:
77  void popupButtonClicked(bool popup);
81  void fullscreenButtonClicked(bool popup);
82 
83 public Q_SLOTS:
87  void switchToSearchTable();
91  void switchToPlayView();
95  void videoResearchButtonSearched(const QString &name);
99  void videoResearchButtonSearched(const QVariant &data);
103  void startToSearchByID(const QString &name);
107  void mediaUrlChanged(const QString &url);
111  void mediaUrlPathChanged(const MusicVideoItem &item);
112 
116  void popupButtonClicked();
120  void fullscreenButtonClicked();
124  void downloadButtonClicked();
128  void shareButtonClicked();
129 
130 private Q_SLOTS:
134  void leaveTimeout();
135 
136 private:
140  virtual void resizeEvent(QResizeEvent *event) override final;
141  virtual void enterEvent(QtEnterEvent *event) override final;
142  virtual void leaveEvent(QEvent *event) override final;
146  void setTitleText(const QString &text);
150  void start(int topst, int topend, int ctrlst, int ctrlend);
151 
152  QTimer *m_leaverTimer;
153  QParallelAnimationGroup *m_leaverAnimation;
154 
155  QWidget *m_topWidget;
156  QLabel *m_textLabel;
157  QToolButton *m_backButton;
158  QPushButton *m_closeButton;
159  QStackedWidget *m_stackedWidget;
165 
166 };
167 
168 #endif //MUSICVIDEOPLAYWIDGET_H
169 
QParallelAnimationGroup * m_leaverAnimation
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:160
#define TTK_MODULE_EXPORT
QStackedWidget * m_stackedWidget
MusicVideoFloatWidget * m_videoFloatWidget
MusicVideoSearchTableWidget * m_tableWidget
const char * name
Definition: http_parser.c:458
The class of the video play widget.
The class of the ttk moving widget base.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the video float widget.
The class of the video view widget.
MusicItemQueryEdit * m_searchEdit
The class of the video item play data item.
MusicVideoView * m_videoView
The class of the query line edit widget.
The class of the video search table widget.