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
9594e158
Commit
9594e158
authored
Apr 04, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/modules/Linphone/Codecs): in progress
parent
dad9c3fc
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
184 additions
and
11 deletions
+184
-11
CMakeLists.txt
linphone-desktop/CMakeLists.txt
+6
-4
en.ts
linphone-desktop/assets/languages/en.ts
+27
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+27
-0
AbstractCodecsModel.cpp
...one-desktop/src/components/codecs/AbstractCodecsModel.cpp
+34
-0
AbstractCodecsModel.hpp
...one-desktop/src/components/codecs/AbstractCodecsModel.hpp
+43
-0
AudioCodecsModel.cpp
linphone-desktop/src/components/codecs/AudioCodecsModel.cpp
+1
-1
AudioCodecsModel.hpp
linphone-desktop/src/components/codecs/AudioCodecsModel.hpp
+2
-2
CodecsModel.cpp
linphone-desktop/src/components/codecs/CodecsModel.cpp
+6
-0
CodecsModel.hpp
linphone-desktop/src/components/codecs/CodecsModel.hpp
+2
-0
VideoCodecsModel.cpp
linphone-desktop/src/components/codecs/VideoCodecsModel.cpp
+1
-1
VideoCodecsModel.hpp
linphone-desktop/src/components/codecs/VideoCodecsModel.hpp
+2
-2
CodecsViewer.qml
linphone-desktop/ui/modules/Linphone/Codecs/CodecsViewer.qml
+32
-0
cmake-builder
submodules/cmake-builder
+1
-1
No files found.
linphone-desktop/CMakeLists.txt
View file @
9594e158
...
...
@@ -92,8 +92,9 @@ set(SOURCES
src/components/camera/MSFunctions.cpp
src/components/chat/ChatModel.cpp
src/components/chat/ChatProxyModel.cpp
src/components/codecs/CodecsModel.cpp
src/components/codecs/
Abstract
CodecsModel.cpp
src/components/codecs/AudioCodecsModel.cpp
src/components/codecs/CodecsModel.cpp
src/components/codecs/VideoCodecsModel.cpp
src/components/contact/ContactModel.cpp
src/components/contact/VcardModel.cpp
...
...
@@ -129,9 +130,10 @@ set(HEADERS
src/components/calls/CallsListModel.hpp
src/components/chat/ChatModel.hpp
src/components/chat/ChatProxyModel.hpp
src/components/codecs/CodecsModel.cpp
src/components/codecs/AudioCodecsModel.cpp
src/components/codecs/VideoCodecsModel.cpp
src/components/codecs/CodecsModel.hpp
src/components/codecs/AbstractCodecsModel.hpp
src/components/codecs/AudioCodecsModel.hpp
src/components/codecs/VideoCodecsModel.hpp
src/components/contact/ContactModel.hpp
src/components/contact/VcardModel.hpp
src/components/contacts/ContactsListModel.hpp
...
...
linphone-desktop/assets/languages/en.ts
View file @
9594e158
...
...
@@ -236,6 +236,33 @@
Server
url
not
configured
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CodecsViewer
<
/name
>
<
message
>
<
source
>
codecMime
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecEncoderDescription
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecEncoderClockRate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecBitrate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecRecvFmtp
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecStatus
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ConfirmDialog
<
/name
>
<
message
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
9594e158
...
...
@@ -236,6 +236,33 @@
Url
du
serveur
non
configur
é
e
.
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
CodecsViewer
<
/name
>
<
message
>
<
source
>
codecMime
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecEncoderDescription
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecEncoderClockRate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecBitrate
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecRecvFmtp
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
codecStatus
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
ConfirmDialog
<
/name
>
<
message
>
...
...
linphone-desktop/src/components/codecs/AbstractCodecsModel.cpp
0 → 100644
View file @
9594e158
/*
* AbstractCodecsModel.cpp
* Copyright (C) 2017 Belledonne Communications, Grenoble, France
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Created on: April 4, 2017
* Author: Ronan Abhamon
*/
#include "CodecsModel.hpp"
#include "AbstractCodecsModel.hpp"
// =============================================================================
AbstractCodecsModel
::
AbstractCodecsModel
(
QObject
*
parent
)
:
QSortFilterProxyModel
(
parent
)
{}
void
AbstractCodecsModel
::
enableCodec
(
int
id
,
bool
status
)
{
QModelIndex
source_index
=
mapToSource
(
index
(
id
,
0
));
static_cast
<
CodecsModel
*>
(
sourceModel
())
->
enableCodec
(
source_index
.
row
(),
status
);
}
linphone-desktop/src/components/codecs/AbstractCodecsModel.hpp
0 → 100644
View file @
9594e158
/*
* AbstractCodecsModel.hpp
* Copyright (C) 2017 Belledonne Communications, Grenoble, France
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Created on: April 4, 2017
* Author: Ronan Abhamon
*/
#ifndef ABSTRACT_CODECS_MODEL_H_
#define ABSTRACT_CODECS_MODEL_H_
#include <QSortFilterProxyModel>
// =============================================================================
class
AbstractCodecsModel
:
public
QSortFilterProxyModel
{
Q_OBJECT
;
public:
AbstractCodecsModel
(
QObject
*
parent
=
Q_NULLPTR
);
virtual
~
AbstractCodecsModel
()
=
default
;
Q_INVOKABLE
void
enableCodec
(
int
id
,
bool
status
);
protected:
virtual
bool
filterAcceptsRow
(
int
source_row
,
const
QModelIndex
&
source_parent
)
const
override
=
0
;
};
#endif // ABSTRACT_CODECS_MODEL_H_
linphone-desktop/src/components/codecs/AudioCodecsModel.cpp
View file @
9594e158
...
...
@@ -26,7 +26,7 @@
// =============================================================================
AudioCodecsModel
::
AudioCodecsModel
(
QObject
*
parent
)
:
QSortFilterProxy
Model
(
parent
)
{
AudioCodecsModel
::
AudioCodecsModel
(
QObject
*
parent
)
:
AbstractCodecs
Model
(
parent
)
{
setSourceModel
(
CoreManager
::
getInstance
()
->
getCodecsModel
());
}
...
...
linphone-desktop/src/components/codecs/AudioCodecsModel.hpp
View file @
9594e158
...
...
@@ -23,11 +23,11 @@
#ifndef AUDIO_CODECS_MODEL_H_
#define AUDIO_CODECS_MODEL_H_
#include
<QSortFilterProxyModel>
#include
"AbstractCodecsModel.hpp"
// =============================================================================
class
AudioCodecsModel
:
public
QSortFilterProxy
Model
{
class
AudioCodecsModel
:
public
AbstractCodecs
Model
{
Q_OBJECT
;
public:
...
...
linphone-desktop/src/components/codecs/CodecsModel.cpp
View file @
9594e158
...
...
@@ -83,3 +83,9 @@ QVariant CodecsModel::data (const QModelIndex &index, int role) const {
return
QVariant
();
}
// -----------------------------------------------------------------------------
void
CodecsModel
::
enableCodec
(
int
id
,
bool
status
)
{
// TODO.
}
linphone-desktop/src/components/codecs/CodecsModel.hpp
View file @
9594e158
...
...
@@ -47,6 +47,8 @@ public:
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
;
void
enableCodec
(
int
id
,
bool
status
);
private:
QVariantList
m_codecs
;
};
...
...
linphone-desktop/src/components/codecs/VideoCodecsModel.cpp
View file @
9594e158
...
...
@@ -26,7 +26,7 @@
// =============================================================================
VideoCodecsModel
::
VideoCodecsModel
(
QObject
*
parent
)
:
QSortFilterProxy
Model
(
parent
)
{
VideoCodecsModel
::
VideoCodecsModel
(
QObject
*
parent
)
:
AbstractCodecs
Model
(
parent
)
{
setSourceModel
(
CoreManager
::
getInstance
()
->
getCodecsModel
());
}
...
...
linphone-desktop/src/components/codecs/VideoCodecsModel.hpp
View file @
9594e158
...
...
@@ -23,11 +23,11 @@
#ifndef VIDEO_CODECS_MODEL_H_
#define VIDEO_CODECS_MODEL_H_
#include
<QSortFilterProxyModel>
#include
"AbstractCodecsModel.hpp"
// =============================================================================
class
VideoCodecsModel
:
public
QSortFilterProxy
Model
{
class
VideoCodecsModel
:
public
AbstractCodecs
Model
{
Q_OBJECT
;
public:
...
...
linphone-desktop/ui/modules/Linphone/Codecs/CodecsViewer.qml
View file @
9594e158
...
...
@@ -21,6 +21,36 @@ Column {
}
height
:
CodecsViewerStyle
.
legend
.
height
spacing
:
CodecsViewerStyle
.
column
.
spacing
CodecLegend
{
Layout.preferredWidth
:
CodecsViewerStyle
.
column
.
mimeWidth
text
:
qsTr
(
'
codecMime
'
)
}
CodecLegend
{
Layout.preferredWidth
:
CodecsViewerStyle
.
column
.
encoderDescriptionWidth
text
:
qsTr
(
'
codecEncoderDescription
'
)
}
CodecLegend
{
Layout.preferredWidth
:
CodecsViewerStyle
.
column
.
clockRateWidth
text
:
qsTr
(
'
codecEncoderClockRate
'
)
}
CodecLegend
{
Layout.preferredWidth
:
CodecsViewerStyle
.
column
.
bitrateWidth
text
:
qsTr
(
'
codecBitrate
'
)
}
CodecLegend
{
Layout.preferredWidth
:
CodecsViewerStyle
.
column
.
recvFmtpWidth
text
:
qsTr
(
'
codecRecvFmtp
'
)
}
CodecLegend
{
text
:
qsTr
(
'
codecStatus
'
)
}
}
// ---------------------------------------------------------------------------
...
...
@@ -78,7 +108,9 @@ Column {
}
Switch
{
checked
:
$codec
.
enabled
onClicked
:
view
.
model
.
enableCodec
(
index
,
!
checked
)
}
}
...
...
cmake-builder
@
bc6df3cf
Subproject commit
adfd9bf2811f94337364642d2115c93c8ef5d05f
Subproject commit
bc6df3cfa2c2f8cc54fb225735374c246b68721b
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