Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-windows
Commits
6456baa6
Commit
6456baa6
authored
May 21, 2015
by
Edric Milaret
Browse files
windows: disable call control when no current call
Refs #73662 Change-Id: I1f2ee3b953a806649f2c7d2e866c5313da4adb86
parent
9e12e886
Changes
3
Hide whitespace changes
Inline
Side-by-side
callwidget.cpp
View file @
6456baa6
...
...
@@ -44,7 +44,7 @@ CallWidget::CallWidget(QWidget *parent) :
ui
->
muteSpeakerButton
->
setCheckable
(
true
);
ui
->
callInvite
->
setVisible
(
false
);
a
ctualCall
_
=
nullptr
;
setA
ctualCall
(
nullptr
)
;
videoRenderer_
=
nullptr
;
try
{
...
...
@@ -154,7 +154,7 @@ CallWidget::callIncoming(Call *call)
{
if
(
!
call
->
account
()
->
isAutoAnswer
())
ui
->
callInvite
->
setVisible
(
true
);
a
ctualCall
_
=
call
;
setA
ctualCall
(
call
)
;
}
void
...
...
@@ -171,7 +171,7 @@ CallWidget::on_refuseButton_clicked()
if
(
actualCall_
==
nullptr
)
return
;
actualCall_
->
performAction
(
Call
::
Action
::
REFUSE
);
a
ctualCall
_
=
nullptr
;
setA
ctualCall
(
nullptr
)
;
ui
->
callInvite
->
setVisible
(
false
);
}
...
...
@@ -196,7 +196,7 @@ void
CallWidget
::
addedCall
(
Call
*
call
,
Call
*
parent
)
{
Q_UNUSED
(
parent
);
if
(
call
->
direction
()
==
Call
::
Direction
::
OUTGOING
)
{
a
ctualCall
_
=
call
;
setA
ctualCall
(
call
)
;
}
}
...
...
@@ -207,8 +207,8 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
if
(
call
==
nullptr
)
return
;
ui
->
callList
->
setCurrentIndex
(
callModel_
->
getIndex
(
actualCall_
));
if
(
call
->
state
()
==
Call
::
State
::
OVER
)
{
a
ctualCall
_
=
nullptr
;
if
(
call
->
state
()
==
Call
::
State
::
OVER
||
call
->
state
()
==
Call
::
State
::
ERROR
)
{
setA
ctualCall
(
nullptr
)
;
ui
->
videoWidget
->
hide
();
}
else
if
(
call
->
state
()
==
Call
::
State
::
HOLD
)
{
ui
->
videoWidget
->
hide
();
...
...
@@ -230,7 +230,7 @@ CallWidget::on_callList_activated(const QModelIndex &index)
ui
->
videoWidget
->
hide
();
actualCall_
->
performAction
(
Call
::
Action
::
HOLD
);
}
a
ctualCall
_
=
callSelected
;
setA
ctualCall
(
callSelected
)
;
actualCall_
->
performAction
(
Call
::
Action
::
HOLD
);
ui
->
videoWidget
->
show
();
}
...
...
@@ -300,7 +300,8 @@ CallWidget::on_contactView_doubleClicked(const QModelIndex &index)
}
}
void
CallWidget
::
on_historyList_doubleClicked
(
const
QModelIndex
&
index
)
void
CallWidget
::
on_historyList_doubleClicked
(
const
QModelIndex
&
index
)
{
QString
number
=
index
.
model
()
->
data
(
index
,
static_cast
<
int
>
(
Call
::
Role
::
Number
)).
toString
();
if
(
not
number
.
isEmpty
())
{
...
...
@@ -309,3 +310,11 @@ void CallWidget::on_historyList_doubleClicked(const QModelIndex &index)
outCall
->
performAction
(
Call
::
Action
::
ACCEPT
);
}
}
void
CallWidget
::
setActualCall
(
Call
*
value
)
{
actualCall_
=
value
;
ui
->
holdButton
->
setEnabled
(
actualCall_
!=
nullptr
);
ui
->
hangupButton
->
setEnabled
(
actualCall_
!=
nullptr
);
}
callwidget.h
View file @
6456baa6
...
...
@@ -81,6 +81,7 @@ private:
int
outputVolume_
;
int
inputVolume_
;
void
findRingAccount
();
void
setActualCall
(
Call
*
value
);
};
#endif // CALLWIDGET_H
callwidget.ui
View file @
6456baa6
...
...
@@ -135,6 +135,9 @@
</item>
<item>
<widget
class=
"QPushButton"
name=
"holdButton"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"text"
>
<string>
Hold/Unhold
</string>
</property>
...
...
@@ -146,6 +149,9 @@
</item>
<item>
<widget
class=
"QPushButton"
name=
"hangupButton"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment