Commit cf528d79 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

callwidget: add call status onto ongoing call page

- will show Searching, Connecting, Calling...  call status onto ongoingCallPage

Change-Id: Ide50b623ceda2f24b4f848205e75dd0cbac3aa4a
parent a59b9b1f
......@@ -666,6 +666,14 @@ void CallWidget::slotShowIncomingCallView(const std::string& accountId,
auto call = callModel->getCall(convInfo.callId);
auto isCallSelected = LRCInstance::getSelectedConvUid() == convInfo.uid;
ui->callingStatusLabel->setText(QString::fromStdString(lrc::api::call::to_string(call.status)));
connect(callModel, &lrc::api::NewCallModel::callStatusChanged, ui->incomingCallPage,
[this, accountId](const std::string& callId) {
auto callModel = LRCInstance::accountModel().getAccountInfo(accountId).callModel.get();
auto call = callModel->getCall(callId);
ui->callingStatusLabel->setText(QString::fromStdString(lrc::api::call::to_string(call.status)));
});
auto itemInCurrentFilter = false;
if (call.isOutgoing) {
......
......@@ -446,7 +446,7 @@
<bool>false</bool>
</attribute>
<attribute name="headerDefaultSectionSize">
<number>0</number>
<number>42</number>
</attribute>
<attribute name="headerMinimumSectionSize">
<number>0</number>
......@@ -1026,7 +1026,7 @@ Copy and share it with your friends!
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="videoPage">
<property name="sizePolicy">
......@@ -1171,10 +1171,22 @@ Copy and share it with your friends!
</item>
<item>
<widget class="QLabel" name="callingBestNameLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="font">
<font>
<family>Segoe UI Emoji</family>
<pointsize>12</pointsize>
<pointsize>10</pointsize>
</font>
</property>
<property name="styleSheet">
......@@ -1212,6 +1224,22 @@ Copy and share it with your friends!
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_9">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="spinnerLabel">
<property name="sizePolicy">
......@@ -1234,6 +1262,40 @@ Copy and share it with your friends!
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="callingStatusLabel">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(174, 174, 174);</string>
</property>
<property name="text">
<string> Incoming...</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_10">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
......
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