Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
22fc353a
Commit
22fc353a
authored
Jun 13, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsAudio): filter capture/playback devices
parent
566b1c0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
8 deletions
+25
-8
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+18
-3
SettingsModel.hpp
linphone-desktop/src/components/settings/SettingsModel.hpp
+4
-2
SettingsAudio.qml
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
+3
-3
No files found.
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
22fc353a
...
...
@@ -42,11 +42,26 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
// Audio.
// =============================================================================
QStringList
SettingsModel
::
getAudioDevices
()
const
{
QStringList
SettingsModel
::
getCaptureDevices
()
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
QStringList
list
;
for
(
const
auto
&
device
:
CoreManager
::
getInstance
()
->
getCore
()
->
getSoundDevices
())
for
(
const
auto
&
device
:
core
->
getSoundDevices
())
{
if
(
core
->
soundDeviceCanCapture
(
device
))
list
<<
::
Utils
::
coreStringToAppString
(
device
);
}
return
list
;
}
QStringList
SettingsModel
::
getPlaybackDevices
()
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
QStringList
list
;
for
(
const
auto
&
device
:
core
->
getSoundDevices
())
{
if
(
core
->
soundDeviceCanPlayback
(
device
))
list
<<
::
Utils
::
coreStringToAppString
(
device
);
}
return
list
;
}
...
...
linphone-desktop/src/components/settings/SettingsModel.hpp
View file @
22fc353a
...
...
@@ -37,7 +37,8 @@ class SettingsModel : public QObject {
// Audio. --------------------------------------------------------------------
Q_PROPERTY
(
QStringList
audioDevices
READ
getAudioDevices
CONSTANT
);
Q_PROPERTY
(
QStringList
captureDevices
READ
getCaptureDevices
CONSTANT
);
Q_PROPERTY
(
QStringList
playbackDevices
READ
getPlaybackDevices
CONSTANT
);
Q_PROPERTY
(
QString
captureDevice
READ
getCaptureDevice
WRITE
setCaptureDevice
NOTIFY
captureDeviceChanged
);
Q_PROPERTY
(
QString
playbackDevice
READ
getPlaybackDevice
WRITE
setPlaybackDevice
NOTIFY
playbackDeviceChanged
);
...
...
@@ -143,7 +144,8 @@ public:
// Audio. --------------------------------------------------------------------
QStringList
getAudioDevices
()
const
;
QStringList
getCaptureDevices
()
const
;
QStringList
getPlaybackDevices
()
const
;
QString
getCaptureDevice
()
const
;
void
setCaptureDevice
(
const
QString
&
device
);
...
...
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
View file @
22fc353a
...
...
@@ -29,7 +29,7 @@ TabContainer {
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
playbackDevice
})
model
:
SettingsModel
.
audio
Devices
model
:
SettingsModel
.
playback
Devices
onActivated
:
SettingsModel
.
playbackDevice
=
model
[
index
]
}
...
...
@@ -44,7 +44,7 @@ TabContainer {
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
captureDevice
})
model
:
SettingsModel
.
audio
Devices
model
:
SettingsModel
.
capture
Devices
onActivated
:
SettingsModel
.
captureDevice
=
model
[
index
]
}
...
...
@@ -59,7 +59,7 @@ TabContainer {
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
ringerDevice
})
model
:
SettingsModel
.
audio
Devices
model
:
SettingsModel
.
playback
Devices
onActivated
:
SettingsModel
.
ringerDevice
=
model
[
index
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment