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
bd2729ba
Commit
bd2729ba
authored
May 18, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/ConferenceManager): in progress
parent
a52d0666
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
17 deletions
+13
-17
App.cpp
linphone-desktop/src/app/App.cpp
+1
-1
Components.hpp
linphone-desktop/src/components/Components.hpp
+0
-1
ConferenceAddModel.cpp
...-desktop/src/components/conference/ConferenceAddModel.cpp
+8
-9
ConferenceAddModel.hpp
...-desktop/src/components/conference/ConferenceAddModel.hpp
+2
-4
ConferenceHelperModel.hpp
...sktop/src/components/conference/ConferenceHelperModel.hpp
+2
-2
No files found.
linphone-desktop/src/app/App.cpp
View file @
bd2729ba
...
...
@@ -359,7 +359,7 @@ void App::registerTypes () {
registerMetaType
<
ChatModel
::
EntryType
>
(
"ChatModel::EntryType"
);
registerUncreatableType
(
CallModel
,
"CallModel"
);
registerUncreatableType
(
ConferenceAddModel
,
"ConferenceAddModel"
);
registerUncreatableType
(
Conference
HelperModel
::
Conference
AddModel
,
"ConferenceAddModel"
);
registerUncreatableType
(
ContactModel
,
"ContactModel"
);
registerUncreatableType
(
SipAddressObserver
,
"SipAddressObserver"
);
registerUncreatableType
(
VcardModel
,
"VcardModel"
);
...
...
linphone-desktop/src/components/Components.hpp
View file @
bd2729ba
...
...
@@ -32,7 +32,6 @@
#include "codecs/AudioCodecsModel.hpp"
#include "codecs/VideoCodecsModel.hpp"
#include "conference/ConferenceAddModel.hpp"
#include "conference/ConferenceHelperModel.hpp"
#include "contacts/ContactsListProxyModel.hpp"
#include "core/CoreManager.hpp"
#include "presence/OwnPresenceModel.hpp"
...
...
linphone-desktop/src/components/conference/ConferenceAddModel.cpp
View file @
bd2729ba
...
...
@@ -22,7 +22,6 @@
#include "../../Utils.hpp"
#include "../core/CoreManager.hpp"
#include "ConferenceHelperModel.hpp"
#include "ConferenceAddModel.hpp"
...
...
@@ -30,7 +29,7 @@ using namespace std;
// =============================================================================
ConferenceAddModel
::
ConferenceAddModel
(
QObject
*
parent
)
:
QAbstractListModel
(
parent
)
{
Conference
HelperModel
::
Conference
AddModel
::
ConferenceAddModel
(
QObject
*
parent
)
:
QAbstractListModel
(
parent
)
{
mConferenceHelperModel
=
qobject_cast
<
ConferenceHelperModel
*>
(
parent
);
Q_ASSERT
(
mConferenceHelperModel
!=
nullptr
);
...
...
@@ -38,17 +37,17 @@ ConferenceAddModel::ConferenceAddModel (QObject *parent) : QAbstractListModel(pa
addToConference
(
participant
);
}
int
ConferenceAddModel
::
rowCount
(
const
QModelIndex
&
)
const
{
int
Conference
HelperModel
::
Conference
AddModel
::
rowCount
(
const
QModelIndex
&
)
const
{
return
mRefs
.
count
();
}
QHash
<
int
,
QByteArray
>
ConferenceAddModel
::
roleNames
()
const
{
QHash
<
int
,
QByteArray
>
Conference
HelperModel
::
Conference
AddModel
::
roleNames
()
const
{
QHash
<
int
,
QByteArray
>
roles
;
roles
[
Qt
::
DisplayRole
]
=
"$sipAddress"
;
return
roles
;
}
QVariant
ConferenceAddModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
{
QVariant
Conference
HelperModel
::
Conference
AddModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
{
int
row
=
index
.
row
();
if
(
!
index
.
isValid
()
||
row
<
0
||
row
>=
mRefs
.
count
())
...
...
@@ -62,7 +61,7 @@ QVariant ConferenceAddModel::data (const QModelIndex &index, int role) const {
// -----------------------------------------------------------------------------
bool
ConferenceAddModel
::
addToConference
(
const
QString
&
sipAddress
)
{
bool
Conference
HelperModel
::
Conference
AddModel
::
addToConference
(
const
QString
&
sipAddress
)
{
if
(
mSipAddresses
.
contains
(
sipAddress
))
return
false
;
...
...
@@ -83,7 +82,7 @@ bool ConferenceAddModel::addToConference (const QString &sipAddress) {
return
true
;
}
bool
ConferenceAddModel
::
removeFromConference
(
const
QString
&
sipAddress
)
{
bool
Conference
HelperModel
::
Conference
AddModel
::
removeFromConference
(
const
QString
&
sipAddress
)
{
auto
it
=
mSipAddresses
.
find
(
sipAddress
);
if
(
it
==
mSipAddresses
.
end
())
return
false
;
...
...
@@ -106,7 +105,7 @@ bool ConferenceAddModel::removeFromConference (const QString &sipAddress) {
// -----------------------------------------------------------------------------
void
ConferenceAddModel
::
update
()
{
void
Conference
HelperModel
::
Conference
AddModel
::
update
()
{
list
<
shared_ptr
<
linphone
::
Address
>
>
linphoneAddresses
;
for
(
const
auto
&
map
:
mRefs
)
linphoneAddresses
.
push_back
(
map
->
value
(
"__linphoneAddress"
).
value
<
shared_ptr
<
linphone
::
Address
>
>
());
...
...
@@ -119,7 +118,7 @@ void ConferenceAddModel::update () {
// -----------------------------------------------------------------------------
void
ConferenceAddModel
::
addToConference
(
const
std
::
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
)
{
void
Conference
HelperModel
::
Conference
AddModel
::
addToConference
(
const
std
::
shared_ptr
<
linphone
::
Address
>
&
linphoneAddress
)
{
QString
sipAddress
=
::
Utils
::
linphoneStringToQString
(
linphoneAddress
->
asStringUriOnly
());
QVariantMap
map
;
...
...
linphone-desktop/src/components/conference/ConferenceAddModel.hpp
View file @
bd2729ba
...
...
@@ -25,17 +25,15 @@
#include <memory>
#include
<QAbstractListModel>
#include
"ConferenceHelperModel.hpp"
// =============================================================================
class
ConferenceHelperModel
;
namespace
linphone
{
class
Address
;
}
class
ConferenceAddModel
:
public
QAbstractListModel
{
class
Conference
HelperModel
::
Conference
AddModel
:
public
QAbstractListModel
{
Q_OBJECT
;
public:
...
...
linphone-desktop/src/components/conference/ConferenceHelperModel.hpp
View file @
bd2729ba
...
...
@@ -37,13 +37,13 @@ namespace linphone {
}
class
ConferenceHelperModel
:
public
QSortFilterProxyModel
{
friend
class
ConferenceAddModel
;
Q_OBJECT
;
Q_PROPERTY
(
ConferenceAddModel
*
toAdd
READ
getConferenceAddModel
CONSTANT
);
public:
class
ConferenceAddModel
;
ConferenceHelperModel
(
QObject
*
parent
=
Q_NULLPTR
);
~
ConferenceHelperModel
()
=
default
;
...
...
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