TTKMusicPlayer  4.3.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 - 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 "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
40 public:
44  explicit MusicVideoPlayWidget(QWidget *parent = nullptr);
49 
53  void popupMode(bool popup);
57  bool isPopupMode() const;
58 
62  void resizeGeometry();
66  void resizeGeometry(bool resize);
70  void resizeGeometry(int width, int height);
71 
72 Q_SIGNALS:
76  void popupButtonClicked(bool popup);
80  void fullscreenButtonClicked(bool popup);
81 
82 public Q_SLOTS:
86  void switchToSearchTable();
90  void switchToPlayView();
94  void videoResearchButtonSearched(const QString &name);
98  void videoResearchButtonSearched(const QVariant &data);
102  void startToSearchByID(const QString &name);
106  void mediaUrlChanged(const QString &url);
110  void mediaUrlPathChanged(const MusicVideoItem &item);
111 
115  void popupButtonClicked();
119  void fullscreenButtonClicked();
123  void downloadButtonClicked();
127  void shareButtonClicked();
128 
129 private Q_SLOTS:
133  void leaveTimeout();
134 
135 private:
139  virtual void resizeEvent(QResizeEvent *event) override final;
140  virtual void enterEvent(QtEnterEvent *event) override final;
141  virtual void leaveEvent(QEvent *event) override final;
145  void setTitleText(const QString &text);
149  void start(int topst, int topend, int ctrlst, int ctrlend);
150 
151  QTimer *m_leaverTimer;
152  QParallelAnimationGroup *m_leaverAnimation;
153 
154  QWidget *m_topWidget;
155  QLabel *m_textLabel;
156  QToolButton *m_backButton;
157  QPushButton *m_closeButton;
158  QStackedWidget *m_stackedWidget;
164 
165 };
166 
167 #endif // MUSICVIDEOPLAYWIDGET_H
168 
QParallelAnimationGroup * m_leaverAnimation
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:178
#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.
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.