玉兔远程控制
0.1.0-bate11
Toggle main menu visibility
载入中...
搜索中...
未找到
Plugins
Player
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
13
class
CFrmPlayer :
public
QWidget
14
{
15
Q_OBJECT
16
17
public
:
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
35
public
:
36
virtual
bool
eventFilter(QObject *watched, QEvent *event)
override
;
37
38
public
Q_SLOTS:
39
void
slotPositionChanged(qint64 pos, qint64 duration);
40
Q_SIGNALS:
41
void
sigChangePosition(qint64 pos);
47
void
sigViewerFocusIn
(QWidget* pView);
48
49
protected
:
50
virtual
void
resizeEvent(QResizeEvent *event)
override
;
51
virtual
void
focusInEvent(QFocusEvent *event)
override
;
52
virtual
void
focusOutEvent(QFocusEvent *event)
override
;
53
54
private
Q_SLOTS:
55
void
slotAudioMuted(
bool
bMuted);
56
void
slotAduioVolume(
int
volume);
57
void
slotStart(
bool
bStart);
58
59
private
:
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
CFrmPlayer::sigViewerFocusIn
void sigViewerFocusIn(QWidget *pView)
视图获得焦点
CParameterPlayer
定义
ParameterPlayer.h:9
作者:康林 (kl222@126.com)
版权所有(c) 康林工作室 保留所有权力