29 qDebug(log) << Q_FUNC_INFO;
35 nRet = SetParameter(&m_Parameters);
39#ifdef HAVE_QVideoWidget
40 m_Menu.addAction(m_Player.m_paStart);
41 m_Menu.addAction(m_Player.m_paPause);
43 m_Menu.addAction(m_Player.m_paRecord);
44 m_Menu.addAction(m_Player.m_paRecordPause);
46 m_Menu.addAction(m_Player.m_paScreenShot);
47 m_Menu.addSeparator();
48 m_Menu.addAction(m_Player.m_paSettings);
50 m_Player.m_paStart, &QAction::toggle);
52 check = connect(m_Player.m_paStart, SIGNAL(toggled(
bool)),
53 this, SIGNAL(sigStart(
bool)));
55 check = connect(m_Player.m_paPause, SIGNAL(toggled(
bool)),
56 this, SIGNAL(sigPause(
bool)));
59 check = connect(m_Player.m_paRecord, SIGNAL(toggled(
bool)),
60 m_pRecord ,SIGNAL(toggled(
bool)));
62 check = connect(m_Player.m_paRecordPause, SIGNAL(toggled(
bool)),
63 m_pRecordPause, SIGNAL(toggled(
bool)));
66 check = connect(m_Player.m_paScreenShot, &QAction::triggered,
67 m_pScreenShot, &QAction::triggered);
69 check = connect(m_Player.m_paSettings, &QAction::triggered,
70 m_pSettings, &QAction::trigger);
74 m_Player.SetParameter(&m_Parameters);
77 check = connect(&m_Player, SIGNAL(sigChangePosition(qint64)),
78 this, SIGNAL(sigChangePosition(qint64)));
81 QAction* pStart = m_Menu.addAction(
82 QIcon::fromTheme(
"media-playback-start"), tr(
"Start"));
83 pStart->setCheckable(
true);
85 pStart, &QAction::toggle);
87 check = connect(pStart, &QAction::toggled,
88 this, [&](
bool checked){
89 QAction* p = qobject_cast<QAction*>(sender());
92 p->setIcon(QIcon::fromTheme(
"media-playback-stop"));
93 p->setText(tr(
"Stop"));
94 m_pPause->setEnabled(
true);
95 m_pPause->setChecked(
false);
96 m_pScreenShot->setEnabled(
true);
98 m_pRecord->setEnabled(
true);
99 m_pRecord->setChecked(
false);
100 m_pRecordPause->setEnabled(
true);
101 m_pRecordPause->setChecked(
false);
104 p->setIcon(QIcon::fromTheme(
"media-playback-start"));
105 p->setText(tr(
"Start"));
106 m_pPause->setEnabled(
false);
107 m_pPause->setChecked(
false);
108 m_pScreenShot->setEnabled(
false);
110 m_pRecord->setEnabled(
false);
111 m_pRecord->setChecked(
false);
112 m_pRecordPause->setEnabled(
false);
113 m_pRecordPause->setChecked(
false);
116 emit sigStart(checked);
119 m_pPause = m_Menu.addAction(
120 QIcon::fromTheme(
"media-playback-pause"), tr(
"pause"));
121 m_pPause->setCheckable(
true);
122 check = connect(m_pPause, SIGNAL(toggled(
bool)),
123 this, SIGNAL(sigPause(
bool)));
126 m_Menu.addAction(m_pRecord);
127 m_Menu.addAction(m_pRecordPause);
129 m_Menu.addAction(m_pScreenShot);
130 m_Menu.addSeparator();
131 m_Menu.addAction(m_pSettings);