Commit 6578a311 authored by Ming Rui Zhang's avatar Ming Rui Zhang

advancedsipsettings: add section of voicemail

Change-Id: I6481e419792c2e8e3802f9fec6cc22876631c10e
parent 52bb5ddc
......@@ -136,6 +136,10 @@ AdvancedSIPSettingsWidget::AdvancedSIPSettingsWidget(QWidget* parent)
ui->videoDownPushButtonSIP->setEnabled(enabled);
ui->videoUpPushButtonSIP->setEnabled(enabled);
});
// voicemail
connect(ui->lineEditVoiceMailDialCode, &QLineEdit::editingFinished, this,
&AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished);
}
AdvancedSIPSettingsWidget::~AdvancedSIPSettingsWidget()
......@@ -233,6 +237,8 @@ void AdvancedSIPSettingsWidget::updateAdvancedSIPSettings()
connect(ui->videoRTPMinPortSpinBox, &QSpinBox::editingFinished, this, &AdvancedSIPSettingsWidget::videoRTPMinPortSpinBoxEditFinished);
connect(ui->videoRTPMaxPortSpinBox, &QSpinBox::editingFinished, this, &AdvancedSIPSettingsWidget::videoRTPMaxPortSpinBoxEditFinished);
// voicemail
ui->lineEditVoiceMailDialCode->setText(QString::fromStdString(config.mailbox));
}
// call settings
......@@ -677,3 +683,11 @@ AdvancedSIPSettingsWidget::videoRTPMaxPortSpinBoxEditFinished()
confProps.Video.videoPortMax = ui->videoRTPMaxPortSpinBox->value();
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
}
void
AdvancedSIPSettingsWidget::lineEditVoiceMailDialCodeEditFinished()
{
auto confProps = LRCInstance::accountModel().getAccountConfig(LRCInstance::getCurrAccId());
confProps.mailbox = ui->lineEditVoiceMailDialCode->text().toStdString();
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), confProps);
}
......@@ -111,4 +111,7 @@ private slots:
void audioRTPMaxPortSpinBoxEditFinished();
void videoRTPMinPortSpinBoxEditFinished();
void videoRTPMaxPortSpinBoxEditFinished();
// voicemail
void lineEditVoiceMailDialCodeEditFinished();
};
......@@ -6,26 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>549</width>
<height>1773</height>
<width>571</width>
<height>1913</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<spacer name="verticalSpacer_13">
<property name="orientation">
......@@ -176,7 +164,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -187,6 +175,136 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_15">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="label_14">
<property name="font">
<font>
<pointsize>13</pointsize>
</font>
</property>
<property name="text">
<string>Voicemail</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_14">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_19">
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_5">
<property name="leftMargin">
<number>0</number>
</property>
<item row="0" column="3">
<widget class="QLineEdit" name="lineEditVoiceMailDialCode">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="echoMode">
<enum>QLineEdit::Normal</enum>
</property>
<property name="placeholderText">
<string/>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_35">
<item>
<widget class="QLabel" name="label_33">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Voicemail Dial Code</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_29">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
......@@ -438,7 +556,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -473,7 +591,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -544,7 +662,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-folder-24px.svg</normaloff>:/images/icons/round-folder-24px.svg</iconset>
</property>
</widget>
......@@ -1705,7 +1823,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_down-24px.svg</normaloff>:/images/icons/round-arrow_drop_down-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -1739,7 +1857,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_up-24px.svg</normaloff>:/images/icons/round-arrow_drop_up-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -1858,7 +1976,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_down-24px.svg</normaloff>:/images/icons/round-arrow_drop_down-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -1892,7 +2010,7 @@
<string/>
</property>
<property name="icon">
<iconset>
<iconset resource="ressources.qrc">
<normaloff>:/images/icons/round-arrow_drop_up-24px.svg</normaloff>:/images/icons/round-arrow_drop_up-24px.svg</iconset>
</property>
<property name="iconSize">
......@@ -2273,6 +2391,8 @@
<tabstop>videoRTPMinPortSpinBox</tabstop>
<tabstop>videoRTPMaxPortSpinBox</tabstop>
</tabstops>
<resources/>
<resources>
<include location="ressources.qrc"/>
</resources>
<connections/>
</ui>
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