Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-windows
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-windows
Commits
aa50336a
Commit
aa50336a
authored
Jun 8, 2015
by
Edric Milaret
Browse files
Options
Downloads
Patches
Plain Diff
video: add live video source switching
Refs #74732 Change-Id: I9b04690a4be797ceacb1a81c6cef3cf8a836755a
parent
7153eed5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
videowidget.cpp
+22
-0
22 additions, 0 deletions
videowidget.cpp
with
22 additions
and
0 deletions
videowidget.cpp
+
22
−
0
View file @
aa50336a
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
#include
<QApplication>
#include
<QApplication>
#include
<QDesktopWidget>
#include
<QDesktopWidget>
#include
<memory>
#include
"video/devicemodel.h"
#include
"selectareadialog.h"
#include
"selectareadialog.h"
VideoWidget
::
VideoWidget
(
QWidget
*
parent
)
:
VideoWidget
::
VideoWidget
(
QWidget
*
parent
)
:
...
@@ -162,6 +166,7 @@ VideoWidget::mouseDoubleClickEvent(QMouseEvent *e) {
...
@@ -162,6 +166,7 @@ VideoWidget::mouseDoubleClickEvent(QMouseEvent *e) {
this
->
show
();
this
->
show
();
}
}
}
}
void
void
VideoWidget
::
showContextMenu
(
const
QPoint
&
pos
)
VideoWidget
::
showContextMenu
(
const
QPoint
&
pos
)
{
{
...
@@ -169,6 +174,23 @@ VideoWidget::showContextMenu(const QPoint& pos)
...
@@ -169,6 +174,23 @@ VideoWidget::showContextMenu(const QPoint& pos)
QMenu
menu
;
QMenu
menu
;
for
(
auto
device
:
Video
::
DeviceModel
::
instance
()
->
devices
())
{
std
::
unique_ptr
<
QAction
>
deviceAction
(
new
QAction
(
device
->
name
(),
this
));
deviceAction
->
setCheckable
(
true
);
if
(
device
==
Video
::
DeviceModel
::
instance
()
->
activeDevice
())
deviceAction
->
setChecked
(
true
);
auto
ptr
=
deviceAction
.
release
();
menu
.
addAction
(
ptr
);
connect
(
ptr
,
&
QAction
::
toggled
,
[
=
](
bool
checked
)
{
if
(
checked
==
true
)
{
Video
::
SourceModel
::
instance
()
->
switchTo
(
device
);
Video
::
DeviceModel
::
instance
()
->
setActive
(
device
);
}
});
}
menu
.
addSeparator
();
auto
shareAction
=
new
QAction
(
"Share entire screen"
,
this
);
auto
shareAction
=
new
QAction
(
"Share entire screen"
,
this
);
menu
.
addAction
(
shareAction
);
menu
.
addAction
(
shareAction
);
connect
(
shareAction
,
&
QAction
::
triggered
,
[
=
]()
{
connect
(
shareAction
,
&
QAction
::
triggered
,
[
=
]()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment