Commit 2f9e6708 authored by Olivier SOLDANO's avatar Olivier SOLDANO

ui: true call state in callwidget

The UI now shows the true call state on the callwidget outboundCallPage.
The ui also switches to welcomePage in case of failure of a call.

Change-Id: I1036cbc3ef54860e859ecfe4d9f488f122705b25
parent d97aabcf
......@@ -415,6 +415,12 @@ CallWidget::callChangedSlot()
QPixmap::fromImage(
GlobalInstances::pixmapManipulator()
.callPhoto(actualCall_, QSize(130,130)).value<QImage>()));
if(actualCall_->state() == Call::State::OVER){
ui->outboundCallLabel->setText(actualCall_->toHumanStateName(Call::State::INITIALIZATION));
} else {
ui->outboundCallLabel->setText(actualCall_->toHumanStateName());
}
}
void
......@@ -526,14 +532,14 @@ void CallWidget::callStateToView(Call* value)
case Call::State::HOLD:
ui->stackedWidget->setCurrentWidget(ui->videoPage);
break;
case Call::State::FAILURE:
case Call::State::ERROR:
case Call::State::OVER:
ui->stackedWidget->setCurrentWidget(ui->welcomePage);
break;
case Call::State::INITIALIZATION:
case Call::State::CONNECTED:
case Call::State::RINGING:
case Call::State::FAILURE:
case Call::State::ERROR:
ui->stackedWidget->setCurrentWidget(ui->outboundCallPage);
break;
default:
......@@ -565,8 +571,10 @@ CallWidget::setActualCall(Call* value)
void
CallWidget::on_cancelButton_clicked()
{
if (actualCall_)
if (actualCall_){
actualCall_->performAction(Call::Action::REFUSE);
ui->stackedWidget->setCurrentWidget(ui->welcomePage);
}
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment