Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
FrmPlayer.h
1// Author: Kang Lin <kl222@126.com>
2
3#ifndef FRMPLAYER_H
4#define FRMPLAYER_H
5
6#include <QVideoWidget>
7#include <QToolBar>
8#include <QSlider>
9#include <QProgressBar>
10#include <QLabel>
11#include "ParameterPlayer.h"
12
13class CFrmPlayer : public QWidget
14{
15 Q_OBJECT
16
17public:
18 CFrmPlayer(QWidget *parent = nullptr);
19 virtual ~CFrmPlayer();
20
21 QVideoSink* videoSink();
22 int SetParameter(CParameterPlayer* pParameter);
23
24 QAction* m_paStart;
25 QAction* m_paPause;
26#if HAVE_QT6_RECORD
27 QAction* m_paRecord;
28 QAction* m_paRecordPause;
29#endif
30 QAction* m_paScreenShot;
31 QAction* m_paMuted;
32 QAction* m_paVolume;
33 QAction* m_paSettings;
34
35public:
36 virtual bool eventFilter(QObject *watched, QEvent *event) override;
37
38public Q_SLOTS:
39 void slotPositionChanged(qint64 pos, qint64 duration);
40Q_SIGNALS:
41 void sigChangePosition(qint64 pos);
42
43protected:
44 virtual void resizeEvent(QResizeEvent *event) override;
45
46private Q_SLOTS:
47 void slotAudioMuted(bool bMuted);
48 void slotAduioVolume(int volume);
49 void slotStart(bool bStart);
50
51private:
52 QVideoWidget m_VideoWidget;
53 QToolBar m_ToolBar;
54 QSlider m_pbVideo;
55 bool m_bMoveVideo;
56 QSlider m_pbVolume;
57 CParameterPlayer* m_pParameter;
58 QLabel* m_pLabel;
59
60 int AdjustCompone(const QSize &s);
61};
62
63#endif // FRMPLAYER_H