TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicvideoview.h
Go to the documentation of this file.
1 #ifndef MUSICVIDEOVIEW_H
2 #define MUSICVIDEOVIEW_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 <QAbstractScrollArea>
23 #include "musicglobaldefine.h"
25 
26 class MusicCoreMPlayer;
27 class MusicBarrageWidget;
28 
32 class TTK_MODULE_EXPORT MusicViewWidget : public QWidget
33 {
34  Q_OBJECT
35 public:
39  explicit MusicViewWidget(QWidget *parent = nullptr);
43  ~MusicViewWidget();
44 
45 Q_SIGNALS:
49  void fullScreenMode();
53  void timeToPlay();
54 
55 private:
59  virtual void mousePressEvent(QMouseEvent *event) override final;
60  virtual void mouseMoveEvent(QMouseEvent *event) override final;
61  virtual void mouseDoubleClickEvent(QMouseEvent *event) override final;
62  virtual void contextMenuEvent(QContextMenuEvent *event) override final;
63 
64  QTimer *m_clickedTimer;
66 
67 };
68 
69 
73 class TTK_MODULE_EXPORT MusicVideoView : public QAbstractScrollArea
74 {
75  Q_OBJECT
76 public:
80  explicit MusicVideoView(QWidget *parent = nullptr);
84  ~MusicVideoView();
85 
89  void setMedia(const QString &url);
93  void setBarrage(const QString &name, const QString &id);
94 
98  void resizeGeometry(int width, int height);
102  void createRightMenu();
103 
107  inline MusicVideoControlWidget *controlBarWidget() const noexcept { return m_videoControl; }
108 
109 Q_SIGNALS:
113  void searchButtonClicked();
117  void popupButtonClicked();
121  void fullscreenButtonClicked();
125  void downloadButtonClicked();
129  void shareButtonClicked();
130 
131 public Q_SLOTS:
135  void play();
136 
137 private Q_SLOTS:
141  void stop();
145  void positionChanged(qint64 position);
149  void durationChanged(qint64 duration);
153  void setPosition(int position);
157  void volumeChanged(int volume);
161  void mediaChanged(const QString &url);
165  void mediaPlayFinished(int code);
166 
170  void fullscreenButtonTrigger();
171 
172 private:
176  virtual void contextMenuEvent(QContextMenuEvent *event) override final;
177 
182 
183 };
184 
185 #endif // MUSICVIDEOVIEW_H
#define TTK_MODULE_EXPORT
MusicBarrageWidget * m_barrageWidget
The class of the video controller.
MusicViewWidget * m_videoWidget
const char * name
Definition: http_parser.c:458
MusicCoreMPlayer * m_player
MusicVideoControlWidget * controlBarWidget() const noexcept
QTimer * m_clickedTimer
The class of the video show widget.
The class of the mplayer core.
Definition: inftrees.h:24
MusicVideoControlWidget * m_videoControl
The class of the video view widget.
#define const
Definition: zconf.h:233
The class of the barrage widget.