Rabbit Remote Control 0.0.34
All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
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);
47 void sigViewerFocusIn(QWidget* pView);
48
49protected:
50 virtual void resizeEvent(QResizeEvent *event) override;
51 virtual void focusInEvent(QFocusEvent *event) override;
52 virtual void focusOutEvent(QFocusEvent *event) override;
53
54private Q_SLOTS:
55 void slotAudioMuted(bool bMuted);
56 void slotAduioVolume(int volume);
57 void slotStart(bool bStart);
58
59private:
60 QVideoWidget m_VideoWidget;
61 QToolBar m_ToolBar;
62 QSlider m_pbVideo;
63 bool m_bMoveVideo;
64 QSlider m_pbVolume;
65 CParameterPlayer* m_pParameter;
66 QLabel* m_pLabel;
67
68 int AdjustCompone(const QSize &s);
69};
70
71#endif // FRMPLAYER_H
void sigViewerFocusIn(QWidget *pView)
The view is focus.