Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-client-windows
Commits
d8528fa2
Commit
d8528fa2
authored
Jul 07, 2015
by
Edric Milaret
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call: add cancel button for dialing call
Refs #76414 Change-Id: I5d9c160f64c93205be275ad09a3e08b055de0380
parent
4f63084e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
10 deletions
+37
-10
callwidget.cpp
callwidget.cpp
+9
-3
callwidget.h
callwidget.h
+2
-0
callwidget.ui
callwidget.ui
+26
-7
No files found.
callwidget.cpp
View file @
d8528fa2
...
...
@@ -49,7 +49,7 @@ CallWidget::CallWidget(QWidget *parent) :
connect
(
ui
->
videoWidget
,
SIGNAL
(
setChatVisibility
(
bool
)),
ui
->
instantMessagingWidget
,
SLOT
(
setVisible
(
bool
)));
ui
->
spinner
Label
->
hide
();
ui
->
spinner
Widget
->
hide
();
spinner_
=
new
QMovie
(
":/images/spinner.gif"
);
if
(
spinner_
->
isValid
())
{
ui
->
spinnerLabel
->
setMovie
(
spinner_
);
...
...
@@ -262,7 +262,7 @@ CallWidget::callStateChanged(Call* call, Call::State previousState)
ui
->
videoWidget
->
hide
();
displaySpinner
(
false
);
auto
onHoldCall
=
callModel_
->
getActiveCalls
().
first
();
if
(
onHoldCall
!=
nullptr
)
{
if
(
onHoldCall
!=
nullptr
&&
onHoldCall
->
state
()
==
Call
::
State
::
HOLD
)
{
setActualCall
(
onHoldCall
);
onHoldCall
->
performAction
(
Call
::
Action
::
HOLD
);
}
...
...
@@ -349,7 +349,13 @@ CallWidget::on_sortComboBox_currentIndexChanged(int index)
void
CallWidget
::
displaySpinner
(
bool
display
)
{
display
?
ui
->
spinner
Label
->
show
()
:
ui
->
spinner
Label
->
hide
();
display
?
ui
->
spinner
Widget
->
show
()
:
ui
->
spinner
Widget
->
hide
();
if
(
ui
->
spinnerLabel
->
movie
())
display
?
ui
->
spinnerLabel
->
movie
()
->
start
()
:
ui
->
spinnerLabel
->
movie
()
->
stop
();
}
void
CallWidget
::
on_cancelButton_clicked
()
{
if
(
actualCall_
)
actualCall_
->
performAction
(
Call
::
Action
::
REFUSE
);
}
callwidget.h
View file @
d8528fa2
...
...
@@ -66,6 +66,8 @@ private slots:
void
findRingAccount
(
QModelIndex
idx1
,
QModelIndex
idx2
,
QVector
<
int
>
vec
);
void
checkRegistrationState
(
Account
*
account
,
Account
::
RegistrationState
state
);
void
on_cancelButton_clicked
();
private:
Ui
::
CallWidget
*
ui
;
Call
*
actualCall_
;
...
...
callwidget.ui
View file @
d8528fa2
...
...
@@ -51,13 +51,32 @@
<widget
class=
"VideoView"
name=
"videoWidget"
native=
"true"
/>
</item>
<item>
<widget
class=
"QLabel"
name=
"spinnerLabel"
>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
<widget
class=
"QWidget"
name=
"spinnerWidget"
native=
"true"
>
<layout
class=
"QVBoxLayout"
name=
"spinnerLayout"
>
<item>
<widget
class=
"QLabel"
name=
"spinnerLabel"
>
<property
name=
"text"
>
<string/>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item
alignment=
"Qt::AlignHCenter"
>
<widget
class=
"QPushButton"
name=
"cancelButton"
>
<property
name=
"maximumSize"
>
<size>
<width>
100
</width>
<height>
16777215
</height>
</size>
</property>
<property
name=
"text"
>
<string>
Cancel
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
alignment=
"Qt::AlignHCenter|Qt::AlignVCenter"
>
...
...
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