diff --git a/callwidget.cpp b/callwidget.cpp index 91857ccc6b8d805c652b314ad0393b7962d36498..4d09fb74b72ecf86f621a3e0dcb3f977130b64e5 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -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) { diff --git a/callwidget.ui b/callwidget.ui index 817a5c74e756e880c3ff95ac1817a738fa99aea5..bca3adc10cc8d06af8825f53f807a6bf8f02b733 100644 --- a/callwidget.ui +++ b/callwidget.ui @@ -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">