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
13c74be2
Commit
13c74be2
authored
May 19, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Calls/ConferenceManager): in progress
parent
b943d423
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
6 deletions
+54
-6
CallsListModel.cpp
linphone-desktop/src/components/calls/CallsListModel.cpp
+5
-2
ConferenceAddModel.cpp
...-desktop/src/components/conference/ConferenceAddModel.cpp
+5
-2
ConferenceHelperModel.cpp
...sktop/src/components/conference/ConferenceHelperModel.cpp
+14
-0
ConferenceHelperModel.hpp
...sktop/src/components/conference/ConferenceHelperModel.hpp
+7
-1
ScrollableListViewField.qml
...ui/modules/Common/Form/Fields/ScrollableListViewField.qml
+10
-0
ConferenceManager.qml
linphone-desktop/ui/views/App/Calls/ConferenceManager.qml
+12
-0
linphone
submodules/linphone
+1
-1
No files found.
linphone-desktop/src/components/calls/CallsListModel.cpp
View file @
13c74be2
...
...
@@ -25,6 +25,7 @@
#include "../../app/App.hpp"
#include "../../Utils.hpp"
#include "../conference/ConferenceHelperModel.hpp"
#include "../core/CoreManager.hpp"
#include "CallsListModel.hpp"
...
...
@@ -195,7 +196,7 @@ void CallsListModel::removeCall (const shared_ptr<linphone::Call> &call) {
try
{
callModel
=
&
call
->
getData
<
CallModel
>
(
"call-model"
);
}
catch
(
const
out_of_range
&
)
{
//
Can be a bug. Or t
he call model not exists because the linphone call state
//
T
he call model not exists because the linphone call state
// `CallStateIncomingReceived`/`CallStateOutgoingInit` was not notified.
qWarning
()
<<
QStringLiteral
(
"Unable to found linphone call:"
)
<<
call
.
get
();
return
;
...
...
@@ -209,8 +210,10 @@ void CallsListModel::removeCall (const shared_ptr<linphone::Call> &call) {
if
(
index
==
-
1
||
!
removeRow
(
index
))
qWarning
()
<<
QStringLiteral
(
"Unable to remove call:"
)
<<
callModel
;
if
(
mList
.
empty
())
if
(
mList
.
empty
()
&&
ConferenceHelperModel
::
getInstancesNumber
()
==
0
)
{
qInfo
()
<<
QStringLiteral
(
"Last call terminated, close calls window."
);
App
::
getInstance
()
->
getCallsWindow
()
->
close
();
}
}
);
}
linphone-desktop/src/components/conference/ConferenceAddModel.cpp
View file @
13c74be2
...
...
@@ -114,8 +114,11 @@ bool ConferenceHelperModel::ConferenceAddModel::removeFromConference (const QStr
void
ConferenceHelperModel
::
ConferenceAddModel
::
update
()
{
list
<
shared_ptr
<
linphone
::
Address
>
>
linphoneAddresses
;
for
(
const
auto
&
map
:
mRefs
)
linphoneAddresses
.
push_back
(
map
->
value
(
"__linphoneAddress"
).
value
<
shared_ptr
<
linphone
::
Address
>
>
());
for
(
const
auto
&
map
:
mRefs
)
{
shared_ptr
<
linphone
::
Address
>
linphoneAddress
=
map
->
value
(
"__linphoneAddress"
).
value
<
shared_ptr
<
linphone
::
Address
>
>
();
Q_ASSERT
(
linphoneAddress
!=
nullptr
);
linphoneAddresses
.
push_back
(
linphoneAddress
);
}
mConferenceHelperModel
->
mConference
->
inviteParticipants
(
linphoneAddresses
,
...
...
linphone-desktop/src/components/conference/ConferenceHelperModel.cpp
View file @
13c74be2
...
...
@@ -31,6 +31,8 @@ using namespace std;
// =============================================================================
int
ConferenceHelperModel
::
mInstancesNumber
=
0
;
ConferenceHelperModel
::
ConferenceHelperModel
(
QObject
*
parent
)
:
QSortFilterProxyModel
(
parent
)
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
...
...
@@ -42,6 +44,18 @@ ConferenceHelperModel::ConferenceHelperModel (QObject *parent) : QSortFilterProx
App
::
getInstance
()
->
getEngine
()
->
setObjectOwnership
(
mConferenceAddModel
,
QQmlEngine
::
CppOwnership
);
setSourceModel
(
new
SipAddressesProxyModel
(
this
));
mInstancesNumber
++
;
}
ConferenceHelperModel
::~
ConferenceHelperModel
()
{
mInstancesNumber
--
;
Q_ASSERT
(
mInstancesNumber
>=
0
);
if
(
mInstancesNumber
==
0
&&
CoreManager
::
getInstance
()
->
getCallsListModel
()
->
rowCount
()
==
0
)
{
qInfo
()
<<
QStringLiteral
(
"Conference terminated and no calls, close calls window."
);
App
::
getInstance
()
->
getCallsWindow
()
->
close
();
}
}
QHash
<
int
,
QByteArray
>
ConferenceHelperModel
::
roleNames
()
const
{
...
...
linphone-desktop/src/components/conference/ConferenceHelperModel.hpp
View file @
13c74be2
...
...
@@ -45,10 +45,14 @@ public:
class
ConferenceAddModel
;
ConferenceHelperModel
(
QObject
*
parent
=
Q_NULLPTR
);
~
ConferenceHelperModel
()
=
default
;
~
ConferenceHelperModel
();
QHash
<
int
,
QByteArray
>
roleNames
()
const
override
;
static
int
getInstancesNumber
()
{
return
mInstancesNumber
;
}
Q_INVOKABLE
void
setFilter
(
const
QString
&
pattern
);
protected:
...
...
@@ -62,6 +66,8 @@ private:
ConferenceAddModel
*
mConferenceAddModel
;
std
::
shared_ptr
<
linphone
::
Conference
>
mConference
;
static
int
mInstancesNumber
;
};
#endif // CONFERENCE_HELPER_MODEL_H_
linphone-desktop/ui/modules/Common/Form/Fields/ScrollableListViewField.qml
View file @
13c74be2
...
...
@@ -8,6 +8,8 @@ import Common.Styles 1.0
Rectangle
{
id
:
field
property
bool
readOnly
:
false
default
property
alias
_content
:
content
.
data
color
:
TextFieldStyle
.
background
.
color
.
normal
...
...
@@ -30,4 +32,12 @@ Rectangle {
color
:
'
transparent
'
radius
:
field
.
radius
}
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
visible
:
field
.
readOnly
onWheel
:
wheel
.
accepted
=
true
}
}
linphone-desktop/ui/views/App/Calls/ConferenceManager.qml
View file @
13c74be2
...
...
@@ -9,6 +9,11 @@ import App.Styles 1.0
// =============================================================================
DialogPlus
{
id
:
conferenceManager
readonly
property
int
maxParticipants
:
10
readonly
property
int
minParticipants
:
2
buttons
:
[
TextButtonA
{
text
:
qsTr
(
'
cancel
'
)
...
...
@@ -16,6 +21,7 @@ DialogPlus {
onClicked
:
exit
(
0
)
},
TextButtonB
{
enabled
:
toAddView
.
count
>=
conferenceManager
.
minParticipants
text
:
qsTr
(
'
confirm
'
)
onClicked
:
{
...
...
@@ -68,6 +74,8 @@ DialogPlus {
Layout.fillHeight
:
true
Layout.fillWidth
:
true
readOnly
:
toAddView
.
count
>=
conferenceManager
.
maxParticipants
SipAddressesView
{
anchors.fill
:
parent
...
...
@@ -113,6 +121,8 @@ DialogPlus {
Layout.topMargin
:
filter
.
height
+
ConferenceManagerStyle
.
columns
.
selector
.
spacing
SipAddressesView
{
id
:
toAddView
anchors.fill
:
parent
actions
:
[{
...
...
@@ -123,6 +133,8 @@ DialogPlus {
}]
model
:
conferenceHelperModel
.
toAdd
onEntryClicked
:
actions
[
0
].
handler
(
entry
)
}
}
}
...
...
linphone
@
38638e54
Subproject commit
2b6bcbc7f46423d17c18f2e2eafe52ac245e337f
Subproject commit
38638e543d1641ff637f32c4424f61684c861cea
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