From 124c2a972865d55fe0e0d8873f1f5315b57c7954 Mon Sep 17 00:00:00 2001 From: Ming Rui Zhang <mingrui.zhang@savoirfairelinux.com> Date: Tue, 7 Jan 2020 13:56:08 -0500 Subject: [PATCH] callwidget: add sip display name label Change-Id: I5056932b3bca62a16628a2221c7420d0d31a79b7 --- src/callwidget.cpp | 7 ++++++ src/callwidget.ui | 56 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/callwidget.cpp b/src/callwidget.cpp index ce44de3..aad7641 100644 --- a/src/callwidget.cpp +++ b/src/callwidget.cpp @@ -243,6 +243,7 @@ CallWidget::CallWidget(QWidget* parent) : setCallPanelVisibility(false); ui->containerWidget->setVisible(false); + ui->sipCallerBestIdLabel->setVisible(false); } CallWidget::~CallWidget() @@ -734,6 +735,12 @@ CallWidget::slotShowIncomingCallView(const std::string& accountId, elidedLabel = sencondaryCallLabelFontMetrics.elidedText(finalBestId, Qt::ElideRight, ui->callingBestIdLabel->width()); ui->callingBestIdLabel->setText(elidedLabel); + ui->sipCallerBestIdLabel->setText(elidedLabel); + + if(finalBestId.isEmpty()) + ui->sipCallerBestIdLabel->setVisible(false); + else + ui->sipCallerBestIdLabel->setVisible(true); ui->smartList->update(); } diff --git a/src/callwidget.ui b/src/callwidget.ui index 5692b31..ddc8779 100644 --- a/src/callwidget.ui +++ b/src/callwidget.ui @@ -445,12 +445,12 @@ <attribute name="headerVisible"> <bool>false</bool> </attribute> - <attribute name="headerDefaultSectionSize"> - <number>42</number> - </attribute> <attribute name="headerMinimumSectionSize"> <number>0</number> </attribute> + <attribute name="headerDefaultSectionSize"> + <number>42</number> + </attribute> </widget> </item> </layout> @@ -1494,7 +1494,7 @@ Copy and share it with your friends! <height>420</height> </size> </property> - <layout class="QVBoxLayout" name="callInviteLayout" stretch="0,2,1,2,1,9"> + <layout class="QVBoxLayout" name="callInviteLayout" stretch="0,2,1,0,0,0,2,1,9"> <property name="spacing"> <number>0</number> </property> @@ -1564,6 +1564,54 @@ Copy and share it with your friends! </property> </widget> </item> + <item> + <spacer name="verticalSpacer_13"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="sipCallerBestIdLabel"> + <property name="font"> + <font> + <family>Segoe UI Emoji</family> + <pointsize>9</pointsize> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(128, 128, 128);</string> + </property> + <property name="text"> + <string>best id</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_12"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>5</height> + </size> + </property> + </spacer> + </item> <item> <widget class="QLabel" name="wantToTalkLabel"> <property name="styleSheet"> -- GitLab